Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(test): update test to reflect new session timeout behavior

Steven Enamakel884a21c08e58
diff --git a/crates/openhuman-session/src/manager_tests.rs b/crates/openhuman-session/src/manager_tests.rs
index b40015e8be..a11719d618 100644
--- a/crates/openhuman-session/src/manager_tests.rs
+++ b/crates/openhuman-session/src/manager_tests.rs
@@ -184,8 +184,18 @@ async fn a_failed_confirmation_handoff_keeps_the_revalidation_loop_retrying() {
// Let the loop's first attempt (after REVALIDATION_INITIAL_DELAY) run.
tokio::time::sleep(REVALIDATION_INITIAL_DELAY + Duration::from_millis(500)).await;
+ // `revalidation` only clears on an explicit `cancel_revalidation()`, so
+ // `is_some()` alone would stay true even after the spawned task itself
+ // returned; check `is_finished()` on the stored handle to know whether
+ // the loop is still actually running.
+ let still_running = m
+ .revalidation
+ .lock()
+ .unwrap()
+ .as_ref()
+ .is_some_and(|handle| !handle.is_finished());
assert!(
- m.revalidation.lock().unwrap().is_some(),
+ still_running,
"a failed confirmation handoff must not exit the revalidation loop"
);
assert_eq!(