Skip to content

Search backend: use channels to synchronize tests so they are deterministic

Warren Gifford requested to merge cc/deterministic-tests into main

Created by: camdencheek

We've had some tests flaking because they relied on timings to determine if things were working right. Turns out, in CI, the time variability is much higher than locally, so these fail somewhat frequently. This rewrites those failing tests to synchronize with channels so we can inject ordering behavior. Yay for mockable things!

As a nice side effect, I think this also allows me to make it more clear what the tests are testing for.

Test plan

This just fixes some tests.

Merge request reports

Loading