Skip to content

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

test(channels): assert first generation cleanup notification

Steven Enamakele1b207e31fea
diff --git a/crates/openhuman-core/src/channels/runtime/session_tests.rs b/crates/openhuman-core/src/channels/runtime/session_tests.rs
index 4d47547a15..7a26ca9299 100644
--- a/crates/openhuman-core/src/channels/runtime/session_tests.rs
+++ b/crates/openhuman-core/src/channels/runtime/session_tests.rs
@@ -139,6 +139,14 @@ async fn channel_sign_in_resumes_listener_service_after_logout() {
"old runtime cleanup must finish before restart"
);
assert_eq!(starts.load(Ordering::SeqCst), 2);
+ assert_eq!(
+ tokio::time::timeout(std::time::Duration::from_secs(1), cleaned_rx.recv())
+ .await
+ .expect("first generation cleanup notification")
+ .expect("cleanup notification")
+ .0,
+ 1
+ );
controller.invalidate();
assert_eq!(