This is an automated email from the ASF dual-hosted git repository.
panjuan 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 086af06fdbd Move unit test classes from it-pipeline to core module
(#24832)
086af06fdbd is described below
commit 086af06fdbdf873cf9390c9fa5de98f50645e5cc
Author: Hongsheng Zhong <[email protected]>
AuthorDate: Sun Mar 26 17:08:43 2023 +0800
Move unit test classes from it-pipeline to core module (#24832)
---
kernel/data-pipeline/core/pom.xml | 6 ++++++
.../api/datanode/JobDataNodeEntryTest.java | 3 +--
.../pipeline/api/datanode/JobDataNodeLineTest.java | 4 +---
.../config/yaml/YamlJdbcConfigurationTest.java | 3 +--
.../InventoryIncrementalJobItemProgressTest.java | 15 ++++++-------
...ntoryIncrementalJobItemProgressSwapperTest.java | 12 +++++------
.../data/pipeline/api/job/type/FixtureJobType.java | 25 +++++++---------------
.../datasource/AbstractDataSourceCheckerTest.java | 3 +--
.../pipeline/core/execute/ExecuteEngineTest.java | 4 +---
.../core/importer/DataRecordMergerTest.java | 3 +--
.../ingest/channel/memory/ManualBitSetTest.java | 3 +--
.../memory/MultiplexMemoryPipelineChannelTest.java | 5 ++---
.../position}/FixturePositionInitializer.java | 2 +-
.../position/IntegerPrimaryKeyPositionTest.java | 2 +-
.../ingest/position/NoUniqueKeyPositionTest.java | 2 +-
.../ingest/position/PlaceholderPositionTest.java | 2 +-
.../position/StringPrimaryKeyPositionTest.java | 2 +-
.../position/UnsupportedKeyPositionTest.java | 2 +-
.../core/ingest/record/DataRecordTest.java | 2 +-
.../StandardPipelineTableMetaDataLoaderTest.java | 3 +--
.../metadata/model/PipelineTableMetaDataTest.java | 2 +-
.../metadata/node/PipelineMetaDataNodeTest.java | 11 +++++-----
.../data/pipeline/core/record/RecordUtilsTest.java | 3 +--
.../FixturePipelineSQLBuilder.java | 2 +-
.../core/sqlbuilder/H2PipelineSQLBuilder.java | 6 ++----
.../core}/sqlbuilder/PipelineSQLBuilderTest.java | 5 ++---
...ipeline.spi.ingest.position.PositionInitializer | 2 +-
...data.pipeline.spi.sqlbuilder.PipelineSQLBuilder | 3 ++-
.../test/resources/job-progress-all-finished.yaml | 0
.../src/test/resources/job-progress-failure.yaml | 0
.../src/test/resources/job-progress-running.yaml | 0
.../core}/src/test/resources/job-progress.yaml | 0
.../util/ConsistencyCheckSequenceTest.java | 3 +--
...neSQLBuilder.java => H2PipelineSQLBuilder.java} | 2 +-
.../core/prepare/InventoryTaskSplitterTest.java | 2 +-
.../core/util/JobConfigurationBuilder.java | 5 +++--
.../pipeline/core/util/PipelineContextUtil.java | 5 +++--
...data.pipeline.spi.sqlbuilder.PipelineSQLBuilder | 2 +-
.../test/util/ConfigurationFileUtils.java} | 6 +++---
39 files changed, 72 insertions(+), 90 deletions(-)
diff --git a/kernel/data-pipeline/core/pom.xml
b/kernel/data-pipeline/core/pom.xml
index ff39d34cf12..ab876c5a4cd 100644
--- a/kernel/data-pipeline/core/pom.xml
+++ b/kernel/data-pipeline/core/pom.xml
@@ -76,5 +76,11 @@
<version>${project.version}</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-test-fixture-jdbc</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/api/datanode/JobDataNodeEntryTest.java
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/api/datanode/JobDataNodeEntryTest.java
similarity index 93%
rename from
test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/api/datanode/JobDataNodeEntryTest.java
rename to
kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/api/datanode/JobDataNodeEntryTest.java
index 21157986307..f0e35da790f 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/api/datanode/JobDataNodeEntryTest.java
+++
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/api/datanode/JobDataNodeEntryTest.java
@@ -15,9 +15,8 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.test.it.data.pipeline.api.datanode;
+package org.apache.shardingsphere.data.pipeline.api.datanode;
-import org.apache.shardingsphere.data.pipeline.api.datanode.JobDataNodeEntry;
import org.apache.shardingsphere.infra.datanode.DataNode;
import org.junit.jupiter.api.Test;
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/api/datanode/JobDataNodeLineTest.java
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/api/datanode/JobDataNodeLineTest.java
similarity index 90%
rename from
test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/api/datanode/JobDataNodeLineTest.java
rename to
kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/api/datanode/JobDataNodeLineTest.java
index b49038e7acc..e681c578596 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/api/datanode/JobDataNodeLineTest.java
+++
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/api/datanode/JobDataNodeLineTest.java
@@ -15,10 +15,8 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.test.it.data.pipeline.api.datanode;
+package org.apache.shardingsphere.data.pipeline.api.datanode;
-import org.apache.shardingsphere.data.pipeline.api.datanode.JobDataNodeEntry;
-import org.apache.shardingsphere.data.pipeline.api.datanode.JobDataNodeLine;
import org.apache.shardingsphere.infra.datanode.DataNode;
import org.junit.jupiter.api.Test;
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/api/datasource/config/yaml/YamlJdbcConfigurationTest.java
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/api/datasource/config/yaml/YamlJdbcConfigurationTest.java
similarity index 91%
rename from
test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/api/datasource/config/yaml/YamlJdbcConfigurationTest.java
rename to
kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/api/datasource/config/yaml/YamlJdbcConfigurationTest.java
index ca795e6c704..69d2ee46557 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/api/datasource/config/yaml/YamlJdbcConfigurationTest.java
+++
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/api/datasource/config/yaml/YamlJdbcConfigurationTest.java
@@ -15,9 +15,8 @@
* limitations under the License.
*/
-package
org.apache.shardingsphere.test.it.data.pipeline.api.datasource.config.yaml;
+package org.apache.shardingsphere.data.pipeline.api.datasource.config.yaml;
-import
org.apache.shardingsphere.data.pipeline.api.datasource.config.yaml.YamlJdbcConfiguration;
import org.apache.shardingsphere.infra.util.yaml.YamlEngine;
import org.junit.jupiter.api.Test;
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/job/progress/InventoryIncrementalJobItemProgressTest.java
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/api/job/progress/InventoryIncrementalJobItemProgressTest.java
similarity index 82%
rename from
test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/job/progress/InventoryIncrementalJobItemProgressTest.java
rename to
kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/api/job/progress/InventoryIncrementalJobItemProgressTest.java
index a856a1dbad1..9ac0737d651 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/job/progress/InventoryIncrementalJobItemProgressTest.java
+++
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/api/job/progress/InventoryIncrementalJobItemProgressTest.java
@@ -15,18 +15,17 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.test.it.data.pipeline.core.job.progress;
+package org.apache.shardingsphere.data.pipeline.api.job.progress;
import
org.apache.shardingsphere.data.pipeline.api.ingest.position.FinishedPosition;
import
org.apache.shardingsphere.data.pipeline.api.ingest.position.IngestPosition;
import
org.apache.shardingsphere.data.pipeline.api.ingest.position.IntegerPrimaryKeyPosition;
import
org.apache.shardingsphere.data.pipeline.api.ingest.position.PlaceholderPosition;
import org.apache.shardingsphere.data.pipeline.api.job.JobStatus;
-import
org.apache.shardingsphere.data.pipeline.api.job.progress.InventoryIncrementalJobItemProgress;
import
org.apache.shardingsphere.data.pipeline.core.job.progress.yaml.YamlInventoryIncrementalJobItemProgress;
import
org.apache.shardingsphere.data.pipeline.core.job.progress.yaml.YamlInventoryIncrementalJobItemProgressSwapper;
import org.apache.shardingsphere.infra.util.yaml.YamlEngine;
-import
org.apache.shardingsphere.test.it.data.pipeline.core.util.ConfigurationFileUtil;
+import org.apache.shardingsphere.test.util.ConfigurationFileUtils;
import org.junit.jupiter.api.Test;
import java.util.Optional;
@@ -43,7 +42,7 @@ class InventoryIncrementalJobItemProgressTest {
@Test
void assertInit() {
- InventoryIncrementalJobItemProgress actual =
getJobItemProgress(ConfigurationFileUtil.readFile("job-progress.yaml"));
+ InventoryIncrementalJobItemProgress actual =
getJobItemProgress(ConfigurationFileUtils.readFile("job-progress.yaml"));
assertThat(actual.getStatus(), is(JobStatus.RUNNING));
assertThat(actual.getSourceDatabaseType(), is("H2"));
assertThat(actual.getInventory().getInventoryTaskProgressMap().size(),
is(4));
@@ -52,7 +51,7 @@ class InventoryIncrementalJobItemProgressTest {
@Test
void assertGetIncrementalPosition() {
- InventoryIncrementalJobItemProgress actual =
getJobItemProgress(ConfigurationFileUtil.readFile("job-progress.yaml"));
+ InventoryIncrementalJobItemProgress actual =
getJobItemProgress(ConfigurationFileUtils.readFile("job-progress.yaml"));
Optional<IngestPosition<?>> position =
actual.getIncremental().getIncrementalPosition();
assertTrue(position.isPresent());
assertThat(position.get(), instanceOf(PlaceholderPosition.class));
@@ -60,7 +59,7 @@ class InventoryIncrementalJobItemProgressTest {
@Test
void assertGetInventoryPosition() {
- InventoryIncrementalJobItemProgress actual =
getJobItemProgress(ConfigurationFileUtil.readFile("job-progress.yaml"));
+ InventoryIncrementalJobItemProgress actual =
getJobItemProgress(ConfigurationFileUtils.readFile("job-progress.yaml"));
assertThat(actual.getInventory().getInventoryPosition("ds0").size(),
is(2));
assertThat(actual.getInventory().getInventoryPosition("ds0").get("ds0.t_1"),
instanceOf(FinishedPosition.class));
assertThat(actual.getInventory().getInventoryPosition("ds1").get("ds1.t_1"),
instanceOf(PlaceholderPosition.class));
@@ -69,12 +68,12 @@ class InventoryIncrementalJobItemProgressTest {
@Test
void assertGetIncrementalLatestActiveTimeMillis() {
-
assertThat(getJobItemProgress(ConfigurationFileUtil.readFile("job-progress.yaml")).getIncremental().getIncrementalLatestActiveTimeMillis(),
is(0L));
+
assertThat(getJobItemProgress(ConfigurationFileUtils.readFile("job-progress.yaml")).getIncremental().getIncrementalLatestActiveTimeMillis(),
is(0L));
}
@Test
void assertGetIncrementalDataLatestActiveTimeMillis() {
-
assertThat(getJobItemProgress(ConfigurationFileUtil.readFile("job-progress-all-finished.yaml")).getIncremental().getIncrementalLatestActiveTimeMillis(),
is(50L));
+
assertThat(getJobItemProgress(ConfigurationFileUtils.readFile("job-progress-all-finished.yaml")).getIncremental().getIncrementalLatestActiveTimeMillis(),
is(50L));
}
private InventoryIncrementalJobItemProgress getJobItemProgress(final
String data) {
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/job/progress/yaml/YamlInventoryIncrementalJobItemProgressSwapperTest.java
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/api/job/progress/yaml/YamlInventoryIncrementalJobItemProgressSwapperTest.java
similarity index 86%
rename from
test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/job/progress/yaml/YamlInventoryIncrementalJobItemProgressSwapperTest.java
rename to
kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/api/job/progress/yaml/YamlInventoryIncrementalJobItemProgressSwapperTest.java
index ede6688cc43..cbecf664d09 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/job/progress/yaml/YamlInventoryIncrementalJobItemProgressSwapperTest.java
+++
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/api/job/progress/yaml/YamlInventoryIncrementalJobItemProgressSwapperTest.java
@@ -15,13 +15,13 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.test.it.data.pipeline.core.job.progress.yaml;
+package org.apache.shardingsphere.data.pipeline.api.job.progress.yaml;
import
org.apache.shardingsphere.data.pipeline.api.job.progress.InventoryIncrementalJobItemProgress;
import
org.apache.shardingsphere.data.pipeline.core.job.progress.yaml.YamlInventoryIncrementalJobItemProgress;
import
org.apache.shardingsphere.data.pipeline.core.job.progress.yaml.YamlInventoryIncrementalJobItemProgressSwapper;
import org.apache.shardingsphere.infra.util.yaml.YamlEngine;
-import
org.apache.shardingsphere.test.it.data.pipeline.core.util.ConfigurationFileUtil;
+import org.apache.shardingsphere.test.util.ConfigurationFileUtils;
import org.junit.jupiter.api.Test;
import static org.hamcrest.CoreMatchers.is;
@@ -35,7 +35,7 @@ class YamlInventoryIncrementalJobItemProgressSwapperTest {
@Test
void assertFullSwapToYamlConfiguration() {
- InventoryIncrementalJobItemProgress progress =
SWAPPER.swapToObject(YamlEngine.unmarshal(ConfigurationFileUtil.readFile("job-progress.yaml"),
YamlInventoryIncrementalJobItemProgress.class));
+ InventoryIncrementalJobItemProgress progress =
SWAPPER.swapToObject(YamlEngine.unmarshal(ConfigurationFileUtils.readFile("job-progress.yaml"),
YamlInventoryIncrementalJobItemProgress.class));
YamlInventoryIncrementalJobItemProgress actual =
SWAPPER.swapToYamlConfiguration(progress);
assertThat(actual.getStatus(), is("RUNNING"));
assertThat(actual.getSourceDatabaseType(), is("H2"));
@@ -50,14 +50,14 @@ class YamlInventoryIncrementalJobItemProgressSwapperTest {
@Test
void assertSwapWithFullConfig() {
- YamlInventoryIncrementalJobItemProgress yamlProgress =
YamlEngine.unmarshal(ConfigurationFileUtil.readFile("job-progress.yaml"),
YamlInventoryIncrementalJobItemProgress.class);
+ YamlInventoryIncrementalJobItemProgress yamlProgress =
YamlEngine.unmarshal(ConfigurationFileUtils.readFile("job-progress.yaml"),
YamlInventoryIncrementalJobItemProgress.class);
YamlInventoryIncrementalJobItemProgress actual =
SWAPPER.swapToYamlConfiguration(SWAPPER.swapToObject(yamlProgress));
assertThat(YamlEngine.marshal(actual),
is(YamlEngine.marshal(yamlProgress)));
}
@Test
void assertSwapWithoutInventoryIncremental() {
- YamlInventoryIncrementalJobItemProgress yamlProgress =
YamlEngine.unmarshal(ConfigurationFileUtil.readFile("job-progress-failure.yaml"),
YamlInventoryIncrementalJobItemProgress.class);
+ YamlInventoryIncrementalJobItemProgress yamlProgress =
YamlEngine.unmarshal(ConfigurationFileUtils.readFile("job-progress-failure.yaml"),
YamlInventoryIncrementalJobItemProgress.class);
InventoryIncrementalJobItemProgress progress =
SWAPPER.swapToObject(yamlProgress);
assertNotNull(progress.getInventory());
assertNotNull(progress.getIncremental());
@@ -71,7 +71,7 @@ class YamlInventoryIncrementalJobItemProgressSwapperTest {
@Test
void assertSwapWithRunningConfig() {
- YamlInventoryIncrementalJobItemProgress yamlProgress =
YamlEngine.unmarshal(ConfigurationFileUtil.readFile("job-progress-running.yaml"),
YamlInventoryIncrementalJobItemProgress.class);
+ YamlInventoryIncrementalJobItemProgress yamlProgress =
YamlEngine.unmarshal(ConfigurationFileUtils.readFile("job-progress-running.yaml"),
YamlInventoryIncrementalJobItemProgress.class);
InventoryIncrementalJobItemProgress progress =
SWAPPER.swapToObject(yamlProgress);
assertNotNull(progress.getInventory());
assertNotNull(progress.getIncremental());
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/ingest/position/PlaceholderPositionTest.java
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/api/job/type/FixtureJobType.java
similarity index 54%
copy from
test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/ingest/position/PlaceholderPositionTest.java
copy to
kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/api/job/type/FixtureJobType.java
index ca6a45d6c9d..4fd38f91594 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/ingest/position/PlaceholderPositionTest.java
+++
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/api/job/type/FixtureJobType.java
@@ -15,25 +15,16 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.test.it.data.pipeline.core.ingest.position;
+package org.apache.shardingsphere.data.pipeline.api.job.type;
-import
org.apache.shardingsphere.data.pipeline.api.ingest.position.PlaceholderPosition;
-import org.junit.jupiter.api.Test;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.MatcherAssert.assertThat;
-
-class PlaceholderPositionTest {
+/**
+ * Fixture job type.
+ */
+public final class FixtureJobType extends AbstractJobType {
- @Test
- void assertCompareTo() {
- PlaceholderPosition position1 = new PlaceholderPosition();
- PlaceholderPosition position2 = new PlaceholderPosition();
- assertThat(position1.compareTo(position2), is(1));
- }
+ public static final String TYPE_CODE = "00";
- @Test
- void assertToString() {
- assertThat(new PlaceholderPosition().toString(), is(""));
+ public FixtureJobType() {
+ super("FIXTURE", TYPE_CODE);
}
}
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/check/datasource/AbstractDataSourceCheckerTest.java
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/check/datasource/AbstractDataSourceCheckerTest.java
similarity index 96%
rename from
test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/check/datasource/AbstractDataSourceCheckerTest.java
rename to
kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/check/datasource/AbstractDataSourceCheckerTest.java
index dde28e9b29c..8feb507616b 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/check/datasource/AbstractDataSourceCheckerTest.java
+++
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/check/datasource/AbstractDataSourceCheckerTest.java
@@ -15,10 +15,9 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.test.it.data.pipeline.core.check.datasource;
+package org.apache.shardingsphere.data.pipeline.core.check.datasource;
import
org.apache.shardingsphere.data.pipeline.api.config.TableNameSchemaNameMapping;
-import
org.apache.shardingsphere.data.pipeline.core.check.datasource.AbstractDataSourceChecker;
import
org.apache.shardingsphere.data.pipeline.core.exception.job.PrepareJobWithInvalidConnectionException;
import
org.apache.shardingsphere.data.pipeline.core.exception.job.PrepareJobWithTargetTableNotEmptyException;
import org.junit.jupiter.api.BeforeEach;
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/execute/ExecuteEngineTest.java
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/execute/ExecuteEngineTest.java
similarity index 96%
rename from
test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/execute/ExecuteEngineTest.java
rename to
kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/execute/ExecuteEngineTest.java
index 861e763340b..e401829f4f1 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/execute/ExecuteEngineTest.java
+++
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/execute/ExecuteEngineTest.java
@@ -15,13 +15,11 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.test.it.data.pipeline.core.execute;
+package org.apache.shardingsphere.data.pipeline.core.execute;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import org.apache.shardingsphere.data.pipeline.api.executor.LifecycleExecutor;
-import org.apache.shardingsphere.data.pipeline.core.execute.ExecuteCallback;
-import org.apache.shardingsphere.data.pipeline.core.execute.ExecuteEngine;
import org.junit.jupiter.api.Test;
import org.mockito.internal.configuration.plugins.Plugins;
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/importer/DataRecordMergerTest.java
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/importer/DataRecordMergerTest.java
similarity index 98%
rename from
test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/importer/DataRecordMergerTest.java
rename to
kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/importer/DataRecordMergerTest.java
index 5511971bd53..208fab4060b 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/importer/DataRecordMergerTest.java
+++
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/importer/DataRecordMergerTest.java
@@ -15,14 +15,13 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.test.it.data.pipeline.core.importer;
+package org.apache.shardingsphere.data.pipeline.core.importer;
import
org.apache.shardingsphere.data.pipeline.api.ingest.position.PlaceholderPosition;
import org.apache.shardingsphere.data.pipeline.api.ingest.record.Column;
import org.apache.shardingsphere.data.pipeline.api.ingest.record.DataRecord;
import
org.apache.shardingsphere.data.pipeline.api.ingest.record.GroupedDataRecord;
import
org.apache.shardingsphere.data.pipeline.core.exception.data.PipelineUnexpectedDataRecordOrderException;
-import org.apache.shardingsphere.data.pipeline.core.importer.DataRecordMerger;
import
org.apache.shardingsphere.data.pipeline.core.ingest.IngestDataChangeType;
import
org.apache.shardingsphere.infra.util.exception.external.sql.type.generic.UnsupportedSQLOperationException;
import org.junit.jupiter.api.Test;
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/ingest/channel/memory/ManualBitSetTest.java
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/channel/memory/ManualBitSetTest.java
similarity index 94%
rename from
test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/ingest/channel/memory/ManualBitSetTest.java
rename to
kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/channel/memory/ManualBitSetTest.java
index 8cccdb9c2d4..25fcd5a3a59 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/ingest/channel/memory/ManualBitSetTest.java
+++
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/channel/memory/ManualBitSetTest.java
@@ -15,9 +15,8 @@
* limitations under the License.
*/
-package
org.apache.shardingsphere.test.it.data.pipeline.core.ingest.channel.memory;
+package org.apache.shardingsphere.data.pipeline.core.ingest.channel.memory;
-import
org.apache.shardingsphere.data.pipeline.core.ingest.channel.memory.ManualBitSet;
import org.junit.jupiter.api.Test;
import org.mockito.internal.configuration.plugins.Plugins;
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/ingest/channel/memory/MultiplexMemoryPipelineChannelTest.java
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/channel/memory/MultiplexMemoryPipelineChannelTest.java
similarity index 96%
rename from
test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/ingest/channel/memory/MultiplexMemoryPipelineChannelTest.java
rename to
kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/channel/memory/MultiplexMemoryPipelineChannelTest.java
index a6ff1b8a9c2..73bd93458bf 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/ingest/channel/memory/MultiplexMemoryPipelineChannelTest.java
+++
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/channel/memory/MultiplexMemoryPipelineChannelTest.java
@@ -15,19 +15,18 @@
* limitations under the License.
*/
-package
org.apache.shardingsphere.test.it.data.pipeline.core.ingest.channel.memory;
+package org.apache.shardingsphere.data.pipeline.core.ingest.channel.memory;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
+import org.apache.shardingsphere.data.pipeline.api.ingest.channel.AckCallback;
import
org.apache.shardingsphere.data.pipeline.api.ingest.position.IngestPosition;
import
org.apache.shardingsphere.data.pipeline.api.ingest.position.PlaceholderPosition;
import org.apache.shardingsphere.data.pipeline.api.ingest.record.DataRecord;
import
org.apache.shardingsphere.data.pipeline.api.ingest.record.FinishedRecord;
import
org.apache.shardingsphere.data.pipeline.api.ingest.record.PlaceholderRecord;
import org.apache.shardingsphere.data.pipeline.api.ingest.record.Record;
-import org.apache.shardingsphere.data.pipeline.api.ingest.channel.AckCallback;
-import
org.apache.shardingsphere.data.pipeline.core.ingest.channel.memory.MultiplexMemoryPipelineChannel;
import org.junit.jupiter.api.Test;
import java.util.Arrays;
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/fixture/FixturePositionInitializer.java
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/FixturePositionInitializer.java
similarity index 95%
rename from
test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/fixture/FixturePositionInitializer.java
rename to
kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/FixturePositionInitializer.java
index 9c15f15f909..4af46cf7c7e 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/fixture/FixturePositionInitializer.java
+++
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/FixturePositionInitializer.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.test.it.data.pipeline.core.fixture;
+package org.apache.shardingsphere.data.pipeline.core.ingest.position;
import
org.apache.shardingsphere.data.pipeline.api.ingest.position.PlaceholderPosition;
import
org.apache.shardingsphere.data.pipeline.spi.ingest.position.PositionInitializer;
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/ingest/position/IntegerPrimaryKeyPositionTest.java
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/IntegerPrimaryKeyPositionTest.java
similarity index 96%
rename from
test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/ingest/position/IntegerPrimaryKeyPositionTest.java
rename to
kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/IntegerPrimaryKeyPositionTest.java
index 9c017f8c04c..0246b1addbc 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/ingest/position/IntegerPrimaryKeyPositionTest.java
+++
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/IntegerPrimaryKeyPositionTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.test.it.data.pipeline.core.ingest.position;
+package org.apache.shardingsphere.data.pipeline.core.ingest.position;
import
org.apache.shardingsphere.data.pipeline.api.ingest.position.IntegerPrimaryKeyPosition;
import
org.apache.shardingsphere.data.pipeline.api.ingest.position.PrimaryKeyPositionFactory;
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/ingest/position/NoUniqueKeyPositionTest.java
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/NoUniqueKeyPositionTest.java
similarity index 95%
rename from
test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/ingest/position/NoUniqueKeyPositionTest.java
rename to
kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/NoUniqueKeyPositionTest.java
index 31a6a81d07e..877dd5a6879 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/ingest/position/NoUniqueKeyPositionTest.java
+++
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/NoUniqueKeyPositionTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.test.it.data.pipeline.core.ingest.position;
+package org.apache.shardingsphere.data.pipeline.core.ingest.position;
import
org.apache.shardingsphere.data.pipeline.api.ingest.position.NoUniqueKeyPosition;
import
org.apache.shardingsphere.data.pipeline.api.ingest.position.PrimaryKeyPositionFactory;
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/ingest/position/PlaceholderPositionTest.java
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/PlaceholderPositionTest.java
similarity index 94%
rename from
test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/ingest/position/PlaceholderPositionTest.java
rename to
kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/PlaceholderPositionTest.java
index ca6a45d6c9d..1ae55ce8025 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/ingest/position/PlaceholderPositionTest.java
+++
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/PlaceholderPositionTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.test.it.data.pipeline.core.ingest.position;
+package org.apache.shardingsphere.data.pipeline.core.ingest.position;
import
org.apache.shardingsphere.data.pipeline.api.ingest.position.PlaceholderPosition;
import org.junit.jupiter.api.Test;
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/ingest/position/StringPrimaryKeyPositionTest.java
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/StringPrimaryKeyPositionTest.java
similarity index 96%
rename from
test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/ingest/position/StringPrimaryKeyPositionTest.java
rename to
kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/StringPrimaryKeyPositionTest.java
index 58cc91fc900..9bbfce4d995 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/ingest/position/StringPrimaryKeyPositionTest.java
+++
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/StringPrimaryKeyPositionTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.test.it.data.pipeline.core.ingest.position;
+package org.apache.shardingsphere.data.pipeline.core.ingest.position;
import
org.apache.shardingsphere.data.pipeline.api.ingest.position.PrimaryKeyPositionFactory;
import
org.apache.shardingsphere.data.pipeline.api.ingest.position.StringPrimaryKeyPosition;
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/ingest/position/UnsupportedKeyPositionTest.java
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/UnsupportedKeyPositionTest.java
similarity index 95%
rename from
test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/ingest/position/UnsupportedKeyPositionTest.java
rename to
kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/UnsupportedKeyPositionTest.java
index 5a8a816c161..94a3f100a07 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/ingest/position/UnsupportedKeyPositionTest.java
+++
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/UnsupportedKeyPositionTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.test.it.data.pipeline.core.ingest.position;
+package org.apache.shardingsphere.data.pipeline.core.ingest.position;
import
org.apache.shardingsphere.data.pipeline.api.ingest.position.PrimaryKeyPositionFactory;
import
org.apache.shardingsphere.data.pipeline.api.ingest.position.UnsupportedKeyPosition;
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/ingest/record/DataRecordTest.java
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/record/DataRecordTest.java
similarity index 97%
rename from
test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/ingest/record/DataRecordTest.java
rename to
kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/record/DataRecordTest.java
index d84a5faf3f9..2d4ca0075d3 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/ingest/record/DataRecordTest.java
+++
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/record/DataRecordTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.test.it.data.pipeline.core.ingest.record;
+package org.apache.shardingsphere.data.pipeline.core.ingest.record;
import
org.apache.shardingsphere.data.pipeline.api.ingest.position.PlaceholderPosition;
import org.apache.shardingsphere.data.pipeline.api.ingest.record.Column;
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/metadata/loader/StandardPipelineTableMetaDataLoaderTest.java
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/metadata/loader/StandardPipelineTableMetaDataLoaderTest.java
similarity index 97%
rename from
test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/metadata/loader/StandardPipelineTableMetaDataLoaderTest.java
rename to
kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/metadata/loader/StandardPipelineTableMetaDataLoaderTest.java
index 3d610aac441..6d42f0733e2 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/metadata/loader/StandardPipelineTableMetaDataLoaderTest.java
+++
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/metadata/loader/StandardPipelineTableMetaDataLoaderTest.java
@@ -15,14 +15,13 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.test.it.data.pipeline.core.metadata.loader;
+package org.apache.shardingsphere.data.pipeline.core.metadata.loader;
import
org.apache.shardingsphere.data.pipeline.api.datasource.PipelineDataSourceWrapper;
import
org.apache.shardingsphere.data.pipeline.api.metadata.loader.PipelineTableMetaDataLoader;
import
org.apache.shardingsphere.data.pipeline.api.metadata.model.PipelineColumnMetaData;
import
org.apache.shardingsphere.data.pipeline.api.metadata.model.PipelineIndexMetaData;
import
org.apache.shardingsphere.data.pipeline.api.metadata.model.PipelineTableMetaData;
-import
org.apache.shardingsphere.data.pipeline.core.metadata.loader.StandardPipelineTableMetaDataLoader;
import org.apache.shardingsphere.infra.database.type.dialect.H2DatabaseType;
import org.apache.shardingsphere.test.fixture.jdbc.MockedDataSource;
import org.junit.jupiter.api.BeforeEach;
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/metadata/model/PipelineTableMetaDataTest.java
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/metadata/model/PipelineTableMetaDataTest.java
similarity index 97%
rename from
test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/metadata/model/PipelineTableMetaDataTest.java
rename to
kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/metadata/model/PipelineTableMetaDataTest.java
index f78a75f08a8..3e9283727a0 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/metadata/model/PipelineTableMetaDataTest.java
+++
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/metadata/model/PipelineTableMetaDataTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.test.it.data.pipeline.core.metadata.model;
+package org.apache.shardingsphere.data.pipeline.core.metadata.model;
import
org.apache.shardingsphere.data.pipeline.api.metadata.model.PipelineColumnMetaData;
import
org.apache.shardingsphere.data.pipeline.api.metadata.model.PipelineTableMetaData;
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/metadata/node/PipelineMetaDataNodeTest.java
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/metadata/node/PipelineMetaDataNodeTest.java
similarity index 88%
rename from
test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/metadata/node/PipelineMetaDataNodeTest.java
rename to
kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/metadata/node/PipelineMetaDataNodeTest.java
index 9ccdf9aa874..c54ede61173 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/metadata/node/PipelineMetaDataNodeTest.java
+++
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/metadata/node/PipelineMetaDataNodeTest.java
@@ -15,10 +15,9 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.test.it.data.pipeline.core.metadata.node;
+package org.apache.shardingsphere.data.pipeline.core.metadata.node;
-import
org.apache.shardingsphere.data.pipeline.core.metadata.node.PipelineMetaDataNode;
-import
org.apache.shardingsphere.data.pipeline.scenario.migration.MigrationJobType;
+import org.apache.shardingsphere.data.pipeline.api.job.type.FixtureJobType;
import org.hamcrest.MatcherAssert;
import org.junit.jupiter.api.Test;
@@ -27,7 +26,7 @@ import static org.hamcrest.MatcherAssert.assertThat;
class PipelineMetaDataNodeTest {
- private final String migrationMetaDataRootPath =
"/pipeline/migration/metadata";
+ private final String migrationMetaDataRootPath =
"/pipeline/fixture/metadata";
private final String jobId = "j0101001";
@@ -39,12 +38,12 @@ class PipelineMetaDataNodeTest {
@Test
void assertGetMetaDataDataSourcesPath() {
-
MatcherAssert.assertThat(PipelineMetaDataNode.getMetaDataDataSourcesPath(new
MigrationJobType()), is(migrationMetaDataRootPath + "/data_sources"));
+
MatcherAssert.assertThat(PipelineMetaDataNode.getMetaDataDataSourcesPath(new
FixtureJobType()), is(migrationMetaDataRootPath + "/data_sources"));
}
@Test
void assertGetMetaDataProcessConfigPath() {
- assertThat(PipelineMetaDataNode.getMetaDataProcessConfigPath(new
MigrationJobType()), is(migrationMetaDataRootPath + "/process_config"));
+ assertThat(PipelineMetaDataNode.getMetaDataProcessConfigPath(new
FixtureJobType()), is(migrationMetaDataRootPath + "/process_config"));
}
@Test
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/record/RecordUtilsTest.java
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/record/RecordUtilsTest.java
similarity index 96%
rename from
test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/record/RecordUtilsTest.java
rename to
kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/record/RecordUtilsTest.java
index 84fce145d2f..6206d792aec 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/record/RecordUtilsTest.java
+++
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/record/RecordUtilsTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.test.it.data.pipeline.core.record;
+package org.apache.shardingsphere.data.pipeline.core.record;
import
org.apache.shardingsphere.data.pipeline.api.ingest.position.FinishedPosition;
import
org.apache.shardingsphere.data.pipeline.api.ingest.position.IntegerPrimaryKeyPosition;
@@ -25,7 +25,6 @@ import
org.apache.shardingsphere.data.pipeline.api.ingest.record.DataRecord;
import
org.apache.shardingsphere.data.pipeline.api.ingest.record.FinishedRecord;
import
org.apache.shardingsphere.data.pipeline.api.ingest.record.PlaceholderRecord;
import org.apache.shardingsphere.data.pipeline.api.ingest.record.Record;
-import org.apache.shardingsphere.data.pipeline.core.record.RecordUtils;
import org.junit.jupiter.api.Test;
import java.util.Arrays;
diff --git
a/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/check/consistency/algorithm/fixture/FixturePipelineSQLBuilder.java
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/sqlbuilder/FixturePipelineSQLBuilder.java
similarity index 97%
rename from
kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/check/consistency/algorithm/fixture/FixturePipelineSQLBuilder.java
rename to
kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/sqlbuilder/FixturePipelineSQLBuilder.java
index 27341e58971..70d8492a26d 100644
---
a/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/check/consistency/algorithm/fixture/FixturePipelineSQLBuilder.java
+++
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/sqlbuilder/FixturePipelineSQLBuilder.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package
org.apache.shardingsphere.data.pipeline.core.check.consistency.algorithm.fixture;
+package org.apache.shardingsphere.data.pipeline.core.sqlbuilder;
import org.apache.shardingsphere.data.pipeline.api.ingest.record.Column;
import org.apache.shardingsphere.data.pipeline.api.ingest.record.DataRecord;
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/fixture/FixturePipelineSQLBuilder.java
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/sqlbuilder/H2PipelineSQLBuilder.java
similarity index 84%
copy from
test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/fixture/FixturePipelineSQLBuilder.java
copy to
kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/sqlbuilder/H2PipelineSQLBuilder.java
index 080c2dbcc38..85634a19b0e 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/fixture/FixturePipelineSQLBuilder.java
+++
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/sqlbuilder/H2PipelineSQLBuilder.java
@@ -15,13 +15,11 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.test.it.data.pipeline.core.fixture;
-
-import
org.apache.shardingsphere.data.pipeline.core.sqlbuilder.AbstractPipelineSQLBuilder;
+package org.apache.shardingsphere.data.pipeline.core.sqlbuilder;
import java.util.Optional;
-public final class FixturePipelineSQLBuilder extends
AbstractPipelineSQLBuilder {
+public final class H2PipelineSQLBuilder extends AbstractPipelineSQLBuilder {
@Override
protected boolean isKeyword(final String item) {
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/spi/sqlbuilder/PipelineSQLBuilderTest.java
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/sqlbuilder/PipelineSQLBuilderTest.java
similarity index 96%
rename from
test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/spi/sqlbuilder/PipelineSQLBuilderTest.java
rename to
kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/sqlbuilder/PipelineSQLBuilderTest.java
index 901cd7f5f3b..823712643b1 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/spi/sqlbuilder/PipelineSQLBuilderTest.java
+++
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/sqlbuilder/PipelineSQLBuilderTest.java
@@ -15,12 +15,11 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.test.it.data.pipeline.spi.sqlbuilder;
+package org.apache.shardingsphere.data.pipeline.core.sqlbuilder;
import
org.apache.shardingsphere.data.pipeline.api.ingest.position.PlaceholderPosition;
import org.apache.shardingsphere.data.pipeline.api.ingest.record.Column;
import org.apache.shardingsphere.data.pipeline.api.ingest.record.DataRecord;
-import
org.apache.shardingsphere.test.it.data.pipeline.core.fixture.FixturePipelineSQLBuilder;
import org.apache.shardingsphere.data.pipeline.core.record.RecordUtils;
import
org.apache.shardingsphere.data.pipeline.spi.sqlbuilder.PipelineSQLBuilder;
import org.junit.jupiter.api.Test;
@@ -34,7 +33,7 @@ import static org.hamcrest.MatcherAssert.assertThat;
class PipelineSQLBuilderTest {
- private final PipelineSQLBuilder pipelineSQLBuilder = new
FixturePipelineSQLBuilder();
+ private final PipelineSQLBuilder pipelineSQLBuilder = new
H2PipelineSQLBuilder();
@Test
void assertBuildDivisibleInventoryDumpSQL() {
diff --git
a/test/it/pipeline/src/test/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.spi.ingest.position.PositionInitializer
b/kernel/data-pipeline/core/src/test/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.spi.ingest.position.PositionInitializer
similarity index 92%
rename from
test/it/pipeline/src/test/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.spi.ingest.position.PositionInitializer
rename to
kernel/data-pipeline/core/src/test/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.spi.ingest.position.PositionInitializer
index 34b52d3ad52..3e9ccd6d4d2 100644
---
a/test/it/pipeline/src/test/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.spi.ingest.position.PositionInitializer
+++
b/kernel/data-pipeline/core/src/test/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.spi.ingest.position.PositionInitializer
@@ -15,4 +15,4 @@
# limitations under the License.
#
-org.apache.shardingsphere.test.it.data.pipeline.core.fixture.FixturePositionInitializer
+org.apache.shardingsphere.data.pipeline.core.ingest.position.FixturePositionInitializer
diff --git
a/kernel/data-pipeline/core/src/test/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.spi.sqlbuilder.PipelineSQLBuilder
b/kernel/data-pipeline/core/src/test/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.spi.sqlbuilder.PipelineSQLBuilder
index ab29ad1625d..dfb76b20f84 100644
---
a/kernel/data-pipeline/core/src/test/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.spi.sqlbuilder.PipelineSQLBuilder
+++
b/kernel/data-pipeline/core/src/test/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.spi.sqlbuilder.PipelineSQLBuilder
@@ -15,4 +15,5 @@
# limitations under the License.
#
-org.apache.shardingsphere.data.pipeline.core.check.consistency.algorithm.fixture.FixturePipelineSQLBuilder
+org.apache.shardingsphere.data.pipeline.core.sqlbuilder.FixturePipelineSQLBuilder
+org.apache.shardingsphere.data.pipeline.core.sqlbuilder.H2PipelineSQLBuilder
diff --git a/test/it/pipeline/src/test/resources/job-progress-all-finished.yaml
b/kernel/data-pipeline/core/src/test/resources/job-progress-all-finished.yaml
similarity index 100%
rename from test/it/pipeline/src/test/resources/job-progress-all-finished.yaml
rename to
kernel/data-pipeline/core/src/test/resources/job-progress-all-finished.yaml
diff --git a/test/it/pipeline/src/test/resources/job-progress-failure.yaml
b/kernel/data-pipeline/core/src/test/resources/job-progress-failure.yaml
similarity index 100%
rename from test/it/pipeline/src/test/resources/job-progress-failure.yaml
rename to kernel/data-pipeline/core/src/test/resources/job-progress-failure.yaml
diff --git a/test/it/pipeline/src/test/resources/job-progress-running.yaml
b/kernel/data-pipeline/core/src/test/resources/job-progress-running.yaml
similarity index 100%
rename from test/it/pipeline/src/test/resources/job-progress-running.yaml
rename to kernel/data-pipeline/core/src/test/resources/job-progress-running.yaml
diff --git a/test/it/pipeline/src/test/resources/job-progress.yaml
b/kernel/data-pipeline/core/src/test/resources/job-progress.yaml
similarity index 100%
rename from test/it/pipeline/src/test/resources/job-progress.yaml
rename to kernel/data-pipeline/core/src/test/resources/job-progress.yaml
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/scenario/consistencycheck/util/ConsistencyCheckSequenceTest.java
b/kernel/data-pipeline/scenario/consistencycheck/src/test/java/org/apache/shardingsphere/data/pipeline/scenario/consistencycheck/util/ConsistencyCheckSequenceTest.java
similarity index 92%
rename from
test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/scenario/consistencycheck/util/ConsistencyCheckSequenceTest.java
rename to
kernel/data-pipeline/scenario/consistencycheck/src/test/java/org/apache/shardingsphere/data/pipeline/scenario/consistencycheck/util/ConsistencyCheckSequenceTest.java
index 4e2fca6ba22..5cdae219eeb 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/scenario/consistencycheck/util/ConsistencyCheckSequenceTest.java
+++
b/kernel/data-pipeline/scenario/consistencycheck/src/test/java/org/apache/shardingsphere/data/pipeline/scenario/consistencycheck/util/ConsistencyCheckSequenceTest.java
@@ -15,9 +15,8 @@
* limitations under the License.
*/
-package
org.apache.shardingsphere.test.it.data.pipeline.scenario.consistencycheck.util;
+package org.apache.shardingsphere.data.pipeline.scenario.consistencycheck.util;
-import
org.apache.shardingsphere.data.pipeline.scenario.consistencycheck.util.ConsistencyCheckSequence;
import org.junit.jupiter.api.Test;
import java.util.Arrays;
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/fixture/FixturePipelineSQLBuilder.java
b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/fixture/H2PipelineSQLBuilder.java
similarity index 94%
rename from
test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/fixture/FixturePipelineSQLBuilder.java
rename to
test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/fixture/H2PipelineSQLBuilder.java
index 080c2dbcc38..02682d9aa64 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/fixture/FixturePipelineSQLBuilder.java
+++
b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/fixture/H2PipelineSQLBuilder.java
@@ -21,7 +21,7 @@ import
org.apache.shardingsphere.data.pipeline.core.sqlbuilder.AbstractPipelineS
import java.util.Optional;
-public final class FixturePipelineSQLBuilder extends
AbstractPipelineSQLBuilder {
+public final class H2PipelineSQLBuilder extends AbstractPipelineSQLBuilder {
@Override
protected boolean isKeyword(final String item) {
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/prepare/InventoryTaskSplitterTest.java
b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/prepare/InventoryTaskSplitterTest.java
index 7aa38ada462..0f7c23b8b7d 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/prepare/InventoryTaskSplitterTest.java
+++
b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/prepare/InventoryTaskSplitterTest.java
@@ -64,7 +64,7 @@ class InventoryTaskSplitterTest {
}
@BeforeEach
- void setUp() throws ReflectiveOperationException {
+ void setUp() {
initJobItemContext();
dumperConfig = new
InventoryDumperConfiguration(jobItemContext.getTaskConfig().getDumperConfig());
PipelineColumnMetaData columnMetaData = new PipelineColumnMetaData(1,
"order_id", Types.INTEGER, "int", false, true, true);
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/util/JobConfigurationBuilder.java
b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/util/JobConfigurationBuilder.java
index ad1f0582a58..ca387ae5e82 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/util/JobConfigurationBuilder.java
+++
b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/util/JobConfigurationBuilder.java
@@ -31,6 +31,7 @@ import
org.apache.shardingsphere.data.pipeline.scenario.migration.config.Migrati
import
org.apache.shardingsphere.data.pipeline.yaml.job.YamlMigrationJobConfiguration;
import
org.apache.shardingsphere.data.pipeline.yaml.job.YamlMigrationJobConfigurationSwapper;
import org.apache.shardingsphere.infra.util.spi.type.typed.TypedSPILoader;
+import org.apache.shardingsphere.test.util.ConfigurationFileUtils;
import java.util.Collections;
import java.util.LinkedHashMap;
@@ -70,10 +71,10 @@ public final class JobConfigurationBuilder {
result.setJobShardingDataNodes(Collections.singletonList("t_order:ds_0.t_order"));
result.setJobId(generateJobId(result));
Map<String, YamlPipelineDataSourceConfiguration> sources = new
LinkedHashMap<>();
- sources.put("ds_0", createYamlPipelineDataSourceConfiguration(new
StandardPipelineDataSourceConfiguration(ConfigurationFileUtil.readFile("migration_standard_jdbc_source.yaml"))));
+ sources.put("ds_0", createYamlPipelineDataSourceConfiguration(new
StandardPipelineDataSourceConfiguration(ConfigurationFileUtils.readFile("migration_standard_jdbc_source.yaml"))));
result.setSources(sources);
result.setTarget(createYamlPipelineDataSourceConfiguration(new
ShardingSpherePipelineDataSourceConfiguration(
-
ConfigurationFileUtil.readFile("migration_sharding_sphere_jdbc_target.yaml"))));
+
ConfigurationFileUtils.readFile("migration_sharding_sphere_jdbc_target.yaml"))));
TypedSPILoader.getService(PipelineJobAPI.class,
"MIGRATION").extendYamlJobConfiguration(result);
return result;
}
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/util/PipelineContextUtil.java
b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/util/PipelineContextUtil.java
index 2fa06de19fb..439e9eee316 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/util/PipelineContextUtil.java
+++
b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/util/PipelineContextUtil.java
@@ -42,12 +42,13 @@ import
org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSp
import org.apache.shardingsphere.infra.util.spi.type.typed.TypedSPILoader;
import org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration;
import
org.apache.shardingsphere.infra.yaml.config.swapper.mode.YamlModeConfigurationSwapper;
+import org.apache.shardingsphere.metadata.persist.MetaDataPersistService;
import org.apache.shardingsphere.mode.manager.ContextManager;
import org.apache.shardingsphere.mode.metadata.MetaDataContexts;
-import org.apache.shardingsphere.metadata.persist.MetaDataPersistService;
import
org.apache.shardingsphere.mode.repository.cluster.ClusterPersistRepository;
import
org.apache.shardingsphere.mode.repository.cluster.ClusterPersistRepositoryConfiguration;
import
org.apache.shardingsphere.test.it.data.pipeline.core.fixture.EmbedTestingServer;
+import org.apache.shardingsphere.test.util.ConfigurationFileUtils;
import org.mockito.internal.configuration.plugins.Plugins;
import java.sql.Types;
@@ -72,7 +73,7 @@ public final class PipelineContextUtil {
return;
}
ShardingSpherePipelineDataSourceConfiguration pipelineDataSourceConfig
= new ShardingSpherePipelineDataSourceConfiguration(
-
ConfigurationFileUtil.readFileAndIgnoreComments("config_sharding_sphere_jdbc_source.yaml"));
+
ConfigurationFileUtils.readFileAndIgnoreComments("config_sharding_sphere_jdbc_source.yaml"));
YamlRootConfiguration rootConfig = (YamlRootConfiguration)
pipelineDataSourceConfig.getDataSourceConfiguration();
ModeConfiguration modeConfig = new
YamlModeConfigurationSwapper().swapToObject(rootConfig.getMode());
PipelineContext.initModeConfig(modeConfig);
diff --git
a/test/it/pipeline/src/test/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.spi.sqlbuilder.PipelineSQLBuilder
b/test/it/pipeline/src/test/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.spi.sqlbuilder.PipelineSQLBuilder
index fd0c97e95d3..582509d7fc4 100644
---
a/test/it/pipeline/src/test/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.spi.sqlbuilder.PipelineSQLBuilder
+++
b/test/it/pipeline/src/test/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.spi.sqlbuilder.PipelineSQLBuilder
@@ -15,4 +15,4 @@
# limitations under the License.
#
-org.apache.shardingsphere.test.it.data.pipeline.core.fixture.FixturePipelineSQLBuilder
+org.apache.shardingsphere.test.it.data.pipeline.core.fixture.H2PipelineSQLBuilder
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/util/ConfigurationFileUtil.java
b/test/util/src/main/java/org/apache/shardingsphere/test/util/ConfigurationFileUtils.java
similarity index 93%
rename from
test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/util/ConfigurationFileUtil.java
rename to
test/util/src/main/java/org/apache/shardingsphere/test/util/ConfigurationFileUtils.java
index cb85a850e1a..46f62bebe97 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/util/ConfigurationFileUtil.java
+++
b/test/util/src/main/java/org/apache/shardingsphere/test/util/ConfigurationFileUtils.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.test.it.data.pipeline.core.util;
+package org.apache.shardingsphere.test.util;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
@@ -28,10 +28,10 @@ import java.nio.file.Paths;
import java.util.stream.Collectors;
/**
- * Configuration file util.
+ * Configuration file utility class.
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
-public final class ConfigurationFileUtil {
+public final class ConfigurationFileUtils {
/**
* Read file content.