The most frequent failure in functional tests are intermittent races. Fixing such bugs is cumbersome because it involves:
- Noticing the failure
- Fetching and reading the log to determine the test case that failed
- Adding a
self.sync_all()
where it was forgotten - Spamming out a pr and waiting for review, which is already sparse
Also, writing a linter to catch those is not possible, nor is review effective in finding these bugs prior to merge.
Fix all future intermittent races caused by a missing sync_block call by calling sync_all
implicitly after each generate*
, unless opted out. This ensures that the code is race-free (with regards to blocks) when the tests pass once, instead of our current approach where the code can never be guaranteed to be race-free.