Fix bad atomic unit test locking