@@ -14,25 +14,25 @@ import (
1414 "go.llib.dev/testcase"
1515)
1616
17- func TestEventually (t * testing.T ) {
18- SpecEventually (t )
17+ func TestRetry (t * testing.T ) {
18+ SpecRetry (t )
1919}
2020
2121func BenchmarkEventually (b * testing.B ) {
22- SpecEventually (b )
22+ SpecRetry (b )
2323}
2424
25- func SpecEventually (tb testing.TB ) {
25+ func SpecRetry (tb testing.TB ) {
2626 s := testcase .NewSpec (tb )
2727
2828 var (
2929 strategyWillRetry = testcase.Var [bool ]{ID : `retry strategy will retry` }
3030 strategyStub = testcase .Let (s , func (t * testcase.T ) * stubRetryStrategy {
3131 return & stubRetryStrategy {ShouldRetry : strategyWillRetry .Get (t )}
3232 })
33- helper = testcase .Let (s , func (t * testcase.T ) * assert.Eventually {
34- return & assert.Eventually {
35- RetryStrategy : strategyStub .Get (t ),
33+ helper = testcase .Let (s , func (t * testcase.T ) * assert.Retry {
34+ return & assert.Retry {
35+ Strategy : strategyStub .Get (t ),
3636 }
3737 })
3838 )
@@ -353,8 +353,8 @@ func SpecEventually(tb testing.TB) {
353353}
354354
355355func TestRetry_Assert_failsOnceButThenPass (t * testing.T ) {
356- w := assert.Eventually {
357- RetryStrategy : assert.Waiter {
356+ w := assert.Retry {
357+ Strategy : assert.Waiter {
358358 WaitDuration : 0 ,
359359 Timeout : 42 * time .Second ,
360360 },
@@ -388,8 +388,8 @@ func TestRetry_Assert_failsOnceButThenPass(t *testing.T) {
388388
389389func TestRetry_Assert_panic (t * testing.T ) {
390390 rnd := random .New (random.CryptoSeed {})
391- w := assert.Eventually {
392- RetryStrategy : assert .RetryStrategyFunc (func (condition func () bool ) {
391+ w := assert.Retry {
392+ Strategy : assert .RetryStrategyFunc (func (condition func () bool ) {
393393 for condition () {
394394 }
395395 }),
@@ -488,11 +488,11 @@ func TestRetryCount_While(t *testing.T) {
488488 })
489489}
490490
491- func TestEventuallyWithin (t * testing.T ) {
491+ func TestMakeRetry (t * testing.T ) {
492492 t .Run ("time.Duration" , func (t * testing.T ) {
493493 t .Run ("on timeout" , func (t * testing.T ) {
494494 it := assert .MakeIt (t )
495- e := assert .EventuallyWithin (time .Millisecond )
495+ e := assert .MakeRetry (time .Millisecond )
496496 dtb := & doubles.TB {}
497497
498498 t1 := time .Now ()
@@ -506,7 +506,7 @@ func TestEventuallyWithin(t *testing.T) {
506506 })
507507 t .Run ("within the time" , func (t * testing.T ) {
508508 it := assert .MakeIt (t )
509- e := assert .EventuallyWithin (time .Millisecond )
509+ e := assert .MakeRetry (time .Millisecond )
510510 dtb := & doubles.TB {}
511511
512512 t1 := time .Now ()
@@ -522,7 +522,7 @@ func TestEventuallyWithin(t *testing.T) {
522522 t .Run ("retry count" , func (t * testing.T ) {
523523 t .Run ("out of count" , func (t * testing.T ) {
524524 it := assert .MakeIt (t )
525- e := assert .EventuallyWithin (3 )
525+ e := assert .MakeRetry (3 )
526526 dtb := & doubles.TB {}
527527
528528 e .Assert (dtb , func (it assert.It ) {
@@ -534,7 +534,7 @@ func TestEventuallyWithin(t *testing.T) {
534534 t .Run ("within the count" , func (t * testing.T ) {
535535 it := assert .MakeIt (t )
536536
537- e := assert .EventuallyWithin (3 )
537+ e := assert .MakeRetry (3 )
538538 dtb := & doubles.TB {}
539539
540540 n := 3
0 commit comments