Update tests to fix race condition.