Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/by-util/test_cp.rs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the other cases with sleep times of 1s or more? Did you leave them intentionally as they are?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i missed them :p

Original file line number Diff line number Diff line change
Expand Up @@ -2907,7 +2907,7 @@ fn test_copy_through_dangling_symlink_no_dereference_permissions() {
// target name link name
at.symlink_file("no-such-file", "dangle");
// 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
// | copy permissions, too
// | | from the link
Expand Down
4 changes: 2 additions & 2 deletions tests/by-util/test_install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ fn test_install_copy_then_compare_file_with_extra_mode() {

let mut file2_meta = at.metadata(file2);
let before = FileTime::from_last_modification_time(&file2_meta);
sleep(std::time::Duration::from_millis(1000));
sleep(std::time::Duration::from_millis(100));

scene
.ucmd()
Expand All @@ -594,7 +594,7 @@ fn test_install_copy_then_compare_file_with_extra_mode() {

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`
scene
Expand Down
4 changes: 2 additions & 2 deletions tests/by-util/test_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ fn test_newer_file() {
let scenario = TestScenario::new(util_name!());

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
Expand Down Expand Up @@ -949,7 +949,7 @@ fn test_file_N() {
scene.ucmd().args(&["-N", "regular_file"]).fails();
// The file will have different create/modified data
// so, test -N will return 0
sleep(std::time::Duration::from_millis(1000));
sleep(std::time::Duration::from_millis(100));
at.touch("regular_file");
scene.ucmd().args(&["-N", "regular_file"]).succeeds();
}
Expand Down
Loading