mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #35173 from tophj-ibm/fix-raft-quorum-test
[integration-cli] fix flaky raft test
This commit is contained in:
commit
dc74e31bb2
1 changed files with 6 additions and 2 deletions
|
@ -370,8 +370,12 @@ func (s *DockerSwarmSuite) TestAPISwarmRaftQuorum(c *check.C) {
|
|||
cli, err := d1.NewClient()
|
||||
c.Assert(err, checker.IsNil)
|
||||
defer cli.Close()
|
||||
_, err = cli.ServiceCreate(context.Background(), service.Spec, types.ServiceCreateOptions{})
|
||||
c.Assert(err.Error(), checker.Contains, "deadline exceeded")
|
||||
|
||||
// d1 will eventually step down from leader because there is no longer an active quorum, wait for that to happen
|
||||
waitAndAssert(c, defaultReconciliationTimeout, func(c *check.C) (interface{}, check.CommentInterface) {
|
||||
_, err = cli.ServiceCreate(context.Background(), service.Spec, types.ServiceCreateOptions{})
|
||||
return err.Error(), nil
|
||||
}, checker.Contains, "Make sure more than half of the managers are online.")
|
||||
|
||||
d2.Start(c)
|
||||
|
||||
|
|
Loading…
Reference in a new issue