test for sleep_until_queue_exists