diff --git a/test/test_wrapper.py b/test/test_wrapper.py index 45d04b54a891c13c79e8eabb31481a40bf165ab4..69e2dc2db14cf4d682e2559635754764e45c8fcd 100644 --- a/test/test_wrapper.py +++ b/test/test_wrapper.py @@ -827,9 +827,17 @@ def test_event_set_callback(ctx_factory): queue.finish() + counter = 0 + # yuck - from time import sleep - sleep(0.1) + while not got_called: + from time import sleep + sleep(0.01) + + # wait up to a second + counter += 1 + if counter >= 100: + break assert got_called