mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #39885 from thaJeztah/debug_flaky_TestSwarmClusterRotateUnlockKey
integration-cli: add more debugging for TestSwarmClusterRotateUnlockKey
This commit is contained in:
commit
3cfb680bcc
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue