From f50fa47a482791f49b8949827dd70ac425c754f4 Mon Sep 17 00:00:00 2001 From: Hare Date: Thu, 15 Oct 2026 17:55:54 +0900 Subject: [PATCH] fix: await DB cleanup in cancelled Runtime metadata test --- crates/workspace-server/src/server_db_execution_tests.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/workspace-server/src/server_db_execution_tests.rs b/crates/workspace-server/src/server_db_execution_tests.rs index 08c179e6b..4428caaa0 100644 --- a/crates/workspace-server/src/server_db_execution_tests.rs +++ b/crates/workspace-server/src/server_db_execution_tests.rs @@ -1858,8 +1858,11 @@ async fn runtime_metadata_reads_wait_off_tokio_and_db_and_retain_cancelled_host_ ); reply.finish(); observed(fixture.host_executor.drain()).await.unwrap(); + // Runtime metadata also awaits binding reads owned by the DB executor. + // Its reply can wake Host before DB reply/lifetime cleanup has finished; + // draining Host alone is not a barrier for that separately-owned job. + observed(fixture.executor.drain()).await.unwrap(); assert_eq!(leases.load(Ordering::SeqCst), 0); - fixture.executor.drain().await.unwrap(); } }