From: Alex Crichton Date: Thu, 24 Nov 2016 17:58:46 +0000 (-0800) Subject: Make a freshness test less flaky X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~11^2~114^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c3c353d64caac92ab7395495dbaaccc17f2126ed;p=cargo.git Make a freshness test less flaky We can't rely on frobbing mtimes, need to actually just wait a whole second. --- diff --git a/tests/freshness.rs b/tests/freshness.rs index b5390a203..e6e7633ff 100644 --- a/tests/freshness.rs +++ b/tests/freshness.rs @@ -445,16 +445,15 @@ fn rebuild_tests_if_lib_changes() { "#); p.build(); - p.root().move_into_the_past(); - assert_that(p.cargo("build"), execs().with_status(0)); assert_that(p.cargo("test"), execs().with_status(0)); + sleep_ms(1000); File::create(&p.root().join("src/lib.rs")).unwrap(); - assert_that(p.cargo("build"), + assert_that(p.cargo("build").arg("-v"), execs().with_status(0)); assert_that(p.cargo("test").arg("-v"), execs().with_status(101));