nats nak w/ shared retry_backoff, exhausted log; no 'will retry' lie
This commit is contained in:
@@ -91,3 +91,18 @@ fn consumer_max_deliver_drift_is_updated() {
|
||||
};
|
||||
assert!(consumer_config_update(&same, 5).is_none());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn nak_delay_follows_the_shared_backoff_by_delivery_count() {
|
||||
let secs = |d| nak_plan(d, 5).delay.as_secs();
|
||||
assert_eq!((secs(1), secs(2), secs(3), secs(4)), (10, 20, 40, 80));
|
||||
assert_eq!(nak_plan(50, 100).delay.as_secs(), 300);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn only_the_final_delivery_is_exhausted() {
|
||||
assert!(!nak_plan(4, 5).exhausted);
|
||||
assert!(nak_plan(5, 5).exhausted);
|
||||
assert!(nak_plan(6, 5).exhausted);
|
||||
assert!(!nak_plan(1_000, -1).exhausted, "-1 means unlimited");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user