Skip to content

[integration-cli] fix flaky raft test#35173

Merged
yongtang merged 1 commit intomoby:masterfrom
tophj-ibm:fix-raft-quorum-test
Oct 12, 2017
Merged

[integration-cli] fix flaky raft test#35173
yongtang merged 1 commit intomoby:masterfrom
tophj-ibm:fix-raft-quorum-test

Conversation

@tophj-ibm
Copy link
Contributor

fixes #34988

In the test we are shutting down 2 of 3 nodes, all of which are managers.
When this happens the remaining node prepares to step down from being
a leader because there is no longer an active quorum. This test was
written before that change was implemented, and assumes that the
remaining node can still handle requests to create a service.

There was further flakiness depending on whether or not the node has
stepped down or was in the process of doing so. Fix this by waiting
for the node to completely step down and checking to see if it errors
out like it should.

Signed-off-by: Christopher Jones tophj@linux.vnet.ibm.com

Fixes previously flaky TestAPISwarmRaftQuorum.

In the test we are shutting down 2 of 3 nodes, all of which are managers.
When this happens the remaining node prepares to step down from being
a leader because there is no longer an active quorum. This test was
written before that change was implemented, and assumes that the
remaining node can still handle requests to create a service (it can't)

There was further flakiness depending on whether or not the node has
stepped down or was in the process of doing so. Fix this by waiting
for the node to completely step down and checking to see if it errors
out like it should.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@thaJeztah
Copy link
Member

Thanks Chris!

@tophj-ibm tophj-ibm deleted the fix-raft-quorum-test branch October 12, 2017 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky test: TestAPISwarmRaftQuorum

5 participants