Skip to content

integration-cli: fix flaky TestAPISwarmServicesFailedUpdate - #53272

Open
GordonTheTurtle wants to merge 1 commit into
moby:masterfrom
GordonTheTurtle:fix/flaky-TestAPISwarmServicesFailedUpdate
Open

integration-cli: fix flaky TestAPISwarmServicesFailedUpdate#53272
GordonTheTurtle wants to merge 1 commit into
moby:masterfrom
GordonTheTurtle:fix/flaky-TestAPISwarmServicesFailedUpdate

Conversation

@GordonTheTurtle

Copy link
Copy Markdown
Contributor

Summary

Fix intermittent failure of TestAPISwarmServicesFailedUpdate.

After poll.WaitOn confirms the update is in UpdateStatePaused state, the test previously read the running-task count exactly once and asserted immediately with no retry. If any task was still transitioning at that moment, the assertion would fail spuriously.

Replace the single-shot check with a poll.WaitOn using the same defaultReconciliationTimeout, so the assertion retries until the Swarm scheduler has stabilised the expected number of running tasks.

Release notes (optional)

Note for maintainers

A maintainer's Signed-off-by co-sign is needed before this PR can be merged, per the DCO policy discussion in #53197. If you are approving this PR, please amend the commit to add your own sign-off, or instruct Gordon to add it on your behalf.

A picture of a cute animal (not mandatory but encouraged)

🐢

@GordonTheTurtle
GordonTheTurtle force-pushed the fix/flaky-TestAPISwarmServicesFailedUpdate branch 3 times, most recently from d4760db to 5b19632 Compare August 2, 2026 02:33
After poll.WaitOn confirms the update is in UpdateStatePaused state, the
test previously read the running-task count exactly once and asserted
immediately with no retry. If any task was still transitioning at that
moment, the assertion would fail spuriously.

Replace the single-shot check with a poll.WaitOn using the same
defaultReconciliationTimeout, so the assertion retries until the Swarm
scheduler has stabilised the expected number of running tasks.

Signed-off-by: Gordon <GordonTheTurtle@users.noreply.github.com>
@GordonTheTurtle
GordonTheTurtle force-pushed the fix/flaky-TestAPISwarmServicesFailedUpdate branch from 5b19632 to 610ee19 Compare August 2, 2026 03:46
@GordonTheTurtle
GordonTheTurtle marked this pull request as ready for review August 2, 2026 04:51
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: TestAPISwarmServicesFailedUpdate

1 participant