Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(bin): fix parallel testing db name duplication #194

Merged
merged 1 commit into from
Sep 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions sqllogictest-bin/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,9 @@ async fn run_parallel(
let mut create_databases = BTreeMap::new();
for file in files {
let db_name = file
.file_name()
.ok_or_else(|| anyhow!("not a valid filename"))?
.to_str()
.ok_or_else(|| anyhow!("not a UTF-8 filename"))?;
let db_name = db_name.replace([' ', '.', '-'], "_");
let db_name = db_name.replace([' ', '.', '-', '/'], "_");
eprintln!("+ Discovered Test: {db_name}");
if create_databases.insert(db_name.to_string(), file).is_some() {
return Err(anyhow!("duplicated file name found: {}", db_name));
Expand Down