fixing query tests for asynchronous connection