Skip to content

Update the TestSwarmLockUnlockCluster test to be less flakey.#28997

Merged
aaronlehmann merged 1 commit intomoby:masterfrom
cyli:fix-flakey-test
Dec 1, 2016
Merged

Update the TestSwarmLockUnlockCluster test to be less flakey.#28997
aaronlehmann merged 1 commit intomoby:masterfrom
cyli:fix-flakey-test

Conversation

@cyli
Copy link
Contributor

@cyli cyli commented Nov 30, 2016

This ensures that we wait until the state is not pending in order to check whether a swarm cluster is locked or unlocked, and ensure that we will optionally wait when transitioning from an autolocked state to a non-autolocked state and vice versa.

Would be useful for 1.13.

cc @tonistiigi @aaronlehmann

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason for hiding this comment

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

I'm not sure this is necessary. The root cause looks like a bug in swarmkit. I'm going to submit a PR to fix it.

Copy link
Contributor Author

@cyli cyli Nov 30, 2016

Choose a reason for hiding this comment

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

@aaronlehmann The pending one? This one I think is where I'm not retrying after converting from autolocked to non-autolocked.

Choose a reason for hiding this comment

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

Yes the pending one

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@aaronlehmann Ok, will remove the waiting for the state to not be in pending, then.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

there is already a method d.checkLocalNodeState for this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

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

checker.NotEquals is undefined, it should be checker.Not(checker.Equals)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks!

Signed-off-by: cyli <cyli@twistedmatrix.com>
@cyli cyli changed the title Update the swarm cluster lock/unlock tests to be less flakey. Update the TestSwarmLockUnlockCluster test to be less flakey. Nov 30, 2016
@tonistiigi
Copy link
Member

LGTM

1 similar comment
@aaronlehmann
Copy link

LGTM

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.

5 participants