Skip to content

Commit

Permalink
chore(test): ensure single thread runtime for sqllogictest (#657)
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Chi <[email protected]>
skyzh authored May 31, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent b05d98d commit 2d84427
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/sqllogictest/tests/sqllogictest.rs
Original file line number Diff line number Diff line change
@@ -52,13 +52,20 @@ fn main() {
);
}

fn build_runtime() -> Runtime {
tokio::runtime::Builder::new_current_thread()
.enable_all()
.build()
.unwrap()
}

run_tests(&args, tests, |test| match &test.data {
("mem", case) => {
Runtime::new().unwrap().block_on(test_mem(case));
build_runtime().block_on(test_mem(case));
Outcome::Passed
}
("disk", case) => {
Runtime::new().unwrap().block_on(test_disk(case));
build_runtime().block_on(test_disk(case));
Outcome::Passed
}
_ => unreachable!(),

0 comments on commit 2d84427

Please sign in to comment.