Test Order & Concurrency#75
Closed
paultiq wants to merge 7 commits intoduckdb:mainfrom
Closed
Conversation
… timeout and use pytest.raises with a more interruptable query
Merged
Contributor
Author
|
If interested, I'll reapply these changes to main... there's a lot of merge work to do given the recent changes. Generally, what's needed is:
|
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.
This arose from discussion
Edit: Summary
duckdb-python tests "pollute" the global state by: modifying the default duckdb connection, using local file names that aren't randomized, or otherwise break if run in the "wrong" order.
This PR fixes that:
This PR also ensures that test dependencies aren't introduced by randomizing their order & parallelizing their running.
PR
While running tests for free-threading, I found some test "contamination": tests that are order-dependent or lack isolation of resources.
* This PR makes no functional changes, only changes to tests / testing.
This PR addresses the individual tests and adds steps to detect in the future:
Added Plugins
pytest-xdist
Disabled by default. This PR adds
-n 2to packaging_wheels to run two parallel tests at a time.Comments:
-n autowas surprisingly fine. I believe Runners on public repos are 4 cores.-n 2as a first step in case any issues with the more performance intensive tests.-n.pytest-randomly
Enabled by default. Randomizes the order of tests.
Comments: