Skip to content

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

style(cron): reformat test helpers and assertions

Steven Enamakel6a53a0c222d7
diff --git a/crates/openhuman-core/src/cron/bus_host_tests.rs b/crates/openhuman-core/src/cron/bus_host_tests.rs
index c6e48934d0..b8ae84bf5d 100644
--- a/crates/openhuman-core/src/cron/bus_host_tests.rs
+++ b/crates/openhuman-core/src/cron/bus_host_tests.rs
@@ -135,7 +135,10 @@ async fn an_expired_bound_callback_fails_closed_under_another_ambient_context()
DomainSet::full(),
crate::tools::toolpacks::ToolGroups::none(),
)
- .session_agent(format!("expired-callback-{}", uuid::Uuid::new_v4().simple())),
+ .session_agent(format!(
+ "expired-callback-{}",
+ uuid::Uuid::new_v4().simple()
+ )),
);
let expired_weak = Arc::downgrade(&expired);
let dispatch = DispatchCtx::new(Arc::clone(&expired));
@@ -151,7 +154,10 @@ async fn an_expired_bound_callback_fails_closed_under_another_ambient_context()
};
drop(dispatch);
drop(expired);
- assert!(expired_weak.upgrade().is_none(), "the bound context is truly expired before the callback");
+ assert!(
+ expired_weak.upgrade().is_none(),
+ "the bound context is truly expired before the callback"
+ );
let other = CoreContext::for_test_with_config(DomainSet::full(), config.clone()).derive_with(
ContextOverlay::new(
diff --git a/crates/openhuman-core/src/cron/documents_port.rs b/crates/openhuman-core/src/cron/documents_port.rs
index 1c80d31d24..0d8b21d643 100644
--- a/crates/openhuman-core/src/cron/documents_port.rs
+++ b/crates/openhuman-core/src/cron/documents_port.rs
@@ -311,7 +311,10 @@ static MANUAL_CLAIM_TEST_GATES: LazyLock<
#[cfg(test)]
pub(crate) fn pause_manual_claim_for_test(
job_id: &str,
-) -> (tokio::sync::oneshot::Receiver<()>, tokio::sync::oneshot::Sender<()>) {
+) -> (
+ tokio::sync::oneshot::Receiver<()>,
+ tokio::sync::oneshot::Sender<()>,
+) {
let (entered_tx, entered_rx) = tokio::sync::oneshot::channel();
let (release_tx, release_rx) = tokio::sync::oneshot::channel();
MANUAL_CLAIM_TEST_GATES
diff --git a/crates/openhuman-core/src/cron/ops_delivery_tests.rs b/crates/openhuman-core/src/cron/ops_delivery_tests.rs
index 821b7813c9..bc65f40740 100644
--- a/crates/openhuman-core/src/cron/ops_delivery_tests.rs
+++ b/crates/openhuman-core/src/cron/ops_delivery_tests.rs
@@ -528,10 +528,8 @@ async fn manual_owner_reconciles_a_lost_committed_ack_before_releasing_context()
tests::single_flight_system_job(&config, &name)
})
.await;
- let _handler = crate::cron::system_job_handlers::register(
- &name,
- Arc::new(|_| Box::pin(async { Ok(()) })),
- );
+ let _handler =
+ crate::cron::system_job_handlers::register(&name, Arc::new(|_| Box::pin(async { Ok(()) })));
let (ack_committed, allow_lost_reply) =
crate::cron::scheduler::lose_next_ack_reply_after_commit_for_test(
config.workspace_dir.clone(),
diff --git a/crates/openhuman-core/src/cron/scheduler/dispatcher.rs b/crates/openhuman-core/src/cron/scheduler/dispatcher.rs
index d88709da35..2bc3358084 100644
--- a/crates/openhuman-core/src/cron/scheduler/dispatcher.rs
+++ b/crates/openhuman-core/src/cron/scheduler/dispatcher.rs
@@ -330,7 +330,10 @@ static ACK_REPLY_LOSS_TEST_GATES: std::sync::LazyLock<
#[cfg(test)]
pub(crate) fn lose_next_ack_reply_after_commit_for_test(
workspace: PathBuf,
-) -> (tokio::sync::oneshot::Receiver<()>, tokio::sync::oneshot::Sender<()>) {
+) -> (
+ tokio::sync::oneshot::Receiver<()>,
+ tokio::sync::oneshot::Sender<()>,
+) {
let (entered_tx, entered_rx) = tokio::sync::oneshot::channel();
let (release_tx, release_rx) = tokio::sync::oneshot::channel();
ACK_REPLY_LOSS_TEST_GATES