Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ufoscout committed Jun 10, 2024
1 parent ea93f0f commit 5f6b0d6
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions ic-task-scheduler/src/retry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,22 +335,21 @@ pub mod test {
assert!(RetryPolicy::None.should_retry(0));
assert!(!RetryPolicy::None.should_retry(1));
assert!(!RetryPolicy::None.should_retry(u32::MAX));
assert!(!RetryPolicy::None.should_retry(u32::MAX-1));
assert!(!RetryPolicy::None.should_retry(u32::MAX - 1));

assert!(RetryPolicy::MaxRetries { retries: 0 }.should_retry(0));
assert!(!RetryPolicy::MaxRetries { retries: 0 }.should_retry(1));
assert!(!RetryPolicy::MaxRetries { retries: 0 }.should_retry(u32::MAX-1));
assert!(!RetryPolicy::MaxRetries { retries: 0 }.should_retry(u32::MAX - 1));
assert!(!RetryPolicy::MaxRetries { retries: 0 }.should_retry(u32::MAX));

assert!(RetryPolicy::MaxRetries { retries: u32::MAX }.should_retry(0));
assert!(RetryPolicy::MaxRetries { retries: u32::MAX }.should_retry(1));
assert!(RetryPolicy::MaxRetries { retries: u32::MAX }.should_retry(u32::MAX-1));
assert!(RetryPolicy::MaxRetries { retries: u32::MAX }.should_retry(u32::MAX - 1));
assert!(RetryPolicy::MaxRetries { retries: u32::MAX }.should_retry(u32::MAX));

assert!(RetryPolicy::Infinite.should_retry(0));
assert!(RetryPolicy::Infinite.should_retry(1));
assert!(RetryPolicy::Infinite.should_retry(u32::MAX));
assert!(RetryPolicy::Infinite.should_retry(u32::MAX-1));

assert!(RetryPolicy::Infinite.should_retry(u32::MAX - 1));
}
}

0 comments on commit 5f6b0d6

Please sign in to comment.