Skip to content

Commit 274c162

Browse files
committed
Fix path::deep_dependencies_trigger_rebuild often failing in CI
1 parent 1f49100 commit 274c162

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/testsuite/path.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,11 +343,11 @@ fn deep_dependencies_trigger_rebuild() {
343343
//
344344
// We base recompilation off mtime, so sleep for at least a second to ensure
345345
// that this write will change the mtime.
346-
sleep_ms(1000);
347346
File::create(&p.root().join("baz/src/baz.rs"))
348347
.unwrap()
349348
.write_all(br#"pub fn baz() { println!("hello!"); }"#)
350349
.unwrap();
350+
sleep_ms(1000);
351351
p.cargo("build")
352352
.with_stderr(&format!(
353353
"[COMPILING] baz v0.5.0 ({}/baz)\n\
@@ -361,7 +361,6 @@ fn deep_dependencies_trigger_rebuild() {
361361
)).run();
362362

363363
// Make sure an update to bar doesn't trigger baz
364-
sleep_ms(1000);
365364
File::create(&p.root().join("bar/src/bar.rs"))
366365
.unwrap()
367366
.write_all(
@@ -370,6 +369,7 @@ fn deep_dependencies_trigger_rebuild() {
370369
pub fn bar() { println!("hello!"); baz::baz(); }
371370
"#,
372371
).unwrap();
372+
sleep_ms(1000);
373373
p.cargo("build")
374374
.with_stderr(&format!(
375375
"[COMPILING] bar v0.5.0 ({}/bar)\n\

0 commit comments

Comments
 (0)