From 6ed1601d46273745f8c25b25783015c8f3565d3d Mon Sep 17 00:00:00 2001 From: scotares Date: Sat, 21 Nov 2026 16:04:30 +0800 Subject: [PATCH 1/7] test: wait for branch, plugin and client facts instead of timing Replace the fixed polling windows that fail under runner load with the facts the flows already receive: - branch_events waits for the exec started and session state notices instead of paging history inside a ten-second timeout. - storage_session signals the branch part's release from Drop and awaits the signal; an immediate Weak assertion raced the teardown. - collaboration compares business events without the environment state inputs that an attach, detach or unload can append between reads. - the CLI harness treats EIO on a closed Linux PTY as the documented terminal-closed failure instead of panicking. --- .../tests/storage_session_flow.rs | 32 +++++++++++---- .../tests/transport_flow/branch_events.rs | 41 ++++++++----------- .../tests/transport_flow/collaboration.rs | 29 ++++++++++++- crates/dimcode/tests/support/cli_harness.rs | 5 +++ 4 files changed, 74 insertions(+), 33 deletions(-) diff --git a/crates/dim-app-server/tests/storage_session_flow.rs b/crates/dim-app-server/tests/storage_session_flow.rs index afd280cbb1..a537bc18c0 100644 --- a/crates/dim-app-server/tests/storage_session_flow.rs +++ b/crates/dim-app-server/tests/storage_session_flow.rs @@ -252,12 +252,21 @@ async fn sqlite_session_failure_rejects_writes_on_an_idle_sibling_timeline() { }).await.expect("SQLite sibling failure and cleanup completed"); } +struct Generation(Mutex>>); +impl Drop for Generation { + fn drop(&mut self) { + if let Some(sender) = self.0.lock().unwrap().take() { + let _ = sender.send(()); + } + } +} + struct RecordCleanup { timeline: Key, - _generation: Arc<()>, + _generation: Arc, } impl RecordCleanup { - fn new(names: &Names<'_>, generation: Arc<()>) -> rutis::Result { + fn new(names: &Names<'_>, generation: Arc) -> rutis::Result { Ok(Self { timeline: names.key()?, _generation: generation, @@ -306,12 +315,16 @@ async fn session_close_and_idle_unload_persist_finalizers_and_release_branch_par defaults::install(&mut builder); let generation = Arc::new(Mutex::new(Weak::new())); let mounted_generation = generation.clone(); + let released = Arc::new(Mutex::new(None)); + let mounted_released = released.clone(); builder .timeline_store(dim_agent_runtime::TimelineStoreBinding::new(store.clone())) .require_feature(Feature::new("storage-session.record-cleanup").branch( "storage-session.record-cleanup", move |names| { - let marker = Arc::new(()); + let (sender, receiver) = tokio::sync::oneshot::channel(); + *mounted_released.lock().unwrap() = Some(receiver); + let marker = Arc::new(Generation(Mutex::new(Some(sender)))); *mounted_generation.lock().unwrap() = Arc::downgrade(&marker); Ok(Box::new(RecordCleanup::new(names, marker)?)) }, @@ -339,10 +352,15 @@ async fn session_close_and_idle_unload_persist_finalizers_and_release_branch_par session.close().await.unwrap(); } drop(session); - assert!( - generation.upgrade().is_none(), - "branch part must be dropped after Session teardown (idle unload: {unloading})" - ); + let released = released.lock().unwrap().take().expect("branch part built"); + tokio::time::timeout(Duration::from_secs(30), released) + .await + .unwrap_or_else(|_| { + panic!( + "branch part must be dropped after Session teardown (idle unload: {unloading})" + ) + }) + .expect("branch part drop signalled"); let head = store.head(&key).await.unwrap(); let records = store.read(&key, 1..=head).await.unwrap(); assert_eq!( diff --git a/crates/dim-app-server/tests/transport_flow/branch_events.rs b/crates/dim-app-server/tests/transport_flow/branch_events.rs index 61768d8f69..cfcedabf01 100644 --- a/crates/dim-app-server/tests/transport_flow/branch_events.rs +++ b/crates/dim-app-server/tests/transport_flow/branch_events.rs @@ -188,17 +188,12 @@ async fn restored_task_branches_are_discovered_locally_and_named_stops_preserve_ .rpc("session.attach", json!({"sessionId":session})) .await, ); - let discovered = tokio::time::timeout(Duration::from_secs(10), async { - let mut discovered = std::collections::HashSet::new(); - while discovered.len() != 3 { - let state = client.notice("session.state").await; - assert_eq!(state["params"]["sessionId"], session); - discovered.insert(state["params"]["branchId"].as_str().unwrap().to_owned()); - } - discovered - }) - .await - .unwrap(); + let mut discovered = std::collections::HashSet::new(); + while discovered.len() != 3 { + let state = client.notice("session.state").await; + assert_eq!(state["params"]["sessionId"], session); + discovered.insert(state["params"]["branchId"].as_str().unwrap().to_owned()); + } assert_eq!( discovered, ["main".to_owned(), branches[0].clone(), branches[1].clone()] @@ -245,21 +240,17 @@ async fn restored_task_branches_are_discovered_locally_and_named_stops_preserve_ ) .await, ); - let task = tokio::time::timeout(Duration::from_secs(10), async { - loop { - let history = page(&mut client, &session, branch).await; - if let Some(event) = history["events"].as_array().unwrap().iter().find(|event| { - event["type"] == "exec" - && event["name"] == "started" - && !receipts.contains(&event["data"]["task_id"]) - }) { - break event["data"]["task_id"].clone(); - } - tokio::time::sleep(Duration::from_millis(10)).await; + let task = loop { + let notice = client.notice("session.event").await; + let params = ¬ice["params"]; + if params["branchId"] == *branch + && params["event"]["type"] == "exec" + && params["event"]["name"] == "started" + && !receipts.contains(¶ms["event"]["data"]["task_id"]) + { + break params["event"]["data"]["task_id"].clone(); } - }) - .await - .unwrap(); + }; active.push(task); } for (index, branch) in branches.iter().enumerate() { diff --git a/crates/dim-app-server/tests/transport_flow/collaboration.rs b/crates/dim-app-server/tests/transport_flow/collaboration.rs index d675844a12..9043ce9d34 100644 --- a/crates/dim-app-server/tests/transport_flow/collaboration.rs +++ b/crates/dim-app-server/tests/transport_flow/collaboration.rs @@ -1266,6 +1266,30 @@ fn agent_results(events: &[Arc]) -> Vec { .collect() } +/// The page's business events, without the environment state inputs that can +/// land between two reads when a client attaches, detaches or unloads. +fn business_events(events: &Value) -> Vec { + events + .as_array() + .unwrap() + .iter() + .filter(|event| { + !(event["type"] == "input" + && event["name"] == "message" + && event["data"]["user"].is_null() + && event["data"]["blocks"].as_array().is_some_and(|blocks| { + !blocks.is_empty() + && blocks.iter().all(|block| { + block["text"].as_str().is_some_and(|text| { + text.starts_with(" continue, + Err(error) + if cfg!(target_os = "linux") && error.raw_os_error() == Some(libc::EIO) => + { + 0 + } result => result.unwrap(), }; assert!( From ec2c735ed60ad866ee8ea0f2ba5866cdea25487f Mon Sep 17 00:00:00 2001 From: scotares Date: Sat, 21 Nov 2026 16:09:23 +0800 Subject: [PATCH 2/7] test(update): allow the app server the loaded-runner startup bound The update and recovery flows start the embedded App Server on the same loaded machine as the rest of the flow binary. Its ten-second startup inactivity bound can expire there before the daemon reports progress, and the interface closes before the dialog. These flows already take the test-only update deadline; give them the daemon startup override too. --- crates/dimcode/tests/cli_flow/staged_update.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/dimcode/tests/cli_flow/staged_update.rs b/crates/dimcode/tests/cli_flow/staged_update.rs index b5d07152ff..6175019f3d 100644 --- a/crates/dimcode/tests/cli_flow/staged_update.rs +++ b/crates/dimcode/tests/cli_flow/staged_update.rs @@ -944,6 +944,7 @@ mod recovery { .env_remove("DIMCODE_STARTUP_RETRY") .env("DIM_TEST_RELEASE_BUILD", "1") .env("DIM_TEST_UPDATE_TIMEOUT_MS", "60000") + .env("DIM_TEST_DAEMON_START_TIMEOUT_MS", "60000") .env("DIMCODE_NPM_PACKAGE", "dimcode-alpha") .env("DIMCODE_NPM_REGISTRY", registry) .env("NO_PROXY", "127.0.0.1") @@ -1089,6 +1090,7 @@ mod recovery { .env_remove("DIMCODE_STARTUP_RETRY") .env("DIM_TEST_RELEASE_BUILD", "1") .env("DIM_TEST_UPDATE_TIMEOUT_MS", "60000") + .env("DIM_TEST_DAEMON_START_TIMEOUT_MS", "60000") .env("DIMCODE_NPM_PACKAGE", "dimcode-alpha") .env("DIMCODE_NPM_REGISTRY", "http://127.0.0.1:1") .env("UPDATE_ARGS", installed.home.0.join("install-args")) @@ -1178,6 +1180,7 @@ mod recovery { .env_remove("DIMCODE_STARTUP_RETRY") .env("DIM_TEST_RELEASE_BUILD", "1") .env("DIM_TEST_UPDATE_TIMEOUT_MS", "60000") + .env("DIM_TEST_DAEMON_START_TIMEOUT_MS", "60000") .env("DIMCODE_NPM_PACKAGE", "dimcode-alpha") .env("DIMCODE_NPM_REGISTRY", registry) .env("NO_PROXY", "127.0.0.1") @@ -1346,6 +1349,7 @@ printf 'Updated launcher started\n' .env_remove("DIMCODE_UPDATE_CHECK") .env("DIM_TEST_RELEASE_BUILD", "1") .env("DIM_TEST_UPDATE_TIMEOUT_MS", "60000") + .env("DIM_TEST_DAEMON_START_TIMEOUT_MS", "60000") .env("DIMCODE_NPM_PACKAGE", "dimcode-alpha") .env("DIMCODE_NPM_REGISTRY", ®istry) .env("NO_PROXY", "127.0.0.1") @@ -1499,6 +1503,7 @@ printf 'Updated launcher started\n' .env_remove("DIMCODE_UPDATE_CHECK") .env("DIM_TEST_RELEASE_BUILD", "1") .env("DIM_TEST_UPDATE_TIMEOUT_MS", "60000") + .env("DIM_TEST_DAEMON_START_TIMEOUT_MS", "60000") .env("DIMCODE_NPM_PACKAGE", "dimcode-alpha") .env("DIMCODE_NPM_REGISTRY", ®istry) .env("NO_PROXY", "127.0.0.1") From 2474f2055d2c4e166dc19fbef8d379f7475bc7ed Mon Sep 17 00:00:00 2001 From: scotares Date: Sat, 21 Nov 2026 16:46:31 +0800 Subject: [PATCH 3/7] test(update): bound the embedded app server startup for loaded runners The update and recovery flows start the embedded App Server on the same loaded machine as the rest of the flow binary. Its ten-second plugin assembly inactivity bound can expire there, and the daemon exits before the interface shows the dialog. Add a debug-only startup bound override next to the existing test hooks, document it, and set it in those flows. --- crates/dim-app-server/src/cli.rs | 7 +++++++ crates/dim-cli/README.md | 2 +- crates/dimcode/tests/cli_flow/staged_update.rs | 5 +++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/crates/dim-app-server/src/cli.rs b/crates/dim-app-server/src/cli.rs index 174d7f16de..a69547337b 100644 --- a/crates/dim-app-server/src/cli.rs +++ b/crates/dim-app-server/src/cli.rs @@ -350,6 +350,13 @@ pub fn run_with( websocket_address: Some(([127, 0, 0, 1], 8787).into()), ..Default::default() }; + #[cfg(debug_assertions)] + if let Some(timeout) = std::env::var("DIM_TEST_APP_SERVER_STARTUP_TIMEOUT_MS") + .ok() + .and_then(|value| value.parse::().ok()) + { + config.startup_timeout = std::time::Duration::from_millis(timeout); + } let mut threads = 2usize; let mut model_config = None; let mut mock_model = false; diff --git a/crates/dim-cli/README.md b/crates/dim-cli/README.md index 5b7c1d77b2..5f5acb2b25 100644 --- a/crates/dim-cli/README.md +++ b/crates/dim-cli/README.md @@ -1769,7 +1769,7 @@ cargo test --locked -p dimcode --test cli_flow --test cli_tui_flow --test cli_se cargo clippy --locked -p dim-cli --all-targets -- -D warnings ``` -Two debug-only variables shorten the daemon startup waits for the flow tests: `DIM_TEST_DAEMON_START_TIMEOUT_MS` replaces the 10 s bound of the wait before spawning and of the spawn wait and `DIM_TEST_START_LOCK_TIMEOUT_MS` the start-lock wait's derived bound, so a test reaches an inactivity bound without waiting the production time. Two more inject build identity without recompiling: `DIM_TEST_BUILD_ID` replaces this build's artifact stamp (so a flow or a tmux scenario can stand a client and a daemon of different builds beside each other; an empty value means no stamp), and `DIM_TEST_RELEASE_BUILD` overrides the release mark (so flows can test release-gated startup recovery and `Update now` against the already-compiled debug binary; an empty value or `"0"` means a source build). `DIM_TEST_UPDATE_TIMEOUT_MS` replaces the update check's 4 s registry deadline, so a flow on a loaded runner still sees the offer. Only a debug build reads them, a release build ignores them, and the tests that set them compile only in debug builds. +Two debug-only variables shorten the daemon startup waits for the flow tests: `DIM_TEST_DAEMON_START_TIMEOUT_MS` replaces the 10 s bound of the wait before spawning and of the spawn wait and `DIM_TEST_START_LOCK_TIMEOUT_MS` the start-lock wait's derived bound, so a test reaches an inactivity bound without waiting the production time. Two more inject build identity without recompiling: `DIM_TEST_BUILD_ID` replaces this build's artifact stamp (so a flow or a tmux scenario can stand a client and a daemon of different builds beside each other; an empty value means no stamp), and `DIM_TEST_RELEASE_BUILD` overrides the release mark (so flows can test release-gated startup recovery and `Update now` against the already-compiled debug binary; an empty value or `"0"` means a source build). `DIM_TEST_UPDATE_TIMEOUT_MS` replaces the update check's 4 s registry deadline, so a flow on a loaded runner still sees the offer. `DIM_TEST_APP_SERVER_STARTUP_TIMEOUT_MS` replaces the embedded App Server's 10 s startup inactivity bound, so its plugin assembly may take longer on a loaded runner. Only a debug build reads them, a release build ignores them, and the tests that set them compile only in debug builds. The production-model flow uses the actual App Server, an API-key environment reference and a local OpenAI-compatible HTTP stream fixture. It checks the production tool list, a real file read reaching the model, and continued input on the same persisted session: diff --git a/crates/dimcode/tests/cli_flow/staged_update.rs b/crates/dimcode/tests/cli_flow/staged_update.rs index 6175019f3d..ef2ac5e8c9 100644 --- a/crates/dimcode/tests/cli_flow/staged_update.rs +++ b/crates/dimcode/tests/cli_flow/staged_update.rs @@ -945,6 +945,7 @@ mod recovery { .env("DIM_TEST_RELEASE_BUILD", "1") .env("DIM_TEST_UPDATE_TIMEOUT_MS", "60000") .env("DIM_TEST_DAEMON_START_TIMEOUT_MS", "60000") + .env("DIM_TEST_APP_SERVER_STARTUP_TIMEOUT_MS", "60000") .env("DIMCODE_NPM_PACKAGE", "dimcode-alpha") .env("DIMCODE_NPM_REGISTRY", registry) .env("NO_PROXY", "127.0.0.1") @@ -1091,6 +1092,7 @@ mod recovery { .env("DIM_TEST_RELEASE_BUILD", "1") .env("DIM_TEST_UPDATE_TIMEOUT_MS", "60000") .env("DIM_TEST_DAEMON_START_TIMEOUT_MS", "60000") + .env("DIM_TEST_APP_SERVER_STARTUP_TIMEOUT_MS", "60000") .env("DIMCODE_NPM_PACKAGE", "dimcode-alpha") .env("DIMCODE_NPM_REGISTRY", "http://127.0.0.1:1") .env("UPDATE_ARGS", installed.home.0.join("install-args")) @@ -1181,6 +1183,7 @@ mod recovery { .env("DIM_TEST_RELEASE_BUILD", "1") .env("DIM_TEST_UPDATE_TIMEOUT_MS", "60000") .env("DIM_TEST_DAEMON_START_TIMEOUT_MS", "60000") + .env("DIM_TEST_APP_SERVER_STARTUP_TIMEOUT_MS", "60000") .env("DIMCODE_NPM_PACKAGE", "dimcode-alpha") .env("DIMCODE_NPM_REGISTRY", registry) .env("NO_PROXY", "127.0.0.1") @@ -1350,6 +1353,7 @@ printf 'Updated launcher started\n' .env("DIM_TEST_RELEASE_BUILD", "1") .env("DIM_TEST_UPDATE_TIMEOUT_MS", "60000") .env("DIM_TEST_DAEMON_START_TIMEOUT_MS", "60000") + .env("DIM_TEST_APP_SERVER_STARTUP_TIMEOUT_MS", "60000") .env("DIMCODE_NPM_PACKAGE", "dimcode-alpha") .env("DIMCODE_NPM_REGISTRY", ®istry) .env("NO_PROXY", "127.0.0.1") @@ -1504,6 +1508,7 @@ printf 'Updated launcher started\n' .env("DIM_TEST_RELEASE_BUILD", "1") .env("DIM_TEST_UPDATE_TIMEOUT_MS", "60000") .env("DIM_TEST_DAEMON_START_TIMEOUT_MS", "60000") + .env("DIM_TEST_APP_SERVER_STARTUP_TIMEOUT_MS", "60000") .env("DIMCODE_NPM_PACKAGE", "dimcode-alpha") .env("DIMCODE_NPM_REGISTRY", ®istry) .env("NO_PROXY", "127.0.0.1") From 614ef8ebc924181922c61df5b555ccc7088d2b00 Mon Sep 17 00:00:00 2001 From: scotares Date: Sat, 21 Nov 2026 20:10:05 +0800 Subject: [PATCH 4/7] test(collaboration): match the serialized client-presence row The peer projection writes type, mode, user and blocks at the top level without name or data, so the previous predicate never removed the row. Match the Append input, a null user and the exact environment/clients source, and keep a unit case with a real serialized presence row plus duplicate collaboration rows. --- .../tests/transport_flow/collaboration.rs | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/crates/dim-app-server/tests/transport_flow/collaboration.rs b/crates/dim-app-server/tests/transport_flow/collaboration.rs index 9043ce9d34..4d7ba3c392 100644 --- a/crates/dim-app-server/tests/transport_flow/collaboration.rs +++ b/crates/dim-app-server/tests/transport_flow/collaboration.rs @@ -1275,13 +1275,13 @@ fn business_events(events: &Value) -> Vec { .iter() .filter(|event| { !(event["type"] == "input" - && event["name"] == "message" - && event["data"]["user"].is_null() - && event["data"]["blocks"].as_array().is_some_and(|blocks| { + && event["mode"] == "append" + && event["user"].is_null() + && event["blocks"].as_array().is_some_and(|blocks| { !blocks.is_empty() && blocks.iter().all(|block| { block["text"].as_str().is_some_and(|text| { - text.starts_with(" Vec { .collect() } +#[test] +fn environment_client_rows_are_ignored_but_collaboration_rows_are_not() { + let events = json!([ + {"sequence":1,"type":"input","mode":"append","user":null,"blocks": + [{"type":"raw","text":"1 client"}]}, + {"sequence":2,"type":"input","mode":"queue","user":{"content":[{"type":"text","text":"follow-up"}]},"blocks":[]}, + {"sequence":3,"type":"tool_call","callId":"same","name":"hold"}, + {"sequence":4,"type":"tool_call","callId":"same","name":"hold"} + ]); + assert_eq!( + business_events(&events), + events.as_array().unwrap()[1..].to_vec(), + "only the client-presence row is removed; order and duplicates stay" + ); +} + /// Each operation event has exactly one later `delivered`; each delivered /// request exactly one later `result`. Collaboration facts stay out of the /// model context. From efd707f6c5de7ca343cf0f6d01f8ccfba7ee1c83 Mon Sep 17 00:00:00 2001 From: scotares Date: Sat, 21 Nov 2026 20:10:05 +0800 Subject: [PATCH 5/7] test(update): keep startup bounds off the fake-daemon dialog cases The busy, idle, old and cancelled update cases bind their own daemon and connect to it, so neither the daemon spawn bound nor the embedded App Server startup bound is on their path. Keep both for the history-lock and recovery flows, which start the embedded server. --- crates/dimcode/tests/cli_flow/staged_update.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/crates/dimcode/tests/cli_flow/staged_update.rs b/crates/dimcode/tests/cli_flow/staged_update.rs index ef2ac5e8c9..c677c8214d 100644 --- a/crates/dimcode/tests/cli_flow/staged_update.rs +++ b/crates/dimcode/tests/cli_flow/staged_update.rs @@ -1352,8 +1352,6 @@ printf 'Updated launcher started\n' .env_remove("DIMCODE_UPDATE_CHECK") .env("DIM_TEST_RELEASE_BUILD", "1") .env("DIM_TEST_UPDATE_TIMEOUT_MS", "60000") - .env("DIM_TEST_DAEMON_START_TIMEOUT_MS", "60000") - .env("DIM_TEST_APP_SERVER_STARTUP_TIMEOUT_MS", "60000") .env("DIMCODE_NPM_PACKAGE", "dimcode-alpha") .env("DIMCODE_NPM_REGISTRY", ®istry) .env("NO_PROXY", "127.0.0.1") From 6ed23c54aa3eab48e3a7289bbffd49a761061fe6 Mon Sep 17 00:00:00 2001 From: scotares Date: Sat, 21 Nov 2026 20:10:10 +0800 Subject: [PATCH 6/7] test(branch): wait on the ended notice instead of a timed page loop Attach the first client before creating the branches, then wait on the session.event notice for the branch's completed exec. The history read after the notice still proves the started fact. --- .../tests/transport_flow/branch_events.rs | 47 +++++++++---------- 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/crates/dim-app-server/tests/transport_flow/branch_events.rs b/crates/dim-app-server/tests/transport_flow/branch_events.rs index cfcedabf01..6323b1d5c9 100644 --- a/crates/dim-app-server/tests/transport_flow/branch_events.rs +++ b/crates/dim-app-server/tests/transport_flow/branch_events.rs @@ -104,6 +104,11 @@ async fn restored_task_branches_are_discovered_locally_and_named_stops_preserve_ .await; assert_ok(&created); let session = created["result"]["sessionId"].as_str().unwrap().to_owned(); + assert_ok( + &client + .rpc("session.attach", json!({"sessionId":session})) + .await, + ); let mut branches = Vec::new(); let mut receipts = Vec::new(); let mut parent = "main".to_owned(); @@ -126,32 +131,26 @@ async fn restored_task_branches_are_discovered_locally_and_named_stops_preserve_ .as_str() .unwrap() .to_owned(); - let history = tokio::time::timeout(Duration::from_secs(10), async { - loop { - let history = page(&mut client, &session, &branch).await; - if history["events"] - .as_array() - .unwrap() - .iter() - .any(|event| event["type"] == "exec" && event["name"] == "ended") - { - break history; - } - tokio::time::sleep(Duration::from_millis(10)).await; + let task = loop { + let notice = client.notice("session.event").await; + let params = ¬ice["params"]; + if params["sessionId"] == session + && params["branchId"] == branch + && params["event"]["type"] == "exec" + && params["event"]["name"] == "ended" + && params["event"]["data"]["status"] == "completed" + { + break params["event"]["data"]["task_id"].clone(); } - }) - .await - .unwrap(); + }; + let history = page(&mut client, &session, &branch).await; let events = history["events"].as_array().unwrap(); - let started = events - .iter() - .find(|event| event["type"] == "exec" && event["name"] == "started") - .unwrap(); - let task = started["data"]["task_id"].clone(); - assert!(events.iter().any(|event| event["type"] == "exec" - && event["name"] == "ended" - && event["data"]["task_id"] == task - && event["data"]["status"] == "completed")); + assert!( + events.iter().any(|event| event["type"] == "exec" + && event["name"] == "started" + && event["data"]["task_id"] == task), + "the history carries the started fact of the ended command" + ); receipts.push(task); assert_ok( &client From 84677ffdc70f66be3ee06e890396a7b4c31f175a Mon Sep 17 00:00:00 2001 From: scotares Date: Sat, 21 Nov 2026 20:10:10 +0800 Subject: [PATCH 7/7] test(storage): bound the release wait inside the test timeout --- crates/dim-app-server/tests/storage_session_flow.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/dim-app-server/tests/storage_session_flow.rs b/crates/dim-app-server/tests/storage_session_flow.rs index a537bc18c0..e18d0a956d 100644 --- a/crates/dim-app-server/tests/storage_session_flow.rs +++ b/crates/dim-app-server/tests/storage_session_flow.rs @@ -353,7 +353,7 @@ async fn session_close_and_idle_unload_persist_finalizers_and_release_branch_par } drop(session); let released = released.lock().unwrap().take().expect("branch part built"); - tokio::time::timeout(Duration::from_secs(30), released) + tokio::time::timeout(Duration::from_secs(10), released) .await .unwrap_or_else(|_| { panic!(