Repository navigation
Conversation
A full test run leaves about 6.4 GB of temporary files. pytest now deletes the tmp_path of a test that passed when the test ends (tmp_path_retention_policy = "failed"). pytest then gives the deleted folder's name to the next test with the same name prefix. Some tests leave a reader open, and DuckDB keeps one database per file path while a connection is open, so the next test read the earlier test's control.duckdb. A tmp_path fixture in the root conftest.py now gives each test its own subfolder with a random name. The CI pytest steps also pass --durations=25, so each log lists the slowest tests.
The three CI pytest steps set TMPDIR=/dev/shm, so pytest writes its temporary files to memory instead of the runner's disk.
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.
Experiment: does the CI runner's disk slow the tests down? With 4 workers on each side, the CI pytest steps are still about 5 times slower than a local run, and the CPU alone explains only about 2.8 times. A full run leaves about 6.4 GB of temporary files.
This PR has two commits, pushed one at a time, so that each CI run measures one change:
tmp_pathof each passing test (tmp_path_retention_policy = "failed"). pytest then gives a deleted folder's name to the next test with the same name prefix, so a fixture in the rootconftest.pygives each test its own subfolder with a random name. Without it, 12 tests failed. Some tests leave a reader open, and DuckDB keeps one database per file path while a connection is open, so a later test read an earlier test'scontrol.duckdb. The CI pytest steps also pass--durations=25.TMPDIR=/dev/shmon the CI pytest steps, so the temporary files stay in memory.The PR is a draft, so CI runs only the
quickjob, which includes the unit tests.Checks run:
make check,make lint-fix,make check-ci,make test(2,896 passed, 2 skipped, 2 xfailed),make test-unit(1,655 passed) andmake test-connectors.