fix timeout test race condition