cleanupOrphanedWhileMigrating.js performs a cleanupOrphans that in case of stepdown on a slow machine might delay to point to cause the assert soon to trigger.
A real example of a broken interleaving coming from BF-29780 that causing the test to fail
- A cleanupOrphans runs on a primary
- the primary becomes secondary
- cleanupOrphans fails after 5
- The operation retried due to assert.soonNoExcept
- A cleanupOrphans runs on a primary
- the primary becomes secondary
- cleanupOrphans fails after 8s
- assert.soon triggers timeout
Increasing the timeout could mitigate but not fix the issue: In assert.soonNoExcept we re-run the command until success or until we hit the timeout. The test could keep failing if step-down keeps occurring at every attempt