Skip to content

Commit 5ff82cf

Browse files
committed
Revert retry count change
Allowing the retries to go up to 10 causes the test to always hit the check against ensuring the retry wait went up to 15 seconds. Additionally we have the max download attempts in the code set to 5. This change did not protect against using this test to expose a problem in the underlying code. Remove checks for retry since there may be additional requests before the upload. Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
1 parent 3d31198 commit 5ff82cf

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

integration-cli/docker_cli_push_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -606,15 +606,16 @@ func (s *DockerRegistryAuthTokenSuite) TestPushMisconfiguredTokenServiceResponse
606606
}
607607

608608
func (s *DockerRegistryAuthTokenSuite) TestPushMisconfiguredTokenServiceResponseError(c *check.C) {
609-
ts := getTestTokenService(http.StatusTooManyRequests, `{"errors": [{"code":"TOOMANYREQUESTS","message":"out of tokens"}]}`, 10)
609+
ts := getTestTokenService(http.StatusTooManyRequests, `{"errors": [{"code":"TOOMANYREQUESTS","message":"out of tokens"}]}`, 3)
610610
defer ts.Close()
611611
s.setupRegistryWithTokenService(c, ts.URL)
612612
repoName := fmt.Sprintf("%s/busybox", privateRegistryURL)
613613
dockerCmd(c, "tag", "busybox", repoName)
614614
out, _, err := dockerCmdWithError("push", repoName)
615615
c.Assert(err, check.NotNil, check.Commentf(out))
616-
c.Assert(out, checker.Contains, "Retrying")
617-
c.Assert(out, checker.Not(checker.Contains), "Retrying in 15")
616+
// TODO: isolate test so that it can be guaranteed that the 503 will trigger xfer retries
617+
//c.Assert(out, checker.Contains, "Retrying")
618+
//c.Assert(out, checker.Not(checker.Contains), "Retrying in 15")
618619
split := strings.Split(out, "\n")
619620
c.Assert(split[len(split)-2], check.Equals, "toomanyrequests: out of tokens")
620621
}

0 commit comments

Comments
 (0)