From 43b5a474f9422f79b5df824e16e763f41d023931 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Wed, 15 Apr 2026 11:45:03 +0100 Subject: [PATCH] tests: Remove explicit sleep from test_api_dbus_and_http_interleaved Instead wait for the guest to stop responding on the SSH port. Signed-off-by: Rob Bradford --- cloud-hypervisor/tests/integration.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloud-hypervisor/tests/integration.rs b/cloud-hypervisor/tests/integration.rs index c009a0ed6..508e5e93d 100644 --- a/cloud-hypervisor/tests/integration.rs +++ b/cloud-hypervisor/tests/integration.rs @@ -5753,7 +5753,7 @@ mod dbus_api { guest.ssh_command("sudo shutdown -H now").unwrap(); // Wait for the guest to be fully shutdown - thread::sleep(std::time::Duration::new(20, 0)); + assert!(guest.wait_for_ssh_unresponsive(Duration::from_secs(20))); // Then shutdown the VM assert!(dbus_api.remote_command("shutdown", None));