23/28
Part 5 of 6 · The worked exampleLearn

Drive both queues with the same random calls, and compare after every call

Once the slow queue has all its methods, run it and the fast one with the same random run of calls, with a fake clock that moves forward a random amount between calls, and compare what both return after every call. That tries orders nobody would write by hand, such as a lease that ends on the tick a dependency is acked.

Keep the numbers small: a handful of tasks, two or three workers, max_attempts of 2, a timeout of a few ticks. Small numbers make the edges come up often. Fix the random seed, so a failure comes back when you rerun it.

In an interview you won't have time to write it all. Saying you'd do it, and why, still counts.