From 1cfb7ada454d12b9f0221d7f8479a2abbd784de6 Mon Sep 17 00:00:00 2001 From: jyu6 Date: Thu, 2 Feb 2023 11:04:05 -0800 Subject: [PATCH] rename Signed-off-by: jyu6 --- pkg/forward/forward_test.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pkg/forward/forward_test.go b/pkg/forward/forward_test.go index 686e6f9106..599f601d7f 100644 --- a/pkg/forward/forward_test.go +++ b/pkg/forward/forward_test.go @@ -39,14 +39,14 @@ var ( testStartTime = time.Unix(1636470000, 0).UTC() ) -type myForwardTest struct { +type forwardTest struct { } -func (f myForwardTest) WhereTo(_ string) ([]string, error) { +func (f forwardTest) WhereTo(_ string) ([]string, error) { return []string{"to1"}, nil } -func (f myForwardTest) ApplyMap(ctx context.Context, message *isb.ReadMessage) ([]*isb.Message, error) { +func (f forwardTest) ApplyMap(ctx context.Context, message *isb.ReadMessage) ([]*isb.Message, error) { return testutils.CopyUDFTestApply(ctx, message) } @@ -70,7 +70,7 @@ func TestNewInterStepDataForward(t *testing.T) { writeMessages := testutils.BuildTestWriteMessages(int64(20), testStartTime) fetchWatermark, publishWatermark := generic.BuildNoOpWatermarkProgressorsFromBufferMap(toSteps) - f, err := NewInterStepDataForward(vertex, fromStep, toSteps, myForwardTest{}, myForwardTest{}, fetchWatermark, publishWatermark, WithReadBatchSize(5)) + f, err := NewInterStepDataForward(vertex, fromStep, toSteps, forwardTest{}, forwardTest{}, fetchWatermark, publishWatermark, WithReadBatchSize(5)) assert.NoError(t, err) assert.False(t, to1.IsFull()) assert.True(t, to1.IsEmpty()) @@ -101,14 +101,14 @@ func TestNewInterStepDataForward(t *testing.T) { <-stopped } -type myForwardDropTest struct { +type forwardDropTest struct { } -func (f myForwardDropTest) WhereTo(_ string) ([]string, error) { +func (f forwardDropTest) WhereTo(_ string) ([]string, error) { return []string{"__DROP__"}, nil } -func (f myForwardDropTest) ApplyMap(ctx context.Context, message *isb.ReadMessage) ([]*isb.Message, error) { +func (f forwardDropTest) ApplyMap(ctx context.Context, message *isb.ReadMessage) ([]*isb.Message, error) { return testutils.CopyUDFTestApply(ctx, message) } @@ -130,7 +130,7 @@ func TestNewInterStepDataForward_drop(t *testing.T) { }, }} fetchWatermark, publishWatermark := generic.BuildNoOpWatermarkProgressorsFromBufferMap(toSteps) - f, err := NewInterStepDataForward(vertex, fromStep, toSteps, myForwardDropTest{}, myForwardDropTest{}, fetchWatermark, publishWatermark, WithReadBatchSize(2)) + f, err := NewInterStepDataForward(vertex, fromStep, toSteps, forwardDropTest{}, forwardDropTest{}, fetchWatermark, publishWatermark, WithReadBatchSize(2)) assert.NoError(t, err) assert.False(t, to1.IsFull()) assert.True(t, to1.IsEmpty()) @@ -380,7 +380,7 @@ func TestNewInterStepDataForwardToOneStep(t *testing.T) { }} fetchWatermark, publishWatermark := generic.BuildNoOpWatermarkProgressorsFromBufferMap(toSteps) - f, err := NewInterStepDataForward(vertex, fromStep, toSteps, myForwardTest{}, myForwardTest{}, fetchWatermark, publishWatermark, WithReadBatchSize(2)) + f, err := NewInterStepDataForward(vertex, fromStep, toSteps, forwardTest{}, forwardTest{}, fetchWatermark, publishWatermark, WithReadBatchSize(2)) assert.NoError(t, err) assert.False(t, to1.IsFull()) assert.True(t, to1.IsEmpty()) @@ -426,7 +426,7 @@ func TestWriteToBufferError(t *testing.T) { }, }} fetchWatermark, publishWatermark := generic.BuildNoOpWatermarkProgressorsFromBufferMap(toSteps) - f, err := NewInterStepDataForward(vertex, fromStep, toSteps, myForwardTest{}, myForwardTest{}, fetchWatermark, publishWatermark, WithReadBatchSize(10)) + f, err := NewInterStepDataForward(vertex, fromStep, toSteps, forwardTest{}, forwardTest{}, fetchWatermark, publishWatermark, WithReadBatchSize(10)) assert.NoError(t, err) assert.False(t, to1.IsFull()) assert.True(t, to1.IsEmpty())