summaryrefslogtreecommitdiffstats
path: root/tests/time.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/time.rs')
-rw-r--r--tests/time.rs5
1 files changed, 0 insertions, 5 deletions
diff --git a/tests/time.rs b/tests/time.rs
index 6ab0665..3d4a203 100644
--- a/tests/time.rs
+++ b/tests/time.rs
@@ -6,9 +6,6 @@ use common::Env;
#[test]
fn a_pinned_clock_moves_relative_arithmetic_with_it() {
- // The finding: `now()` honored the pinned clock but `secs_ago` and `secs_ahead`
- // read the wall clock, so a pinned test computed real-clock expiries while
- // comparing them against the pinned "now".
time::pin("2026-01-01T00:00:00Z");
assert_eq!(time::now(), "2026-01-01T00:00:00Z");
assert_eq!(time::secs_ahead(90), "2026-01-01T00:01:30Z");
@@ -40,9 +37,7 @@ fn a_lease_taken_under_a_pinned_clock_expires_against_that_clock() {
Some("2026-01-01T00:01:30Z"),
"the lease must be 90 seconds after the pinned now, not the real one"
);
- // Still inside the lease: nothing to reap.
assert_eq!(builds::reap_expired(&env.db).unwrap(), 0);
- // Ninety-one seconds of pinned time pass, and the reaper sees it.
time::pin("2026-01-01T00:01:31Z");
assert_eq!(builds::reap_expired(&env.db).unwrap(), 1);
assert_eq!(builds::get(&env.db, "b1").unwrap().unwrap().state, BuildState::Queued);