[fix test] fix race condition causing test to fail on 0.8