Skip to content

Commit

Permalink
test only delete temp path if exist
Browse files Browse the repository at this point in the history
  • Loading branch information
andygrove committed Aug 1, 2019
1 parent 178ed0c commit 5248c60
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rust/datafusion/src/execution/physical_plan/projection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ mod tests {
use std::fs::File;
use std::io::prelude::*;
use std::io::{BufReader, BufWriter};
use std::path::Path;

#[test]
fn project_first_column() -> Result<()> {
Expand Down Expand Up @@ -193,7 +194,10 @@ mod tests {

let mut dir = env::temp_dir();
dir.push(&format!("{}-{}", filename, partitions));
fs::remove_dir_all(dir.clone()).unwrap();

if Path::new(&dir).exists() {
fs::remove_dir_all(&dir).unwrap();
}
fs::create_dir(dir.clone()).unwrap();

let mut writers = vec![];
Expand Down

0 comments on commit 5248c60

Please sign in to comment.