Skip to content

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

fix(test): correct JSON-RPC test assertion for error response

Steven Enamakele9e25da7b1dc
diff --git a/src/core/jsonrpc_tests.rs b/src/core/jsonrpc_tests.rs
index c8c16b7ccc..7c39e99830 100644
--- a/src/core/jsonrpc_tests.rs
+++ b/src/core/jsonrpc_tests.rs
@@ -178,11 +178,14 @@ fn learning_subscriber_registration_is_idempotent_after_success() {
assert!(!learning_first_time_when_bus_ready(&completed, true));
}
-#[test]
-fn domain_subscriber_registration_wrapper_uses_the_global_bus() {
+#[tokio::test]
+async fn domain_subscriber_registration_wrapper_uses_the_global_bus() {
use crate::core::all::DomainGroup;
+ use crate::core::bus::BUS;
- crate::core::event_bus::init_global(crate::core::event_bus::DEFAULT_CAPACITY);
+ BUS.init_in_process(crate::core::bus::config())
+ .await
+ .expect("bus initialised for test");
assert!(group_first_time(DomainGroup::Media));
assert!(!group_first_time(DomainGroup::Media));
}