From 6d0b17c2d9b23efa063ec508779276967e4ecd26 Mon Sep 17 00:00:00 2001 From: Nathan Fisher Date: Mon, 18 Dec 2023 00:12:35 -0500 Subject: [PATCH] Fix potential collisions between file and hardlink tests when run in parallel --- src/node.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node.rs b/src/node.rs index 934be9d..13bbb3b 100644 --- a/src/node.rs +++ b/src/node.rs @@ -388,7 +388,7 @@ mod tests { #[test] fn file_node() { { - let fd = fs::File::create("test/li.node").unwrap(); + let fd = fs::File::create("test/file.node").unwrap(); let mut writer = BufWriter::new(fd); let links = Mutex::new(HashMap::new()); let node = Node::from_path("test/li.txt", Algorithm::Sha256, &links).unwrap(); @@ -411,7 +411,7 @@ mod tests { node.write(&mut writer).unwrap(); } let meta = fs::metadata("test/li.txt").unwrap(); - let fd = fs::File::open("test/li.node").unwrap(); + let fd = fs::File::open("test/file.node").unwrap(); let mut reader = BufReader::new(fd); let node = Node::read(&mut reader).unwrap(); assert_eq!(meta.mode() & 0o777, node.mode as u32);