Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: - The test waits for a new call of the cleaner (eventually call count is bumped) - Then the test checks that the cleaner was called for the app owning 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: - https://ci.korifi.cf-app.com/teams/main/pipelines/main/jobs/run-tests-periodic/builds/13588 - https://ci.korifi.cf-app.com/teams/main/pipelines/main/jobs/run-tests-periodic/builds/11624 - https://ci.korifi.cf-app.com/teams/main/pipelines/main/jobs/run-tests-periodic/builds/11488 - https://ci.korifi.cf-app.com/teams/main/pipelines/main/jobs/run-tests-periodic/builds/10299
- Loading branch information