Fix flake: https://ci.korifi.cf-app.com/teams/main/pipelines/main/jobs/run-tests-periodic/builds/13588 #3011
+6
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Is there a related GitHub Issue?
No
What is this change about?
The flaky test tries to check that the package cleaner has been called
for the app that the test package belongs to. However the package
cleaner is shared accorss the whole workloads suite, meaning that the
package controller can be triggered for other apps' packages. Perhaps
this is what was causing the flake:
bumped)
the test package, but the app is not the expected one because some
other test dealing with packages is running in parallel
Putting both checks under the same eventually clause will make the test
retry until both conditions are true. We have to also iterate over all
calls starting from the first recorded one up to
packageCleaner.CleanCallCount() in case several packages were cleanded
since our last check.
Here are some historical instances of this flake:
Does this PR introduce a breaking change?
No
Acceptance Steps
Green tests
Tag your pair, your PM, and/or team
@danail-branekov