Skip to content

Commit 4d75813

Browse files
authored
chore: Assert readiness directly instead of waiting on a timeout (#532)
1 parent 6daade3 commit 4d75813

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎ldclient/testing/impl/datasource/test_polling_processor.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def test_unexpected_http_error_moves_to_the_extended_regime(ignore_mock):
165165

166166
# The extended regime starts at five minutes, so only the first poll runs.
167167
wait_until(lambda: retry.next_delay > 0.1)
168-
assert not ready.wait(0.1)
168+
assert not ready.is_set()
169169
assert mock_requester.request_count == 1
170170

171171

‎ldclient/testing/impl/datasource/test_streaming.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ def test_unexpected_http_error_backs_off_a_long_way(status):
315315
wait_until(lambda: sp._retry.next_delay > NORMAL_STREAMING_CEILING_DELAY)
316316

317317
# Initialization is not falsely unblocked.
318-
assert not ready.wait(0.1)
318+
assert not ready.is_set()
319319
assert not sp.initialized()
320320
assert sp.is_alive()
321321
server.should_have_requests(1)
@@ -927,7 +927,7 @@ def test_failure_transitions_from_valid():
927927
wait_until(lambda: len(spy.statuses) == 2)
928928

929929
# The 401 is retried five minutes out, so readiness never fires.
930-
assert not ready.wait(0.1)
930+
assert not ready.is_set()
931931
server.should_have_requests(1)
932932

933933
assert len(spy.statuses) == 2

0 commit comments

Comments
 (0)