Merge "Avoid potential race condition in test setup"