Skip to content

Commit a018b33

Browse files
committed
test: widen scheduling buffer in get_info suppressed-by-history test
The first send_event.wait() in test_get_info_suppressed_by_question_history only tolerated 325ms of scheduling delay (_LISTENER_TIME + max random sync delay + 5ms), which periodically flakes on Windows GitHub runners when the helper thread + asyncio loop take longer to fire the initial query. Bump both wait_time formulas by 500ms so loop iteration waits (wait_time * 0.25) absorb CI jitter while still landing every refresh inside the _DUPLICATE_QUESTION_INTERVAL (999ms) suppression window the test depends on.
1 parent dd341a3 commit a018b33

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

tests/services/test_info.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,11 @@ def get_service_info_helper(zc, type, name):
441441
args=(zc, service_type, service_name),
442442
)
443443
helper_thread.start()
444-
wait_time = (const._LISTENER_TIME + info._AVOID_SYNC_DELAY_RANDOM_INTERVAL[1] + 5) / 1000
444+
# 500ms CI buffer absorbs scheduling jitter on slow runners
445+
# (notably Windows) without compromising the timing windows
446+
# the rest of the test relies on; entries added each loop
447+
# iteration must still land inside _DUPLICATE_QUESTION_INTERVAL.
448+
wait_time = (const._LISTENER_TIME + info._AVOID_SYNC_DELAY_RANDOM_INTERVAL[1] + 500) / 1000
445449

446450
# Expect query for SRV, TXT, A, AAAA
447451
send_event.wait(wait_time)
@@ -484,7 +488,7 @@ def get_service_info_helper(zc, type, name):
484488
assert service_info is None
485489

486490
wait_time = (
487-
const._DUPLICATE_QUESTION_INTERVAL + info._AVOID_SYNC_DELAY_RANDOM_INTERVAL[1] + 5
491+
const._DUPLICATE_QUESTION_INTERVAL + info._AVOID_SYNC_DELAY_RANDOM_INTERVAL[1] + 500
488492
) / 1000
489493
# Expect no queries as all are suppressed by the question history
490494
last_sent = None

0 commit comments

Comments
 (0)