Fix race condition in purge test.