Repository navigation
tests: stop waiting out timeouts that cannot change the result - #14
Merged
Merged
Conversation
The whole suite took six minutes on Windows, more than half of it spent waiting. - A connect that finds a hub waits PREFERENCE_SECONDS for a better route to it. Simulated hubs are all heard at once, so under test that wait was only ever waited out, by every connect not made by id. An autouse fixture in the root conftest makes it 0.05 s. - With no hub switched on, each hardware test scanned for SCAN_SECONDS before skipping. The first one's answer is now kept for the rest. - test_connecting_to_a_hub_that_is_not_there waited out the full ten-second scan. It now scans for 0.3 s, as its neighbours do. Six minutes to three and a half, with nothing skipped that was not skipped before.
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.
The whole suite took about six minutes on Windows, more than half of it waiting:
PREFERENCE_SECONDSfor a better route. Simulated hubs are all heard at once, so under test every connect not made by id only ever waited this out. An autouse fixture in the root conftest makes it 0.05 s.SCAN_SECONDSbefore skipping. The first test's answer is now kept for the rest.test_connecting_to_a_hub_that_is_not_there: it waited out the full 10 s scan. It now scans for 0.3 s, as its neighbours do.Six minutes down to three and a half, with nothing skipped that wasn't skipped before.
Merging this with the
pb connectPR (the branchconnect-honors-use) needs one more line: the root conftest fixture should also shorten the newAMBIGUITY_SECONDS. The late-hub test in that PR then sets it back to 1 s.