Skip to content

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

test(security): add multi-thread test for session clearing

Steven Enamakelae2858a703b4
diff --git a/crates/openhuman-core/src/security/credentials/ops_credential_tests.rs b/crates/openhuman-core/src/security/credentials/ops_credential_tests.rs
index 198063f28c..9583e3aab7 100644
--- a/crates/openhuman-core/src/security/credentials/ops_credential_tests.rs
+++ b/crates/openhuman-core/src/security/credentials/ops_credential_tests.rs
@@ -472,6 +472,11 @@ async fn clearing_the_session_preserves_a_coexisting_api_key() {
// workspace must never outrank the key that was actually the active
// credential a moment ago. This RPC only removes the session; it must not
// let an unrelated leftover key silently become the effective one.
+// Multi-thread on purpose: the first `store_session` rebinds the workspace and
+// lists cron jobs through the synchronous store bridge, which blocks this
+// thread while the tinyflows module calls back into the host's document port.
+// On a current-thread runtime nothing is left to serve that callback and the
+// test hangs forever.
#[tokio::test(flavor = "multi_thread")]
async fn clearing_the_session_preserves_the_active_key_over_a_stale_destination_key() {
// Reaches the connector module, whose route is process-wide: hold the module