fix test that was non-deterministic due to asynchronous queries