mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 19:17:43 +00:00
tests: Decrease the various sleeps
This commit is contained in:
parent
dfd5885e37
commit
f00a8c231b
3 changed files with 5 additions and 5 deletions
|
@ -2907,7 +2907,7 @@ fn test_copy_through_dangling_symlink_no_dereference_permissions() {
|
||||||
// target name link name
|
// target name link name
|
||||||
at.symlink_file("no-such-file", "dangle");
|
at.symlink_file("no-such-file", "dangle");
|
||||||
// to check if access time and modification time didn't change
|
// to check if access time and modification time didn't change
|
||||||
sleep(Duration::from_millis(5000));
|
sleep(Duration::from_millis(100));
|
||||||
// don't dereference the link
|
// don't dereference the link
|
||||||
// | copy permissions, too
|
// | copy permissions, too
|
||||||
// | | from the link
|
// | | from the link
|
||||||
|
|
|
@ -577,7 +577,7 @@ fn test_install_copy_then_compare_file_with_extra_mode() {
|
||||||
|
|
||||||
let mut file2_meta = at.metadata(file2);
|
let mut file2_meta = at.metadata(file2);
|
||||||
let before = FileTime::from_last_modification_time(&file2_meta);
|
let before = FileTime::from_last_modification_time(&file2_meta);
|
||||||
sleep(std::time::Duration::from_millis(1000));
|
sleep(std::time::Duration::from_millis(100));
|
||||||
|
|
||||||
scene
|
scene
|
||||||
.ucmd()
|
.ucmd()
|
||||||
|
@ -594,7 +594,7 @@ fn test_install_copy_then_compare_file_with_extra_mode() {
|
||||||
|
|
||||||
assert!(before != after_install_sticky);
|
assert!(before != after_install_sticky);
|
||||||
|
|
||||||
sleep(std::time::Duration::from_millis(1000));
|
sleep(std::time::Duration::from_millis(100));
|
||||||
|
|
||||||
// dest file still 1644, so need_copy ought to return `true`
|
// dest file still 1644, so need_copy ought to return `true`
|
||||||
scene
|
scene
|
||||||
|
|
|
@ -381,7 +381,7 @@ fn test_newer_file() {
|
||||||
let scenario = TestScenario::new(util_name!());
|
let scenario = TestScenario::new(util_name!());
|
||||||
|
|
||||||
scenario.fixtures.touch("regular_file");
|
scenario.fixtures.touch("regular_file");
|
||||||
sleep(std::time::Duration::from_millis(1000));
|
sleep(std::time::Duration::from_millis(100));
|
||||||
scenario.fixtures.touch("newer_file");
|
scenario.fixtures.touch("newer_file");
|
||||||
|
|
||||||
scenario
|
scenario
|
||||||
|
@ -949,7 +949,7 @@ fn test_file_N() {
|
||||||
scene.ucmd().args(&["-N", "regular_file"]).fails();
|
scene.ucmd().args(&["-N", "regular_file"]).fails();
|
||||||
// The file will have different create/modified data
|
// The file will have different create/modified data
|
||||||
// so, test -N will return 0
|
// so, test -N will return 0
|
||||||
sleep(std::time::Duration::from_millis(1000));
|
sleep(std::time::Duration::from_millis(100));
|
||||||
at.touch("regular_file");
|
at.touch("regular_file");
|
||||||
scene.ucmd().args(&["-N", "regular_file"]).succeeds();
|
scene.ucmd().args(&["-N", "regular_file"]).succeeds();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue