test(task): tell the first delay from the interval after a change

The case used a plan whose first delay equalled its interval, so re-arming at the full interval passed as well. In production the first delay is the remaining time and the interval is the full period, so the test now uses different values.
This commit is contained in:
Tunglies
2026-12-06 16:03:28 +08:00
parent 80aad98358
commit 725c5941d0
+1 -1
View File
@@ -120,7 +120,7 @@ async fn an_idle_timer_with_a_changed_interval_fires_after_the_new_first_delay()
let mut timers = KeyedTimers::new();
timers.apply(HashMap::from([("a".to_owned(), plan(60 * MINUTE, 60 * MINUTE))]));
assert_eq!(
timers.apply(HashMap::from([("a".to_owned(), plan(MINUTE, MINUTE))])),
timers.apply(HashMap::from([("a".to_owned(), plan(MINUTE, 90 * MINUTE))])),
vec![TimerChange::Updated("a".to_owned())]
);
assert!(nothing_due(&mut timers).await, "a changed timer does not fire at once");