55 "testing"
66 "time"
77
8- "github.com/kamilsk/retry/strategy"
9-
108 . "github.com/kamilsk/retry"
9+ . "github.com/kamilsk/retry/strategy"
1110)
1211
1312func TestRetry (t * testing.T ) {
@@ -35,7 +34,7 @@ func TestRetry_PanickedAction(t *testing.T) {
3534 panic ("catch me if you can" )
3635 }
3736
38- err := Retry (nil , action , strategy . Infinite ())
37+ err := Retry (nil , action , Infinite ())
3938
4039 if nil == err {
4140 t .Error ("expected an error" )
@@ -65,7 +64,7 @@ func TestRetry_RetriesUntilNoErrorReturned(t *testing.T) {
6564 return errors .New ("error" )
6665 }
6766
68- err := Retry (nil , action , strategy . Infinite ())
67+ err := Retry (nil , action , Infinite ())
6968
7069 if nil != err {
7170 t .Error ("expected a nil error" )
@@ -81,7 +80,7 @@ func TestRetry_RetriesUntilNoErrorReturned(t *testing.T) {
8180func TestRetry_RetriesWithAlreadyDoneContext (t * testing.T ) {
8281 deadline , expected := WithTimeout (0 ), "operation timeout"
8382
84- if err := Retry (deadline , func (uint ) error { return nil }, strategy . Infinite ()); ! IsTimeout (err ) {
83+ if err := Retry (deadline , func (uint ) error { return nil }, Infinite ()); ! IsTimeout (err ) {
8584 t .Errorf ("an unexpected error. expected: %s; obtained: %v" , expected , err )
8685 }
8786}
@@ -94,7 +93,7 @@ func TestRetry_RetriesWithDeadline(t *testing.T) {
9493 return nil
9594 }
9695
97- if err := Retry (deadline , action , strategy . Infinite ()); ! IsTimeout (err ) {
96+ if err := Retry (deadline , action , Infinite ()); ! IsTimeout (err ) {
9897 t .Errorf ("an unexpected error. expected: %s; obtained: %v" , expected , err )
9998 }
10099}
0 commit comments