diff --git a/destination_middleware_test.go b/destination_middleware_test.go index 5349f96..7890c7e 100644 --- a/destination_middleware_test.go +++ b/destination_middleware_test.go @@ -40,18 +40,18 @@ func TestDestinationWithBatch_Open(t *testing.T) { dst := NewMockDestination(gomock.NewController(t)) dst.EXPECT().Open(gomock.Any()).Return(nil) - mw := DestinationWithBatch{ + underTest := DestinationWithBatch{ BatchSize: 10, BatchDelay: 123 * time.Second, } - d := mw.Wrap(dst) + d := underTest.Wrap(dst) ctx := (&destinationWithBatch{}).setBatchConfig(context.Background(), DestinationWithBatch{}) err := d.Open(ctx) is.NoErr(err) is.NoErr(err) - is.Equal(mw, (&destinationWithBatch{}).getBatchConfig(ctx)) + is.Equal(underTest, (&destinationWithBatch{}).getBatchConfig(ctx)) } // -- DestinationWithRateLimit ------------------------------------------------- diff --git a/go.mod b/go.mod index 987b81c..fa0ffe4 100644 --- a/go.mod +++ b/go.mod @@ -20,6 +20,7 @@ require ( github.com/twmb/go-cache v1.2.1 go.uber.org/goleak v1.3.0 go.uber.org/mock v0.5.0 + golang.org/x/sync v0.9.0 golang.org/x/time v0.8.0 golang.org/x/tools v0.27.0 google.golang.org/grpc v1.68.0 @@ -217,7 +218,6 @@ require ( golang.org/x/exp/typeparams v0.0.0-20241108190413-2d47ceb2692f // indirect golang.org/x/mod v0.22.0 // indirect golang.org/x/net v0.31.0 // indirect - golang.org/x/sync v0.9.0 // indirect golang.org/x/sys v0.27.0 // indirect golang.org/x/text v0.20.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240930140551-af27646dc61f // indirect