add test for disconnect handler
add query to connect test to force wait for connection