Fix race condition in test. Multiple tests running at once could cause a failure.