Skip to content

Commit

Permalink
rt_common: temp: show elapsed duration to investigate CI issues
Browse files Browse the repository at this point in the history
  • Loading branch information
fengalin committed Dec 24, 2019
1 parent 706261b commit fc1e764
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions tokio/tests/rt_basic_throttling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ fn delay_at_root_one_time_frame_1_2() {

// Discard this check for macos as CI behavior regarding time is not consistent
#[cfg(not(target_os = "macos"))]
assert!(_elapsed >= dur);
assert_eq!(_elapsed, dur);
// TEMP
//assert!(_elapsed >= dur);
// delay is created during the first time frame
// and must be fired at the beginning of the next time frame
// Discard this check for macos as CI behavior regarding time is not consistent
Expand Down Expand Up @@ -136,7 +138,9 @@ fn delay_in_spawn_one_time_frame_1_2() {

// Discard this check for macos as CI behavior regarding time is not consistent
#[cfg(not(target_os = "macos"))]
assert!(_elapsed >= dur);
assert_eq!(_elapsed, dur);
// TEMP
//assert!(_elapsed >= dur);
// delay is created during the first time frame
// and must be fired at the beginning of the next time frame
// Discard this check for macos as CI behavior regarding time is not consistent
Expand Down
8 changes: 6 additions & 2 deletions tokio/tests/rt_common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,9 @@ rt_test! {
time::delay_for(dur).await;
});

assert!(now.elapsed() >= dur);
// TEMP: this is to trace behaviour in CI
//assert!(now.elapsed() >= dur);
assert_eq!(now.elapsed(), dur);
}

#[test]
Expand All @@ -371,7 +373,9 @@ rt_test! {
assert_ok!(rx.await);
});

assert!(now.elapsed() >= dur);
// TEMP: this is to trace behaviour in CI
//assert!(now.elapsed() >= dur);
assert_eq!(now.elapsed(), dur);
}

#[test]
Expand Down

0 comments on commit fc1e764

Please sign in to comment.