Fix race in test.