e2e.aci: Retry flaky HTTP GET requests

Signed-off-by: Chris Crone <christopher.crone@docker.com>
This commit is contained in:
Chris Crone 2020-09-07 13:43:34 +02:00
parent 6f0f9e5600
commit e4e77bd198
1 changed files with 2 additions and 2 deletions

View File

@ -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)