From 5ee7e5b4993a74d60b87b7662cb84792a54e960c Mon Sep 17 00:00:00 2001 From: 3AceShowHand Date: Tue, 12 Sep 2023 12:08:33 +0800 Subject: [PATCH] fix the ut --- cdc/model/sink_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cdc/model/sink_test.go b/cdc/model/sink_test.go index edc292eb928..eb899d6c109 100644 --- a/cdc/model/sink_test.go +++ b/cdc/model/sink_test.go @@ -20,6 +20,7 @@ import ( timodel "github.com/pingcap/tidb/parser/model" "github.com/pingcap/tidb/parser/mysql" "github.com/pingcap/tidb/parser/types" + "github.com/pingcap/tiflow/pkg/sink" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -597,15 +598,14 @@ func TestTrySplitAndSortUpdateEventOne(t *testing.T) { Rows: []*RowChangedEvent{ukUpdatedEvent}, } - // assume it's Kafka or storage sink. - err := txn.TrySplitAndSortUpdateEvent(true) + err := txn.TrySplitAndSortUpdateEvent(sink.KafkaScheme) require.NoError(t, err) require.Len(t, txn.Rows, 2) txn = &SingleTableTxn{ Rows: []*RowChangedEvent{ukUpdatedEvent}, } - err = txn.TrySplitAndSortUpdateEvent(false) + err = txn.TrySplitAndSortUpdateEvent(sink.MySQLScheme) require.NoError(t, err) require.Len(t, txn.Rows, 1) }