From 838c9c499b259ed79b080ab7c071694c76a69ba9 Mon Sep 17 00:00:00 2001 From: Finomnis Date: Wed, 18 Oct 2023 22:25:26 +0200 Subject: [PATCH] Fix unix signal test --- tests/integration_test.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/integration_test.rs b/tests/integration_test.rs index 031aa24..b37d90a 100644 --- a/tests/integration_test.rs +++ b/tests/integration_test.rs @@ -907,9 +907,10 @@ async fn shutdown_through_signal() { async { let result = Toplevel::new(move |s| async move { s.start(SubsystemBuilder::new("subsys", subsystem)); - sleep(Duration::from_millis(1000)) + assert!(sleep(Duration::from_millis(1000)) .cancel_on_shutdown(&s) - .await; + .await + .is_err()); assert!(s.is_shutdown_requested()); }) .catch_signals()