qa: Remove polling loop from test_runner #13384
Closed
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.
My initial design for parallel tests was a busy loop (busy waiting) that polls the running processes every half a second.
Using pythons own
ThreadPoolExecutor
makes the code smaller and hopefully easier to read/understand. By removing the half-a-second overhead, I believe the tests run now slightly faster (Verified on my workstation, but should also be verified by one of the reviewers, ideally)This is refactoring beside the following changes:
--failfast
will now wait for unfinished jobs (similar to a failure inmake
)portseed_offset
is no longer applied. This is no longer required since we already kill leftover processes (see [qa] Ensure bitcoind processes are cleaned up when tests end #12904). This "fixes" Travis: failed to bind to port 11211 #10869 because we deterministically pick ports starting at 11000