mirror of https://github.com/linkerd/linkerd2.git
Add pretty durations to panics from `assert_eventually!` (#677)
This PR adds the pretty-printing for durations I added in #676 to the panic message from the `assert_eventually!` macro added in #669. Signed-off-by: Eliza Weisman <eliza@buoyant.io>
This commit is contained in:
parent
c31f4ba993
commit
605e68dff6
|
@ -75,8 +75,10 @@ macro_rules! assert_eventually {
|
||||||
break;
|
break;
|
||||||
} else if i == $retries {
|
} else if i == $retries {
|
||||||
panic!(
|
panic!(
|
||||||
"assertion failed after {:?} (retried {} times): {}",
|
"assertion failed after {} (retried {} times): {}",
|
||||||
start_t.elapsed(), i, format_args!($($arg)+)
|
timeout::HumanDuration(start_t.elapsed()),
|
||||||
|
i,
|
||||||
|
format_args!($($arg)+)
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
::std::thread::sleep(patience);
|
::std::thread::sleep(patience);
|
||||||
|
|
Loading…
Reference in New Issue