improve error message in non_blocking_logger test (#8276)
This commit is contained in:
parent
85a7cc977a
commit
f20834c373
|
@ -1691,13 +1691,11 @@ fn non_blocking_logger() -> Result<()> {
|
||||||
Ok(())
|
Ok(())
|
||||||
});
|
});
|
||||||
|
|
||||||
// Wait until the spawned task finishes or return an error in 45 seconds
|
// Wait until the spawned task finishes up to 45 seconds before shutting down tokio runtime
|
||||||
if done_rx.recv_timeout(Duration::from_secs(45)).is_err() {
|
if done_rx.recv_timeout(Duration::from_secs(45)).is_ok() {
|
||||||
return Err(eyre!("unexpected test task hang"));
|
rt.shutdown_timeout(Duration::from_secs(3));
|
||||||
}
|
}
|
||||||
|
|
||||||
rt.shutdown_timeout(Duration::from_secs(3));
|
|
||||||
|
|
||||||
match test_task_handle.now_or_never() {
|
match test_task_handle.now_or_never() {
|
||||||
Some(Ok(result)) => result,
|
Some(Ok(result)) => result,
|
||||||
Some(Err(error)) => Err(eyre!("join error: {:?}", error)),
|
Some(Err(error)) => Err(eyre!("join error: {:?}", error)),
|
||||||
|
|
Loading…
Reference in New Issue