Parallelize test execution using xdist - #720
Open
koletzilla wants to merge 7 commits into
Open
Conversation
koletzilla
force-pushed
the
ClickHouse/parallel-integration-tests-main
branch
from
August 24, 2026 09:18
8923da5 to
e69480e
Compare
- Increase max_tasks_in_queue as for some high concurrency loads (-n 10, 3 consecutive runs) this may be still reached
koletzilla
force-pushed
the
ClickHouse/parallel-integration-tests-main
branch
from
August 24, 2026 17:37
e69480e to
0b64e6a
Compare
koletzilla
marked this pull request as ready for review
August 24, 2026 18:04
koletzilla
commented
Aug 24, 2026
| from dbt.tests.util import run_dbt | ||
|
|
||
| oom_table_sql = """ | ||
| SELECT a FROM system.numbers_mt GROUP BY repeat(toString(number), 100000) as a |
Contributor
Author
There was a problem hiding this comment.
This query was ok if run sequentially. If other run at the same time, it caused OOMs in the replica, making the rest of the tests to fail
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 0b64e6a. Configure here.
Contributor
Author
|
One tests if failing in a flaky way. Fixing would require a few changes so I have created an issue to track it #724 |
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 of changes
Test users (the DBT_TEST_USER problem)
Docker handling
DBT_CH_TEST_USE_DOCKERand the test session starts and stops the ClickHouse cluster for you.DBT_CH_TEST_USE_DOCKERwith-n, you get a clear error explaining what to do instead of a confusing failure.Making tests safe to run at the same time
SYSTEM FLUSH LOGSruns once per worker at startup, so system tables exist before tests query them.pytest.ini: makes pytest's doctest collector to skip conftest.py files (having several files with the same name broke imports).CI (GitHub Actions)
pytest with -n 5 --dist loadscope --timeout=300for both the HTTP and native test jobs.pytest-xdistwas added to dev_requirements.txt.Adapter fixes for flaky tests found by running in parallel
dbclient.py: command() and get_ch_setting() can now retry transient failures internally (the drivers implement the raw _command / _get_ch_setting versions). A failed check of theallow_nondeterministic_mutationssetting is no longer cached for the whole process. Before, one bad read silently disabled lightweight deletes for every later connection in that process. Warning messages now say clearly what got disabled and show the real error.nativeclient.py: reading a setting now raises a proper error instead of returning None, which used to crash with a confusing message.ClickHouse test cluster config (test_config.xml)
ON CLUSTERstatements (the "Code 999" flake).