test: widen QM follow-up window in info_asking_default test#1765
Merged
Conversation
The 50ms QUICK_REQUEST_TIMEOUT_MS budget for this test left ~35ms of headroom for the QM query that fires ~11-15ms after the QU; on macOS-latest skip_cython runs the asyncio short-sleep quantization occasionally pushed the wake past the 50ms cap, so the loop returned before the QM was sent and second_outgoing stayed None. The test only asserts that the second outgoing query is QM, the exact wall-clock budget is not part of the contract, so bump this test's timeout to 300ms; that absorbs macOS scheduling jitter without leaning on the shared QUICK_REQUEST_TIMEOUT_MS constant other tests rely on.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1765 +/- ##
=======================================
Coverage 99.77% 99.77%
=======================================
Files 33 33
Lines 3509 3509
Branches 493 493
=======================================
Hits 3501 3501
Misses 5 5
Partials 3 3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
test_info_asking_default_is_asking_qm_questions_after_the_first_quflakes on macOS-latest skip_cython; the 50msQUICK_REQUEST_TIMEOUT_MSbudget leaves about 35ms of headroom for the QM follow-up that fires at roughly 11 to 15ms after the QU, and macOS asyncio short-sleep quantization occasionally pushes the wake past the 50ms cap so the loop returns before the QM is sent andsecond_outgoingstays None.Details
QUICK_REQUEST_TIMEOUT_MSconstant that other tests rely on.QUICK_REQUEST_TIMEOUT_MSimport fromtests/test_asyncio.py.Observed in run 26185961578 on PR #1764; the failure is timing only and not related to that PR's contents.
Test plan
SKIP_CYTHON=1 poetry run pytest tests/test_asyncio.py::test_info_asking_default_is_asking_qm_questions_after_the_first_quSKIP_CYTHON=1 poetry run pytest tests/test_asyncio.py