Skip to content

Apache DataFusion SQL Query Engine

Use the `test-threads` option in sqllogictests (#16722)

Martin Garton76ff87b132b6
diff --git a/datafusion/sqllogictest/bin/sqllogictests.rs b/datafusion/sqllogictest/bin/sqllogictests.rs
index eebd7bdf66..a4b85bdd1d 100644
--- a/datafusion/sqllogictest/bin/sqllogictests.rs
+++ b/datafusion/sqllogictest/bin/sqllogictests.rs
@@ -194,7 +194,7 @@ async fn run_tests() -> Result<()> {
.join()
})
// run up to num_cpus streams in parallel
- .buffer_unordered(get_available_parallelism())
+ .buffer_unordered(options.test_threads)
.flat_map(|result| {
// Filter out any Ok() leaving only the DataFusionErrors
futures::stream::iter(match result {
@@ -692,9 +692,10 @@ struct Options {
#[clap(
long,
- help = "IGNORED (for compatibility with built-in rust test runner)"
+ help = "Number of threads used for running tests in parallel",
+ default_value_t = get_available_parallelism()
)]
- test_threads: Option<usize>,
+ test_threads: usize,
}
impl Options {