Skip to content

Commit

Permalink
fix unit test.
Browse files Browse the repository at this point in the history
  • Loading branch information
3AceShowHand committed Aug 18, 2023
1 parent c5ada12 commit 6f6aafc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
3 changes: 2 additions & 1 deletion cdc/sink/dmlsink/cloudstorage/defragmenter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,12 @@ func TestDeframenter(t *testing.T) {
return defrag.run(egCtx)
})

changefeedID := model.DefaultChangeFeedID("changefeed-test")
uri := "file:///tmp/test"
txnCnt := 50
sinkURI, err := url.Parse(uri)
require.Nil(t, err)

changefeedID := model.DefaultChangeFeedID("changefeed-test")
encoderConfig, err := util.GetEncoderConfig(changefeedID, sinkURI, config.ProtocolCsv,
config.GetDefaultReplicaConfig(), config.DefaultMaxMessageBytes)
require.Nil(t, err)
Expand Down
11 changes: 3 additions & 8 deletions pkg/sink/codec/canal/canal_json_row_event_encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -507,18 +507,13 @@ type jsonRowEventEncoderBuilder struct {
}

// NewJSONRowEventEncoderBuilder creates a canal-json batchEncoderBuilder.
func NewJSONRowEventEncoderBuilder(
config *common.Config,
) codec.RowEventEncoderBuilder {
return &jsonRowEventEncoderBuilder{
config: config,
}
func NewJSONRowEventEncoderBuilder(config *common.Config) codec.RowEventEncoderBuilder {
return &jsonRowEventEncoderBuilder{config: config}
}

// Build a `jsonRowEventEncoderBuilder`
func (b *jsonRowEventEncoderBuilder) Build() codec.RowEventEncoder {
encoder := newJSONRowEventEncoder(b.config)
return encoder
return newJSONRowEventEncoder(b.config)
}

func shouldIgnoreColumn(col *model.Column,
Expand Down

0 comments on commit 6f6aafc

Please sign in to comment.