Squashing race conditions in the tests