Skip to content

De-flake TestSwarmClusterRotateUnlockKey... again... maybe?#47009

Merged
thaJeztah merged 1 commit intomoby:masterfrom
cpuguy83:swarm_rotate_key_flake
Jan 19, 2024
Merged

De-flake TestSwarmClusterRotateUnlockKey... again... maybe?#47009
thaJeztah merged 1 commit intomoby:masterfrom
cpuguy83:swarm_rotate_key_flake

Conversation

@cpuguy83
Copy link
Member

@cpuguy83 cpuguy83 commented Jan 2, 2024

This hopefully makes the test less flakey (or removes any flake that would be caused by the test itself).

  1. Adds tail of cluster daemon logs when there is a test failure so we can more easily see what may be happening
  2. Scans the daemon logs to check if the key is rotated before restarting the daemon. This is a little hacky but a little better than assuming it is done after a hard-coded 3 seconds.
  3. Cleans up the node ls check such that it uses a poll function

@thaJeztah
Copy link
Member

@dperny ptal

This hopefully makes the test less flakey (or removes any flake that
would be caused by the test itself).

1. Adds tail of cluster daemon logs when there is a test failure so we
   can more easily see what may be happening
2. Scans the daemon logs to check if the key is rotated before
   restarting the daemon. This is a little hacky but a little better
   than assuming it is done after a hard-coded 3 seconds.
3. Cleans up the `node ls` check such that it uses a poll function

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
@cpuguy83 cpuguy83 force-pushed the swarm_rotate_key_flake branch from 9a318cc to fbdc025 Compare January 4, 2024 00:19
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

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: DockerSwarmSuite.TestSwarmClusterRotateUnlockKey

3 participants