From 8c201c1779e307af85ee5f28ac530c34471fbf41 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 31 Jan 2025 09:29:34 +0100 Subject: [PATCH] tests/cp: Decrease more sleep --- tests/by-util/test_cp.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/by-util/test_cp.rs b/tests/by-util/test_cp.rs index e54e98e7e..072f78aed 100644 --- a/tests/by-util/test_cp.rs +++ b/tests/by-util/test_cp.rs @@ -611,7 +611,7 @@ fn test_cp_arg_interactive_update_overwrite_older() { // Option N let (at, mut ucmd) = at_and_ucmd!(); at.touch("b"); - std::thread::sleep(Duration::from_secs(1)); + sleep(Duration::from_millis(100)); at.touch("a"); ucmd.args(&["-i", "-u", "a", "b"]) .pipe_in("N\n") @@ -623,7 +623,7 @@ fn test_cp_arg_interactive_update_overwrite_older() { // Option Y let (at, mut ucmd) = at_and_ucmd!(); at.touch("b"); - std::thread::sleep(Duration::from_secs(1)); + sleep(Duration::from_millis(100)); at.touch("a"); ucmd.args(&["-i", "-u", "a", "b"]) .pipe_in("Y\n") @@ -2241,7 +2241,7 @@ fn test_cp_no_preserve_timestamps() { previous, ) .unwrap(); - sleep(Duration::from_secs(3)); + sleep(Duration::from_millis(100)); ucmd.arg(TEST_HELLO_WORLD_SOURCE) .arg("--no-preserve=timestamps") @@ -5686,7 +5686,7 @@ fn test_dir_perm_race_with_preserve_mode_and_ownership() { if at.dir_exists(&format!("{DEST_DIR}/{SRC_DIR}")) { break; } - std::thread::sleep(Duration::from_millis(100)); + sleep(Duration::from_millis(100)); } let mode = at.metadata(&format!("{DEST_DIR}/{SRC_DIR}")).mode(); #[allow(clippy::unnecessary_cast, clippy::cast_lossless)]