Skip to content

Commit

Permalink
fix(runner): fix parallel testing db name duplication (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
stdrc authored Nov 1, 2023
1 parent 17d18b8 commit 857d3ae
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions sqllogictest/src/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1022,12 +1022,8 @@ impl<D: AsyncDB, M: MakeConnection<Conn = D>> Runner<D, M> {
for (idx, file) in files.enumerate() {
// for every slt file, we create a database against table conflict
let file = file.unwrap();
let db_name = file
.file_name()
.expect("not a valid filename")
.to_str()
.expect("not a UTF-8 filename");
let db_name = db_name.replace([' ', '.', '-'], "_");
let db_name = file.to_str().expect("not a UTF-8 filename");
let db_name = db_name.replace([' ', '.', '-', '/'], "_");

self.conn
.run_default(&format!("CREATE DATABASE {db_name};"))
Expand Down

0 comments on commit 857d3ae

Please sign in to comment.