You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2022/07/18 15:44:21 UTC
[shardingsphere] branch master updated: Refactor PipelineDataSourceFactoryTest (#19332)
This is an automated email from the ASF dual-hosted git repository.
zhaojinchao 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 1704e5acfb9 Refactor PipelineDataSourceFactoryTest (#19332)
1704e5acfb9 is described below
commit 1704e5acfb9bb8bcb3339fc469ae123674386d37
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Mon Jul 18 23:44:09 2022 +0800
Refactor PipelineDataSourceFactoryTest (#19332)
---
.../pipeline/core/datasource/PipelineDataSourceFactoryTest.java | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/test/java/org/apache/shardingsphere/data/pipeline/core/datasource/PipelineDataSourceFactoryTest.java b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/test/java/org/apache/shardingsphere/data/pipeline/core/datasource/PipelineDataSourceFactoryTest.java
index 4a64766adea..9ebe8784fe0 100644
--- a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/test/java/org/apache/shardingsphere/data/pipeline/core/datasource/PipelineDataSourceFactoryTest.java
+++ b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/test/java/org/apache/shardingsphere/data/pipeline/core/datasource/PipelineDataSourceFactoryTest.java
@@ -17,7 +17,7 @@
package org.apache.shardingsphere.data.pipeline.core.datasource;
-import org.apache.shardingsphere.data.pipeline.api.datasource.PipelineDataSourceWrapper;
+import org.apache.shardingsphere.data.pipeline.api.datasource.config.PipelineDataSourceConfiguration;
import org.apache.shardingsphere.data.pipeline.api.datasource.config.impl.StandardPipelineDataSourceConfiguration;
import org.junit.Test;
@@ -28,15 +28,14 @@ import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
public final class PipelineDataSourceFactoryTest {
-
+
@Test
public void assertNewInstance() {
Map<String, Object> yamlDataSourceConfig = new HashMap<>(3, 1);
yamlDataSourceConfig.put("url", "jdbc:mysql://localhost:3306/database");
yamlDataSourceConfig.put("username", "username");
yamlDataSourceConfig.put("password", "password");
- StandardPipelineDataSourceConfiguration standardPipelineDataSourceConfiguration = new StandardPipelineDataSourceConfiguration(yamlDataSourceConfig);
- PipelineDataSourceWrapper pipelineDataSourceWrapper = PipelineDataSourceFactory.newInstance(standardPipelineDataSourceConfiguration);
- assertThat(pipelineDataSourceWrapper.getDatabaseType(), is(standardPipelineDataSourceConfiguration.getDatabaseType()));
+ PipelineDataSourceConfiguration pipelineDataSourceConfig = new StandardPipelineDataSourceConfiguration(yamlDataSourceConfig);
+ assertThat(PipelineDataSourceFactory.newInstance(pipelineDataSourceConfig).getDatabaseType(), is(pipelineDataSourceConfig.getDatabaseType()));
}
}