From dae880478eafa991a2c538fce22c130f0c571f37 Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Wed, 5 Apr 2017 16:07:43 -0700 Subject: [PATCH] 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 (github: dmcgowan) Upstream-commit: 5ff82cffeeecfb452a9bc1f1ff5d4f5eb3c8e55b Component: engine --- components/engine/integration-cli/docker_cli_push_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/components/engine/integration-cli/docker_cli_push_test.go b/components/engine/integration-cli/docker_cli_push_test.go index 43d8363e6c..9fae636dfc 100644 --- a/components/engine/integration-cli/docker_cli_push_test.go +++ b/components/engine/integration-cli/docker_cli_push_test.go @@ -606,15 +606,16 @@ func (s *DockerRegistryAuthTokenSuite) TestPushMisconfiguredTokenServiceResponse } func (s *DockerRegistryAuthTokenSuite) TestPushMisconfiguredTokenServiceResponseError(c *check.C) { - ts := getTestTokenService(http.StatusTooManyRequests, `{"errors": [{"code":"TOOMANYREQUESTS","message":"out of tokens"}]}`, 10) + ts := getTestTokenService(http.StatusTooManyRequests, `{"errors": [{"code":"TOOMANYREQUESTS","message":"out of tokens"}]}`, 3) defer ts.Close() s.setupRegistryWithTokenService(c, ts.URL) repoName := fmt.Sprintf("%s/busybox", privateRegistryURL) dockerCmd(c, "tag", "busybox", repoName) out, _, err := dockerCmdWithError("push", repoName) c.Assert(err, check.NotNil, check.Commentf(out)) - c.Assert(out, checker.Contains, "Retrying") - c.Assert(out, checker.Not(checker.Contains), "Retrying in 15") + // TODO: isolate test so that it can be guaranteed that the 503 will trigger xfer retries + //c.Assert(out, checker.Contains, "Retrying") + //c.Assert(out, checker.Not(checker.Contains), "Retrying in 15") split := strings.Split(out, "\n") c.Assert(split[len(split)-2], check.Equals, "toomanyrequests: out of tokens") }