Skip to content

Fix flaky test TestReconciler

Sami Hiltunen requested to merge smh-fix-flaky-reconciler-test into master

A TestReconciler's subtest is asserting that only one 'delete-replica' type job is scheduled even if multiple candidates are available. As there are two candidates, the test can schedule a 'delete-replica' job for either of the candidates. Previously this was not flaky as the query happened to be scheduling the job always for the storage-2 which came lexicographically before storage-3. This ordering is implicit in the query and thus not guaranteed. Since then, the repository ID was added to the query which changed the implicit ordering. This commit fixes the flaky test by adding 'storage-3' as the other possible delete-replica receiving storage in the test case. Now the assertion is that either the storage-2 or storage-3 receive the job but not both.

Closes: #3850 (closed)

Edited by Sami Hiltunen

Merge request reports