We have many tests which use Thread.sleep for synchronization. This is bug prone and can introduce flakiness when running on environments with different capacities.
Ideally we should replace these with:
- Java's native syncronization mechanism (Latches, Phasers, Locks, etc)
- Nothing (i.e.; in some cases the sleep can simply be removed)