Skip to content

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

test(cron): read job before forcing due to run legacy import

Steven Enamakel186c62e0956d
diff --git a/crates/openhuman-core/src/cron/scheduler_dispatch_tests.rs b/crates/openhuman-core/src/cron/scheduler_dispatch_tests.rs
index b4cfcc8677..2f61db1c8d 100644
--- a/crates/openhuman-core/src/cron/scheduler_dispatch_tests.rs
+++ b/crates/openhuman-core/src/cron/scheduler_dispatch_tests.rs
@@ -370,6 +370,8 @@ async fn an_upgraded_job_with_a_side_table_policy_keeps_firing_with_it() {
.unwrap();
}
+ // Reading first runs the legacy import, which the direct write below skips.
+ cron::get_job(&config, shell_id).unwrap();
force_due(&config, shell_id);
let job = cron::get_job(&config, shell_id).unwrap();
assert_eq!(job.policy.retries, Some(0));