Add sleep to test_stop_listening to allow time for thread to terminate before checking thread.alive?