Skip to content

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

fix(test): handle poisoned lock in wallet endpoint test helper

Steven Enamakel4f867f218eeb
diff --git a/crates/openhuman-core/src/web3/wallet/endpoints_tests.rs b/crates/openhuman-core/src/web3/wallet/endpoints_tests.rs
index a7a43683c8..fd351fc6f3 100644
--- a/crates/openhuman-core/src/web3/wallet/endpoints_tests.rs
+++ b/crates/openhuman-core/src/web3/wallet/endpoints_tests.rs
@@ -7,7 +7,8 @@ use crate::web3::wallet::test_support::RPC_ENV_LOCK as ENDPOINT_ENV_LOCK;
fn with_env<T>(pairs: &[(&str, Option<&str>)], f: impl FnOnce() -> T) -> T {
let _guard = ENDPOINT_ENV_LOCK
- .blocking_lock();
+ .lock()
+ .unwrap_or_else(|poisoned| poisoned.into_inner());
let previous: Vec<_> = pairs
.iter()
.map(|(name, _)| (*name, std::env::var(name).ok()))