Skip to content

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

test(channels): add coverage for dispatch helpers and session runtime

Steven Enamakel153a76b633b4
diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/helpers_tests.rs b/crates/openhuman-core/src/channels/runtime/dispatch/helpers_tests.rs
index 008c2b6504..2e8987c603 100644
--- a/crates/openhuman-core/src/channels/runtime/dispatch/helpers_tests.rs
+++ b/crates/openhuman-core/src/channels/runtime/dispatch/helpers_tests.rs
@@ -44,7 +44,7 @@ async fn canceled_waiter_closes_handle_returned_by_in_flight_typing_start() {
});
let cancellation = tokio_util::sync::CancellationToken::new();
let waiter =
- spawn_typing_task(channel.clone(), "recipient".into(), cancellation.clone());
+ spawn_typing_task(&DispatchCtx::unbound(), channel.clone(), "recipient".into(), cancellation.clone());
channel.started.notified().await;
waiter.abort();
cancellation.cancel();
diff --git a/crates/openhuman-core/src/channels/runtime/session_tests.rs b/crates/openhuman-core/src/channels/runtime/session_tests.rs
index 2e5625f43d..6a96c2bdf5 100644
--- a/crates/openhuman-core/src/channels/runtime/session_tests.rs
+++ b/crates/openhuman-core/src/channels/runtime/session_tests.rs
@@ -103,7 +103,7 @@ async fn channel_sign_in_resumes_listener_service_after_logout() {
let observed_cleanups = Arc::clone(&cleanups);
let (started_tx, mut started_rx) = tokio::sync::mpsc::unbounded_channel();
let (cleaned_tx, mut cleaned_rx) = tokio::sync::mpsc::unbounded_channel();
- let service = spawn_channel_service_with(controller.clone(), move |session| {
+ let service = spawn_channel_service_with(&DispatchCtx::unbound(), controller.clone(), move |session| {
let starts = Arc::clone(&observed_starts);
let cleanups = Arc::clone(&observed_cleanups);
let started_tx = started_tx.clone();
@@ -168,7 +168,7 @@ async fn channel_service_created_during_logout_waits_for_sign_in() {
let starts = Arc::new(AtomicUsize::new(0));
let observed_starts = Arc::clone(&starts);
let (started_tx, mut started_rx) = tokio::sync::mpsc::unbounded_channel();
- let service = spawn_channel_service_with(controller.clone(), move |session| {
+ let service = spawn_channel_service_with(&DispatchCtx::unbound(), controller.clone(), move |session| {
let starts = Arc::clone(&observed_starts);
let started_tx = started_tx.clone();
async move {