1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request from thaJeztah/debug_flaky_TestSwarmClusterRotateUnlockKey

integration-cli: add more debugging for TestSwarmClusterRotateUnlockKey
This commit is contained in:
Tibor Vass 2019-09-19 11:08:15 -07:00 committed by GitHub
commit 3cfb680bcc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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