Skip to content

Commit 0839a26

Browse files
def-claude
andauthored
ore: fix tautological backoff assertions in retry tests (#36290)
PR #33097 introduced `||` instead of `&&`, making the bounds check always pass. Restore the intended conjunction so the assertion actually validates that backoff is in (0, 10ms). Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 47ab3e6 commit 0839a26

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/ore/src/retry.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ mod tests {
770770
// The next try should indicate a next backoff of between 0 and 10ms.
771771
assert_eq!(try2.i, 1);
772772
let backoff = try2.next_backoff.unwrap();
773-
assert!(backoff > Duration::ZERO || backoff < Duration::from_millis(10));
773+
assert!(backoff > Duration::ZERO && backoff < Duration::from_millis(10));
774774

775775
// The final try should indicate that the operation is complete with a next backoff
776776
// of None.
@@ -814,7 +814,7 @@ mod tests {
814814
// The next try should indicate a next backoff of between 0 and 10ms.
815815
assert_eq!(try2.i, 1);
816816
let backoff = try2.next_backoff.unwrap();
817-
assert!(backoff > Duration::ZERO || backoff < Duration::from_millis(10));
817+
assert!(backoff > Duration::ZERO && backoff < Duration::from_millis(10));
818818

819819
// The final try should indicate that the operation is complete with a next backoff
820820
// of None.

0 commit comments

Comments
 (0)