Skip to content

Commit

Permalink
Merge pull request moby#39885 from thaJeztah/debug_flaky_TestSwarmClu…
Browse files Browse the repository at this point in the history
…sterRotateUnlockKey

integration-cli: add more debugging for TestSwarmClusterRotateUnlockKey
  • Loading branch information
tiborvass authored Sep 19, 2019
2 parents 79da31d + 78d137d commit 3cfb680
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion integration-cli/docker_cli_swarm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1381,11 +1381,14 @@ func (s *DockerSwarmSuite) TestSwarmClusterRotateUnlockKey(c *testing.T) {
if err != nil && retry < 5 {
if strings.Contains(outs, "swarm does not have a leader") {
retry++
c.Logf("[%s] got 'swarm does not have a leader'. retrying (attempt %d/5)", d.ID(), retry)
time.Sleep(3 * time.Second)
continue
} else {
c.Logf("[%s] gave error: '%v'. retrying (attempt %d/5): %s", d.ID(), err, retry, outs)
}
}
assert.Assert(c, err == nil, outs)
assert.NilError(c, err, "[%s] failed after %d retries: %v (%s)", d.ID(), retry, err, outs)
assert.Assert(c, !strings.Contains(outs, "Swarm is encrypted and needs to be unlocked"))
break
}
Expand Down

0 comments on commit 3cfb680

Please sign in to comment.