This is an automated email from the ASF dual-hosted git repository.

zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new c74175961e7 Refactor YamlCDCJobConfigurationSwapperTest (#35196)
c74175961e7 is described below

commit c74175961e708326a9962c053152c7fc994e76d5
Author: Liang Zhang <zhangli...@apache.org>
AuthorDate: Mon Apr 14 22:47:04 2025 +0800

    Refactor YamlCDCJobConfigurationSwapperTest (#35196)
---
 .../config/yaml/swapper/YamlCDCJobConfigurationSwapperTest.java    | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git 
a/kernel/data-pipeline/scenario/cdc/core/src/test/java/org/apache/shardingsphere/data/pipeline/cdc/config/yaml/swapper/YamlCDCJobConfigurationSwapperTest.java
 
b/kernel/data-pipeline/scenario/cdc/core/src/test/java/org/apache/shardingsphere/data/pipeline/cdc/config/yaml/swapper/YamlCDCJobConfigurationSwapperTest.java
index 6d5659e695c..c2f0457bb13 100644
--- 
a/kernel/data-pipeline/scenario/cdc/core/src/test/java/org/apache/shardingsphere/data/pipeline/cdc/config/yaml/swapper/YamlCDCJobConfigurationSwapperTest.java
+++ 
b/kernel/data-pipeline/scenario/cdc/core/src/test/java/org/apache/shardingsphere/data/pipeline/cdc/config/yaml/swapper/YamlCDCJobConfigurationSwapperTest.java
@@ -22,7 +22,8 @@ import 
org.apache.shardingsphere.data.pipeline.cdc.config.CDCJobConfiguration.Si
 import 
org.apache.shardingsphere.data.pipeline.cdc.config.yaml.config.YamlCDCJobConfiguration;
 import 
org.apache.shardingsphere.data.pipeline.cdc.config.yaml.config.YamlCDCJobConfiguration.YamlSinkConfiguration;
 import org.apache.shardingsphere.data.pipeline.cdc.constant.CDCSinkType;
-import org.apache.shardingsphere.infra.database.mysql.type.MySQLDatabaseType;
+import org.apache.shardingsphere.infra.database.core.type.DatabaseType;
+import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader;
 import org.junit.jupiter.api.Test;
 
 import java.util.Arrays;
@@ -34,6 +35,8 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
 
 class YamlCDCJobConfigurationSwapperTest {
     
+    private final DatabaseType databaseType = 
TypedSPILoader.getService(DatabaseType.class, "FIXTURE");
+    
     @Test
     void assertSwapToObject() {
         YamlCDCJobConfiguration yamlJobConfig = new YamlCDCJobConfiguration();
@@ -54,7 +57,7 @@ class YamlCDCJobConfigurationSwapperTest {
     
     @Test
     void assertSwapToYamlConfig() {
-        CDCJobConfiguration jobConfig = new 
CDCJobConfiguration("j0302p00007a8bf46da145dc155ba25c710b550220", "test_db", 
Arrays.asList("t_order", "t_order_item"), true, new MySQLDatabaseType(),
+        CDCJobConfiguration jobConfig = new 
CDCJobConfiguration("j0302p00007a8bf46da145dc155ba25c710b550220", "test_db", 
Arrays.asList("t_order", "t_order_item"), true, databaseType,
                 null, null, null, true, new 
SinkConfiguration(CDCSinkType.SOCKET, new Properties()), 1, 1);
         YamlCDCJobConfiguration actual = new 
YamlCDCJobConfigurationSwapper().swapToYamlConfiguration(jobConfig);
         assertThat(actual.getJobId(), 
is("j0302p00007a8bf46da145dc155ba25c710b550220"));

Reply via email to