test for race condition