diff --git a/cdc/api/v2/model_test.go b/cdc/api/v2/model_test.go index 90db67e51b1..8d74c9e7e8c 100644 --- a/cdc/api/v2/model_test.go +++ b/cdc/api/v2/model_test.go @@ -49,7 +49,7 @@ var defaultAPIConfig = &ReplicaConfig{ }, EncoderConcurrency: 16, Terminator: config.CRLF, - DateSeparator: config.DateSeparatorNone.String(), + DateSeparator: config.DateSeparatorDay.String(), EnablePartitionSeparator: true, }, Consistent: &ConsistentConfig{ diff --git a/cdc/sinkv2/eventsink/cloudstorage/cloud_storage_dml_sink_test.go b/cdc/sinkv2/eventsink/cloudstorage/cloud_storage_dml_sink_test.go index 81f75769f8e..3639eefbfe7 100644 --- a/cdc/sinkv2/eventsink/cloudstorage/cloud_storage_dml_sink_test.go +++ b/cdc/sinkv2/eventsink/cloudstorage/cloud_storage_dml_sink_test.go @@ -122,6 +122,7 @@ func TestCloudStorageWriteEventsWithoutDateSeparator(t *testing.T) { require.Nil(t, err) replicaConfig := config.GetDefaultReplicaConfig() + replicaConfig.Sink.DateSeparator = config.DateSeparatorNone.String() replicaConfig.Sink.Protocol = config.ProtocolCsv.String() replicaConfig.Sink.FileIndexWidth = 6 errCh := make(chan error, 5) diff --git a/cdc/sinkv2/eventsink/cloudstorage/dml_worker_test.go b/cdc/sinkv2/eventsink/cloudstorage/dml_worker_test.go index 84f43d0f353..7556fb753f2 100644 --- a/cdc/sinkv2/eventsink/cloudstorage/dml_worker_test.go +++ b/cdc/sinkv2/eventsink/cloudstorage/dml_worker_test.go @@ -44,7 +44,9 @@ func testDMLWorker(ctx context.Context, t *testing.T, dir string) *dmlWorker { sinkURI, err := url.Parse(uri) require.Nil(t, err) cfg := cloudstorage.NewConfig() - err = cfg.Apply(context.TODO(), sinkURI, config.GetDefaultReplicaConfig()) + replicaConfig := config.GetDefaultReplicaConfig() + replicaConfig.Sink.DateSeparator = config.DateSeparatorNone.String() + err = cfg.Apply(context.TODO(), sinkURI, replicaConfig) cfg.FileIndexWidth = 6 require.Nil(t, err) diff --git a/pkg/cmd/util/helper_test.go b/pkg/cmd/util/helper_test.go index 17c1e4f994d..d96ebe9b278 100644 --- a/pkg/cmd/util/helper_test.go +++ b/pkg/cmd/util/helper_test.go @@ -201,7 +201,7 @@ func TestAndWriteExampleReplicaTOML(t *testing.T) { NullString: config.NULL, }, Terminator: "\r\n", - DateSeparator: config.DateSeparatorNone.String(), + DateSeparator: config.DateSeparatorDay.String(), EnablePartitionSeparator: true, Protocol: "open-protocol", }, cfg.Sink) diff --git a/pkg/config/replica_config.go b/pkg/config/replica_config.go index ce289c5f8dc..bc65ce26496 100644 --- a/pkg/config/replica_config.go +++ b/pkg/config/replica_config.go @@ -56,7 +56,7 @@ var defaultReplicaConfig = &ReplicaConfig{ }, EncoderConcurrency: 16, Terminator: CRLF, - DateSeparator: DateSeparatorNone.String(), + DateSeparator: DateSeparatorDay.String(), EnablePartitionSeparator: true, TiDBSourceID: 1, }, diff --git a/pkg/sink/cloudstorage/config_test.go b/pkg/sink/cloudstorage/config_test.go index faa38d106f9..994219c74b5 100644 --- a/pkg/sink/cloudstorage/config_test.go +++ b/pkg/sink/cloudstorage/config_test.go @@ -36,6 +36,7 @@ func TestConfigApply(t *testing.T) { require.Nil(t, err) replicaConfig := config.GetDefaultReplicaConfig() + replicaConfig.Sink.DateSeparator = config.DateSeparatorNone.String() err = replicaConfig.ValidateAndAdjust(sinkURI) require.NoError(t, err) cfg := NewConfig() diff --git a/pkg/sink/cloudstorage/path_test.go b/pkg/sink/cloudstorage/path_test.go index 2f0b2673ba5..6a0dbe56c4a 100644 --- a/pkg/sink/cloudstorage/path_test.go +++ b/pkg/sink/cloudstorage/path_test.go @@ -35,6 +35,7 @@ func testFilePathGenerator(ctx context.Context, t *testing.T, dir string) *FileP sinkURI, err := url.Parse(uri) require.NoError(t, err) replicaConfig := config.GetDefaultReplicaConfig() + replicaConfig.Sink.DateSeparator = config.DateSeparatorNone.String() replicaConfig.Sink.Protocol = config.ProtocolOpen.String() replicaConfig.Sink.FileIndexWidth = 6 cfg := NewConfig() diff --git a/tests/integration_tests/api_v2/cases.go b/tests/integration_tests/api_v2/cases.go index 819fec4eb09..36f7fbe0df9 100644 --- a/tests/integration_tests/api_v2/cases.go +++ b/tests/integration_tests/api_v2/cases.go @@ -121,7 +121,7 @@ var defaultReplicaConfig = &ReplicaConfig{ }, EncoderConcurrency: 16, Terminator: "\r\n", - DateSeparator: "none", + DateSeparator: "day", EnablePartitionSeparator: true, }, Consistent: &ConsistentConfig{