Skip to content

Fix flaky drift-detection-manager group tests: wait for the cache - #2104

Merged
gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:fix-flaky-group-stale-members-test
Nov 15, 2026
Merged

gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:fix-flaky-group-stale-members-test

Conversation

@gianlucam76

@gianlucam76 gianlucam76 commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

The specs of "clusters deleted while they are in a group" wrote the group ConfigMaps and read them back right away through testEnv.Client, which is served from a cache. A stale read made removeStaleGroupMembers miss the deleted cluster, or the final check see the old members:

Expected ["a-9meju91b8i", "a-9t2csubehc"] to consist of ["a-9meju91b8i"]

Wait with Eventually for the groups to be visible before removing stale members, and for the result afterwards. Removing stale members is retried inside the Eventually when the Deployment survives.

The specs of "clusters deleted while they are in a group" wrote the
group ConfigMaps and read them back right away through testEnv.Client,
which is served from a cache. A stale read made removeStaleGroupMembers
miss the deleted cluster, or the final check see the old members:

  Expected ["a-9meju91b8i", "a-9t2csubehc"] to consist of ["a-9meju91b8i"]

Wait with Eventually for the groups to be visible before removing stale
members, and for the result afterwards. Removing stale members is
retried inside the Eventually when the Deployment survives.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@gianlucam76
gianlucam76 merged commit 428225b into projectsveltos:main Nov 15, 2026
24 checks passed
@gianlucam76
gianlucam76 deleted the fix-flaky-group-stale-members-test branch November 15, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant