Skip to content

Commit

Permalink
Make background thread test more deterministic
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Wayne Parrott committed Jul 18, 2017
1 parent f20faa1 commit f3e8d41
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/tests/unit/future/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ def test_callback_background_thread():
future.add_done_callback(callback)

assert future._polling_thread is not None

# Give the thread a second to poll
time.sleep(1)
assert future.poll_count == 1

future.event.set()
Expand Down

0 comments on commit f3e8d41

Please sign in to comment.