Skip to content

Commit 3bfed94

Browse files
committed
Update tests
1 parent f5205af commit 3bfed94

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

tests/integration.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,21 @@
55
66
use std::fs;
77
use std::path::{Path, PathBuf};
8+
use std::sync::atomic::{AtomicU64, Ordering};
89

910
use filo::config::{Config, DuplicateAction};
1011
use filo::organizer;
1112

13+
static TMPDIR_COUNTER: AtomicU64 = AtomicU64::new(0);
14+
1215
fn tmpdir() -> std::path::PathBuf {
13-
let base = std::env::temp_dir().join(format!("filo-test-{}", nanos()));
16+
let seq = TMPDIR_COUNTER.fetch_add(1, Ordering::Relaxed);
17+
let base = std::env::temp_dir().join(format!(
18+
"filo-test-{}-{}-{}",
19+
std::process::id(),
20+
nanos(),
21+
seq
22+
));
1423
fs::create_dir_all(&base).unwrap();
1524
base
1625
}

0 commit comments

Comments
 (0)