Skip to content

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

refactor(tests): split ws_loop test modules into focused test files

Steven Enamakelbce9e23e1893
diff --git a/crates/openhuman-core/src/platform/socket/ws_loop_tests_part_01_tests.rs b/crates/openhuman-core/src/platform/socket/ws_loop_dispatch_and_redirect_tests.rs
similarity index 100%
rename from crates/openhuman-core/src/platform/socket/ws_loop_tests_part_01_tests.rs
rename to crates/openhuman-core/src/platform/socket/ws_loop_dispatch_and_redirect_tests.rs
diff --git a/crates/openhuman-core/src/platform/socket/ws_loop_tests_part_02_tests.rs b/crates/openhuman-core/src/platform/socket/ws_loop_reconnect_tests.rs
similarity index 100%
rename from crates/openhuman-core/src/platform/socket/ws_loop_tests_part_02_tests.rs
rename to crates/openhuman-core/src/platform/socket/ws_loop_reconnect_tests.rs
diff --git a/crates/openhuman-core/src/platform/socket/ws_loop_tests.rs b/crates/openhuman-core/src/platform/socket/ws_loop_tests.rs
index 558c37b9da..2304522c9f 100644
--- a/crates/openhuman-core/src/platform/socket/ws_loop_tests.rs
+++ b/crates/openhuman-core/src/platform/socket/ws_loop_tests.rs
@@ -193,7 +193,7 @@ async fn spawn_mock_invalid_token_server() -> std::net::SocketAddr {
addr
}
-#[path = "ws_loop_tests_part_01_tests.rs"]
-mod part_01_tests;
-#[path = "ws_loop_tests_part_02_tests.rs"]
-mod part_02_tests;
+#[path = "ws_loop_dispatch_and_redirect_tests.rs"]
+mod dispatch_and_redirect_tests;
+#[path = "ws_loop_reconnect_tests.rs"]
+mod reconnect_tests;
diff --git a/crates/openhuman-core/src/security/credentials/ops/session_store.rs b/crates/openhuman-core/src/security/credentials/ops/session_store.rs
index 3043cd7f2e..06edee5cce 100644
--- a/crates/openhuman-core/src/security/credentials/ops/session_store.rs
+++ b/crates/openhuman-core/src/security/credentials/ops/session_store.rs
@@ -8,7 +8,10 @@ use crate::api::config::effective_backend_api_url;
use crate::api::jwt::decode_jwt_exp;
use crate::api::rest::{user_id_from_profile_payload, BackendOAuthClient};
use crate::config::Config;
-use crate::config::{default_root_openhuman_dir, pre_login_user_dir, read_active_user_id, user_openhuman_dir, write_active_user_id};
+use crate::config::{
+ default_root_openhuman_dir, pre_login_user_dir, read_active_user_id, user_openhuman_dir,
+ write_active_user_id,
+};
use crate::memory::conversations;
use crate::rpc::RpcOutcome;
use crate::security::credentials::session_support::{