Reduce output when sqllogictest runs successfully, and run tests in parallel#6393
Reduce output when sqllogictest runs successfully, and run tests in parallel#6393alamb merged 9 commits intoapache:mainfrom
sqllogictest runs successfully, and run tests in parallel#6393Conversation
dcc1f49 to
e4b7ff7
Compare
| run_test_file(&path, relative_path).await?; | ||
| let test_files: Vec<_> = read_test_files(&options).collect(); | ||
|
|
||
| // Run all tests in parallel, reporting failures at the end |
There was a problem hiding this comment.
just wondering, if there can be a race condition if multiple tests work with table t1, and the table dropped by test who has finished first. Other test could fail.
There was a problem hiding this comment.
Each slt file runs with its own SessionContext so I think they should be isolated from one another.
I suppose if they all shared a temporary directory or something else that could be changed, that would be a problem.
Perhaps I can add some comments in various places explaining why it is important to keep the tests from having externally visible side effects so they can be parallelized
|
FYI @melgenek and @xudong963 -- I am not sure if you are interested in this PR, but if you had time to review I would be most appreciative |
melgenek
left a comment
There was a problem hiding this comment.
This looks very neat. Thank you!
| @@ -56,65 +57,116 @@ pub fn main() { | |||
|
|
|||
There was a problem hiding this comment.
The main function above for Windows creates a single-threaded executor. I made it this way by mistake.
It should be tokio::runtime::Builder::new_multi_thread().
Co-authored-by: Yevhenii Melnyk <[email protected]>
…datafusion into alamb/sqllogictest_parallel
|
Thanks everyone! |
Which issue does this PR close?
Closes #6392
Closes #4734
Rationale for this change
I want to run sqllogictests faster locally to increase development velocity
What changes are included in this PR?
Are these changes tested?
They are all tested and I tested manually in a few other scenarios:
Timings
On my 8 core laptop:
Main (10s)
This PR (2.5s)
Successful Case
Example output with a single test diff:
Example output with two files that error
Are there any user-facing changes?