Skip to content

Commit b735014

Browse files
committed
util/retry: fix expected time to 1ms for cancellation tests
backingOffHook advances manual time even when cancellation is immediate. Release note: None
1 parent 41ed3c6 commit b735014

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/util/retry/retry_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ func TestRetryWithMaxDuration(t *testing.T) {
469469
preRetryFunc: func() {
470470
cancelCtxFunc()
471471
},
472-
expectedTimeSpent: 0,
472+
expectedTimeSpent: time.Millisecond,
473473
expectedErr: true,
474474
},
475475
{
@@ -486,7 +486,7 @@ func TestRetryWithMaxDuration(t *testing.T) {
486486
preRetryFunc: func() {
487487
close(closeCh)
488488
},
489-
expectedTimeSpent: 0,
489+
expectedTimeSpent: time.Millisecond,
490490
expectedErr: true,
491491
},
492492
}

0 commit comments

Comments
 (0)