Просмотр исходного кода

e2e.aci: Retry flaky HTTP GET requests

Signed-off-by: Chris Crone <[email protected]>
Chris Crone 5 лет назад
Родитель
Сommit
e4e77bd198
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      tests/aci-e2e/e2e-aci_test.go

+ 2 - 2
tests/aci-e2e/e2e-aci_test.go

@@ -198,7 +198,7 @@ func TestContainerRunVolume(t *testing.T) {
 	})
 
 	t.Run("http get", func(t *testing.T) {
-		r, err := http.Get(endpoint)
+		r, err := HTTPGetWithRetry(endpoint, 3)
 		assert.NilError(t, err)
 		assert.Equal(t, r.StatusCode, http.StatusOK)
 		b, err := ioutil.ReadAll(r.Body)
@@ -434,7 +434,7 @@ func TestComposeUpUpdate(t *testing.T) {
 		assert.Assert(t, is.Len(containerInspect.Ports, 1))
 		endpoint := fmt.Sprintf("http://%s:%d", containerInspect.Ports[0].HostIP, containerInspect.Ports[0].HostPort)
 
-		r, err := http.Get(endpoint + "/words/noun")
+		r, err := HTTPGetWithRetry(endpoint+"/words/noun", 3)
 		assert.NilError(t, err)
 		assert.Equal(t, r.StatusCode, http.StatusOK)
 		b, err := ioutil.ReadAll(r.Body)