reduce flakiness of TestSwarmLockUnlockCluster and TestSwarmJoinPromoteLocked#38546
reduce flakiness of TestSwarmLockUnlockCluster and TestSwarmJoinPromoteLocked#38546AkihiroSuda merged 1 commit intomoby:masterfrom
Conversation
There was a problem hiding this comment.
Added a temporary commit to trigger our new "flaky check" 🎉 @olljanat 🤞
There was a problem hiding this comment.
@thaJeztah integration-cli/ is deprecated so flaky check is only looking for new tests under integration/ folder...
How ever you can easily test that old test on locally by running commands:
export TEST_REPEAT="5"
export TIMEOUT="30m"
export TESTFLAGS="-test.count 5 -check.f TestSwarmJoinPromoteLocked"
make test-integration
There was a problem hiding this comment.
LOL, yes, just thought of that hahaha
19:15:21 The following new tests were added to integration-cli:
19:15:21 +func (s *DockerSwarmSuite) TestUnlockEngineAndUnlockedSwarm_FLAKY(c *check.C) {
19:15:21 +func (s *DockerSwarmSuite) TestSwarmJoinPromoteLocked_FLAKY(c *check.C) {
19:15:21
19:15:21 integration-cli is deprecated. Please add an API integration test to
19:15:21 ./integration/COMPONENT/. See ./TESTING.md for more details.
There was a problem hiding this comment.
But you can of course also set those to
moby/hack/make/.integration-test-helpers
Lines 14 to 15 in 37498f0
6509775 to
31f5338
Compare
31f5338 to
35c426a
Compare
…teLocked
I noticed that this test failed, because the node was in status "pending".
The test checks for the node's status immediately after it was restarted, so
possibly it needs some time to unlock.
14:07:10 FAIL: docker_cli_swarm_test.go:1128: DockerSwarmSuite.TestSwarmLockUnlockCluster
...
14:07:10 docker_cli_swarm_test.go:1168:
14:07:10 checkSwarmLockedToUnlocked(c, d)
14:07:10 docker_cli_swarm_test.go:1017:
14:07:10 c.Assert(getNodeStatus(c, d), checker.Equals, swarm.LocalNodeStateActive)
14:07:10 ... obtained swarm.LocalNodeState = "pending"
14:07:10 ... expected swarm.LocalNodeState = "active"
This patch adds a `waitAndAssert` for the node's status, with a 1 second timeout.
Signed-off-by: Sebastiaan van Stijn <[email protected]>
|
So far so good; I'll only have to push once more (as I made a copy/pasta error in my commit message 😂) |
35c426a to
973ca00
Compare
Codecov Report
@@ Coverage Diff @@
## master #38546 +/- ##
==========================================
+ Coverage 36.62% 36.65% +0.02%
==========================================
Files 608 608
Lines 45173 45173
==========================================
+ Hits 16545 16558 +13
+ Misses 26341 26333 -8
+ Partials 2287 2282 -5 |
I noticed that this test failed, because the node was in status "pending".
The test checks for the node's status immediately after it was restarted, so
possibly it needs some time to unlock.
This patch adds a
waitAndAssertfor the node's status, with a 1 second timeout.relates to #34051 and #35263