diff --git a/core/wait/wait_test.go b/core/wait/wait_test.go index 3011c5e5..ab6a6eb8 100644 --- a/core/wait/wait_test.go +++ b/core/wait/wait_test.go @@ -67,35 +67,6 @@ func TestSetThrottle(t *testing.T) { } }) } - - f := &AsyncActionHandler[interface{}]{ - throttle: 1 * time.Minute, - } - - type fields struct { - throttle time.Duration - } - type args struct { - d time.Duration - } - tests := []struct { - name string - fields fields - args args - want *AsyncActionHandler[interface{}] - }{ - {"ok", fields{throttle: 30 * time.Second}, args{d: 1 * time.Minute}, f}, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - w := &AsyncActionHandler[interface{}]{ - throttle: tt.fields.throttle, - } - if got := w.SetThrottle(tt.args.d); !cmp.Equal(got, tt.want, cmp.AllowUnexported(AsyncActionHandler[interface{}]{})) { - t.Errorf("Wait.SetThrottle() = %v, want %v", got, tt.want) - } - }) - } } func TestSetTimeout(t *testing.T) { @@ -130,35 +101,6 @@ func TestSetTimeout(t *testing.T) { } }) } - - f := &AsyncActionHandler[interface{}]{ - throttle: 1 * time.Minute, - } - - type fields struct { - throttle time.Duration - } - type args struct { - d time.Duration - } - tests := []struct { - name string - fields fields - args args - want *AsyncActionHandler[interface{}] - }{ - {"ok", fields{throttle: 30 * time.Second}, args{d: 1 * time.Minute}, f}, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - w := &AsyncActionHandler[interface{}]{ - throttle: tt.fields.throttle, - } - if got := w.SetThrottle(tt.args.d); !cmp.Equal(got, tt.want, cmp.AllowUnexported(AsyncActionHandler[interface{}]{})) { - t.Errorf("Wait.SetThrottle() = %v, want %v", got, tt.want) - } - }) - } } func TestSetSleepBeforeWait(t *testing.T) { @@ -193,35 +135,6 @@ func TestSetSleepBeforeWait(t *testing.T) { } }) } - - f := &AsyncActionHandler[interface{}]{ - throttle: 1 * time.Minute, - } - - type fields struct { - throttle time.Duration - } - type args struct { - d time.Duration - } - tests := []struct { - name string - fields fields - args args - want *AsyncActionHandler[interface{}] - }{ - {"ok", fields{throttle: 30 * time.Second}, args{d: 1 * time.Minute}, f}, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - w := &AsyncActionHandler[interface{}]{ - throttle: tt.fields.throttle, - } - if got := w.SetThrottle(tt.args.d); !cmp.Equal(got, tt.want, cmp.AllowUnexported(AsyncActionHandler[interface{}]{})) { - t.Errorf("Wait.SetThrottle() = %v, want %v", got, tt.want) - } - }) - } } func TestSetTempErrRetryLimit(t *testing.T) { @@ -252,35 +165,6 @@ func TestSetTempErrRetryLimit(t *testing.T) { } }) } - - f := &AsyncActionHandler[interface{}]{ - throttle: 1 * time.Minute, - } - - type fields struct { - throttle time.Duration - } - type args struct { - d time.Duration - } - tests := []struct { - name string - fields fields - args args - want *AsyncActionHandler[interface{}] - }{ - {"ok", fields{throttle: 30 * time.Second}, args{d: 1 * time.Minute}, f}, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - w := &AsyncActionHandler[interface{}]{ - throttle: tt.fields.throttle, - } - if got := w.SetThrottle(tt.args.d); !cmp.Equal(got, tt.want, cmp.AllowUnexported(AsyncActionHandler[interface{}]{})) { - t.Errorf("Wait.SetThrottle() = %v, want %v", got, tt.want) - } - }) - } } func TestWaitWithContext(t *testing.T) {