Skip to content

Commit

Permalink
fix the ut
Browse files Browse the repository at this point in the history
  • Loading branch information
3AceShowHand committed Sep 12, 2023
1 parent e340480 commit 5ee7e5b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cdc/model/sink_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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)
}

0 comments on commit 5ee7e5b

Please sign in to comment.