Skip to content

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

test(cron): read the imported run counter in its v2 shape

M3gA-Mind0a46f90421b7
diff --git a/crates/openhuman-core/src/cron/documents_port_tests.rs b/crates/openhuman-core/src/cron/documents_port_tests.rs
index 6d5016a0fe..d24deefe19 100644
--- a/crates/openhuman-core/src/cron/documents_port_tests.rs
+++ b/crates/openhuman-core/src/cron/documents_port_tests.rs
@@ -146,13 +146,15 @@ async fn schedule_store_migration_moves_legacy_jobs_runs_and_counter_before_read
"successful migration retires {collection}/{id}"
);
}
+ // v1 kept the next run number to hand out; the v2 counter (`{value}`)
+ // holds the last one issued, so the next run is still number 8.
assert_eq!(
docs.get("tsd.counters", "cron/runs")
.await
.unwrap()
.expect("the imported counter remains readable")
- .doc["next"],
- 8
+ .doc["value"],
+ 7
);
for progress in [
"cron/cron.jobs/jobs_v2",