From 1c231e0fd1186155429764e7157197c0f7bbed5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Sun, 27 Dec 2020 18:19:01 +0000 Subject: [PATCH] use in-memory fs to speed tests up --- tests/concurrency_tests.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/concurrency_tests.rs b/tests/concurrency_tests.rs index 6f29184..cc09192 100644 --- a/tests/concurrency_tests.rs +++ b/tests/concurrency_tests.rs @@ -28,9 +28,7 @@ mod must { assert_eq!(finished_backup_runs.len(), parallel_backups_number); assert!(data_weight(&repository_path)? > 0); - let target_directory = tempfile::tempdir()?.into_path(); - let target_path: VfsPath = PhysicalFS::new(target_directory).into(); - let target_path = target_path.join(&format!("target-{}", getpid()))?; + let target_path: VfsPath = random_in_memory_path("target")?; let all_restored_files = restore_all(&repository_path, &target_path)?; assert_eq!(all_restored_files.len(), total_number_of_files);