We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fb1360a commit d04668aCopy full SHA for d04668a
crates/agent/src/controllers/mod.rs
@@ -407,13 +407,11 @@ mod test {
407
assert_eq!(0, next.after_seconds);
408
assert!(next.with_jitter_percent(0).compute_duration().is_zero());
409
410
- let now = Utc::now();
411
- let then = now + chrono::Duration::seconds(60);
412
- let millis = NextRun::after(then)
+ let millis = NextRun::after_minutes(1)
413
.with_jitter_percent(20)
414
.compute_duration()
415
.as_millis();
416
- assert!(millis > 59900, "duration too small, got: {millis}ms");
417
- assert!(millis < 72000, "duration too big, got: {millis}ms");
+ assert!(millis >= 60000, "duration too small, got: {millis}ms");
+ assert!(millis <= 72000, "duration too big, got: {millis}ms");
418
}
419
0 commit comments