You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by ji...@apache.org on 2022/12/05 17:00:07 UTC
[shardingsphere] branch master updated: Refactor pipeline's class names (#22682)
This is an automated email from the ASF dual-hosted git repository.
jianglongtao 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 f32af7e7acf Refactor pipeline's class names (#22682)
f32af7e7acf is described below
commit f32af7e7acfc9a81315fa8bae11727469dfc9584
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Tue Dec 6 00:59:57 2022 +0800
Refactor pipeline's class names (#22682)
---
.../workflows/{it-scaling.yml => it-pipeline.yml} | 52 ++++++++++----------
.../scaling-integration-test/_index.cn.md | 26 +++++-----
.../scaling-integration-test/_index.en.md | 26 +++++-----
test/e2e/{scaling => pipeline}/pom.xml | 2 +-
.../pipeline/cases/base/BaseIncrementTask.java | 0
.../pipeline/cases/base/PipelineBaseE2EIT.java} | 50 ++++++++++----------
.../createtable/CreateTableSQLGeneratorIT.java | 40 ++++++++--------
.../cases/migration/AbstractMigrationE2EIT.java} | 22 ++++-----
.../general/MySQLMigrationGeneralE2EIT.java} | 41 ++++++++--------
.../general/PostgreSQLMigrationGeneralE2EIT.java} | 55 ++++++++++------------
.../primarykey/TextPrimaryKeyMigrationE2EIT.java} | 40 ++++++++--------
.../pipeline/cases/task/MySQLIncrementTask.java | 4 +-
.../cases/task/PostgreSQLIncrementTask.java | 4 +-
.../e2e/data/pipeline/command/ExtraSQLCommand.java | 0
.../pipeline/command/MigrationDistSQLCommand.java | 0
.../CreateTableSQLGeneratorAssertionEntity.java | 0
...reateTableSQLGeneratorAssertionsRootEntity.java | 0
.../entity/CreateTableSQLGeneratorInputEntity.java | 0
.../CreateTableSQLGeneratorOutputEntity.java | 0
.../data/pipeline/env/PipelineE2EEnvironment.java} | 42 ++++++++---------
.../pipeline/env/enums/PipelineEnvTypeEnum.java} | 2 +-
.../container/compose/BaseContainerComposer.java | 0
.../container/compose/DockerContainerComposer.java | 4 +-
.../container/compose/NativeContainerComposer.java | 4 +-
...ProxyClusterContainerConfigurationFactory.java} | 4 +-
.../framework/helper/PipelineCaseHelper.java} | 5 +-
.../framework/param/PipelineTestParameter.java} | 4 +-
.../framework/watcher/PipelineWatcher.java} | 4 +-
.../data/pipeline/logger/PipelineLoggerFilter.java | 2 +-
.../util/AutoIncrementKeyGenerateAlgorithm.java | 0
.../e2e/data/pipeline/util/DockerImageVersion.java | 0
.../resources/env/common/migration-command.xml | 0
.../src/test/resources/env/it-env.properties | 35 ++++++++++++++
.../src/test/resources/env/logback.xml | 0
.../src/test/resources/env/mysql/01-initdb.sql | 20 ++++----
.../src/test/resources/env/mysql/my.cnf | 0
.../src/test/resources/env/mysql/mysql8/my.cnf | 0
.../src/test/resources/env/mysql/server-5.yaml | 0
.../src/test/resources/env/mysql/server-8.yaml | 0
.../src/test/resources/env/opengauss/01-initdb.sql | 20 ++++----
.../src/test/resources/env/opengauss/pg_hba.conf | 0
.../src/test/resources/env/opengauss/server.yaml | 0
.../test/resources/env/postgresql/01-initdb.sql | 20 ++++----
.../test/resources/env/postgresql/postgresql.conf | 0
.../src/test/resources/env/postgresql/server.yaml | 0
.../mysql/create-table-sql-generator.xml | 0
.../opengauss/create-table-sql-generator.xml | 0
.../postgresql/create-table-sql-generator.xml | 0
.../test/resources/env/scenario/general/mysql.xml | 0
.../resources/env/scenario/general/postgresql.xml | 0
.../primary_key/text_primary_key/mysql.xml | 0
.../primary_key/text_primary_key/postgresql.xml | 0
.../env/scenario/primary_key/unique_key/mysql.xml | 0
.../src/test/resources/logback-test.xml | 0
test/e2e/pom.xml | 4 +-
.../src/test/resources/env/it-env.properties | 35 --------------
56 files changed, 279 insertions(+), 288 deletions(-)
diff --git a/.github/workflows/it-scaling.yml b/.github/workflows/it-pipeline.yml
similarity index 67%
rename from .github/workflows/it-scaling.yml
rename to .github/workflows/it-pipeline.yml
index 1ee92315292..8126118484d 100644
--- a/.github/workflows/it-scaling.yml
+++ b/.github/workflows/it-pipeline.yml
@@ -15,13 +15,13 @@
# limitations under the License.
#
-name: IT - Scaling
+name: IT - Pipeline
on:
push:
branches: [ master, dev ]
paths:
- - '.github/workflows/it-scaling.yml'
+ - '.github/workflows/it-pipeline.yml'
- 'infra/common/src/main/**'
- 'infra/executor/src/main/**'
- 'mode/**/src/main/**'
@@ -36,12 +36,12 @@ on:
- 'test/pom.xml'
- 'test/e2e/fixture/**'
- 'test/e2e/env/**'
- - 'test/e2e/scaling/**'
+ - 'test/e2e/pipeline/**'
- '!*.md'
pull_request:
branches: [ master ]
paths:
- - '.github/workflows/it-scaling.yml'
+ - '.github/workflows/it-pipeline.yml'
- 'infra/common/src/main/**'
- 'infra/executor/src/main/**'
- 'mode/**/src/main/**'
@@ -56,23 +56,23 @@ on:
- 'test/pom.xml'
- 'test/e2e/fixture/**'
- 'test/e2e/env/**'
- - 'test/e2e/scaling/**'
+ - 'test/e2e/pipeline/**'
- '!*.md'
schedule:
- cron: '0 22 */1 * *' # once a day. UTC time
workflow_dispatch:
concurrency:
- group: it-scaling-${{ github.workflow }}-${{ github.ref }}
+ group: it-pipeline-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -Dspotless.apply.skip=true -Djacoco.skip=true -Drat.skip=true -Dfailsafe.skipAfterFailureCount=1 -Dio.netty.leakDetectionLevel=advanced
jobs:
- scaling-it-test:
+ pipeline-it-test:
if: (github.event_name != 'schedule')
- name: scaling-it-test
+ name: pipeline-it-test
runs-on: ubuntu-latest
env:
postgresql_version: postgres:12-alpine
@@ -94,18 +94,18 @@ jobs:
with:
distribution: 'temurin'
java-version: 8
- - name: Build Scaling IT image
- run: ./mvnw -B clean install -am -pl test/e2e/scaling -Pit.env.docker -DskipTests
- - name: Run Scaling MySQL Integration Test
- run: ./mvnw -nsu -B install -f test/e2e/scaling/pom.xml -Dscaling.it.env.type=docker -Dscaling.it.docker.mysql.version=${{ env.mysql_version }}
- - name: Run Scaling PostgreSQL Integration Test
- run: ./mvnw -nsu -B install -f test/e2e/scaling/pom.xml -Dscaling.it.env.type=docker -Dscaling.it.docker.postgresql.version=${{ env.postgresql_version }}
- - name: Run Scaling openGauss Integration Test
- run: ./mvnw -nsu -B install -f test/e2e/scaling/pom.xml -Dscaling.it.env.type=docker -Dscaling.it.docker.opengauss.version=${{ env.opengauss_version }}
+ - name: Build Pipeline IT image
+ run: ./mvnw -B clean install -am -pl test/e2e/pipeline -Pit.env.docker -DskipTests
+ - name: Run Pipeline MySQL E2E Test
+ run: ./mvnw -nsu -B install -f test/e2e/pipeline/pom.xml -Dpipeline.it.env.type=docker -Dpipeline.it.docker.mysql.version=${{ env.mysql_version }}
+ - name: Run Pipeline PostgreSQL Integration Test
+ run: ./mvnw -nsu -B install -f test/e2e/pipeline/pom.xml -Dpipeline.it.env.type=docker -Dpipeline.it.docker.postgresql.version=${{ env.postgresql_version }}
+ - name: Run Pipeline openGauss Integration Test
+ run: ./mvnw -nsu -B install -f test/e2e/pipeline/pom.xml -Dpipeline.it.env.type=docker -Dpipeline.it.docker.opengauss.version=${{ env.opengauss_version }}
- scaling-daily-it-test:
+ pipeline-daily-it-test:
if: (github.event_name == 'schedule' && github.repository == 'apache/shardingsphere')
- name: scaling-daily-it-test
+ name: pipeline-daily-it-test
runs-on: ubuntu-latest
env:
postgresql_version: postgres:10-alpine,postgres:11-alpine,postgres:12-alpine,postgres:13-alpine,postgres:14-alpine
@@ -127,11 +127,11 @@ jobs:
with:
distribution: 'temurin'
java-version: 8
- - name: Build Scaling IT image
- run: ./mvnw -B clean install -am -pl test/e2e/scaling -Pit.env.docker -DskipTests
- - name: Run Scaling Daily MySQL Integration Test
- run: ./mvnw -nsu -B install -f test/e2e/scaling/pom.xml -Dscaling.it.env.type=docker -Dscaling.it.docker.mysql.version=${{ env.mysql_version }}
- - name: Run Scaling Daily PostgreSQL Integration Test
- run: ./mvnw -nsu -B install -f test/e2e/scaling/pom.xml -Dscaling.it.env.type=docker -Dscaling.it.docker.postgresql.version=${{ env.postgresql_version }}
- - name: Run Scaling Daily openGauss Integration Test
- run: ./mvnw -nsu -B install -f test/e2e/scaling/pom.xml -Dscaling.it.env.type=docker -Dscaling.it.docker.opengauss.version=${{ env.opengauss_version }}
+ - name: Build Pipeline IT image
+ run: ./mvnw -B clean install -am -pl test/e2e/pipeline -Pit.env.docker -DskipTests
+ - name: Run Pipeline Daily MySQL Integration Test
+ run: ./mvnw -nsu -B install -f test/e2e/pipeline/pom.xml -Dpipeline.it.env.type=docker -Dpipeline.it.docker.mysql.version=${{ env.mysql_version }}
+ - name: Run Pipeline Daily PostgreSQL Integration Test
+ run: ./mvnw -nsu -B install -f test/e2e/pipeline/pom.xml -Dpipeline.it.env.type=docker -Dpipeline.it.docker.postgresql.version=${{ env.postgresql_version }}
+ - name: Run Pipeline Daily openGauss Integration Test
+ run: ./mvnw -nsu -B install -f test/e2e/pipeline/pom.xml -Dpipeline.it.env.type=docker -Dpipeline.it.docker.opengauss.version=${{ env.opengauss_version }}
diff --git a/docs/document/content/test-manual/scaling-integration-test/_index.cn.md b/docs/document/content/test-manual/scaling-integration-test/_index.cn.md
index 905a3fcd9c8..1fa7ceaca48 100644
--- a/docs/document/content/test-manual/scaling-integration-test/_index.cn.md
+++ b/docs/document/content/test-manual/scaling-integration-test/_index.cn.md
@@ -1,6 +1,6 @@
+++
pre = "<b>6.4. </b>"
-title = "Scaling 集成测试"
+title = "Pipeline 集成测试"
weight = 4
+++
@@ -19,7 +19,7 @@ weight = 4
## 使用指南
-模块路径 `shardingsphere-test/shardingsphere-test-e2e/shardingsphere-test-e2e-scaling` 。
+模块路径 `shardingsphere-test/shardingsphere-test-e2e/shardingsphere-test-e2e-pipeline` 。
### 环境配置
`${DOCKER-IMAGE}` 表示 docker 镜像名称,如 `mysql:8` 。 `${DATABASE-TYPE}` 表示数据库类型。
@@ -36,7 +36,7 @@ weight = 4
- `BaseITCase`:提供了通用方法给子类
- `BaseExtraSQLITCase`:提供了建表、CRUD 语句执行方法
-用例示例:MySQLGeneralScalingIT。
+用例示例:MySQLGeneralPipelineE2EIT。
覆盖的功能点如下:
- 库级别迁移(所有表)
- 表级别迁移(任意多个表)
@@ -56,11 +56,11 @@ weight = 4
要求 ShardingSphere-Proxy 的端口是 3307。
以 MySQL 为例,`it-env.properties` 可以配置如下:
```
-scaling.it.env.type=NATIVE
-scaling.it.native.database=mysql
-scaling.it.native.mysql.username=root
-scaling.it.native.mysql.password=root
-scaling.it.native.mysql.port=3306
+pipeline.it.env.type=NATIVE
+pipeline.it.native.database=mysql
+pipeline.it.native.mysql.username=root
+pipeline.it.native.mysql.password=root
+pipeline.it.native.mysql.port=3306
```
找到对应的用例,在 IDE 下使用 Junit 的方式启动即可。
@@ -70,24 +70,24 @@ scaling.it.native.mysql.port=3306
第一步:打包镜像
```
-./mvnw -B clean install -am -pl shardingsphere-test/shardingsphere-test-e2e/shardingsphere-test-e2e-scaling -Pit.env.docker -DskipTests
+./mvnw -B clean install -am -pl shardingsphere-test/shardingsphere-test-e2e/shardingsphere-test-e2e-pipeline -Pit.env.docker -DskipTests
```
运行以上命令会构建出一个用于集成测试的 Docker 镜像 apache/shardingsphere-proxy-test:latest,该镜像设置了远程调试的端口,默认是3308。 如果仅修改了测试代码,可以复用已有的测试镜像,无须重新构建。
Docker 模式下,如果需要对 Docker 镜像启动参数进行调整,可以对修改 ShardingSphereProxyDockerContainer 文件中的相关配置。
-ShardingSphere-Proxy 输出的日志带有 :Scaling-Proxy 前缀。
+ShardingSphere-Proxy 输出的日志带有 :Pipeline-Proxy 前缀。
使用 Maven 的方式运行用例。以 MySQL 为例:
```
-./mvnw -nsu -B install -f shardingsphere-test/shardingsphere-test-e2e/shardingsphere-test-e2e-scaling/pom.xml -Dscaling.it.env.type=DOCKER -Dscaling.it.docker.mysql.version=${image-name}
+./mvnw -nsu -B install -f shardingsphere-test/shardingsphere-test-e2e/shardingsphere-test-e2e-pipeline/pom.xml -Dpipeline.it.env.type=DOCKER -Dpipeline.it.docker.mysql.version=${image-name}
```
也可以使用 IDE 的方式运行用例。`it-env.properties` 可以配置如下:
```
-scaling.it.env.type=DOCKER
-scaling.it.docker.mysql.version=mysql:5.7
+pipeline.it.env.type=DOCKER
+pipeline.it.docker.mysql.version=mysql:5.7
```
\ No newline at end of file
diff --git a/docs/document/content/test-manual/scaling-integration-test/_index.en.md b/docs/document/content/test-manual/scaling-integration-test/_index.en.md
index b1eb387d6ba..c3b5894a0d9 100644
--- a/docs/document/content/test-manual/scaling-integration-test/_index.en.md
+++ b/docs/document/content/test-manual/scaling-integration-test/_index.en.md
@@ -1,6 +1,6 @@
+++
pre = "<b>6.4. </b>"
-title = "Scaling Integration Test"
+title = "Pipeline Integration Test"
weight = 4
+++
@@ -18,7 +18,7 @@ Currently, you can use MySQL, PostgreSQL and openGuass databases.
## User guide
-Module path: `shardingsphere-test/shardingsphere-test-e2e/shardingsphere-test-e2e-scaling`.
+Module path: `shardingsphere-test/shardingsphere-test-e2e/shardingsphere-test-e2e-pipeline`.
### Environment setup
@@ -37,7 +37,7 @@ Currently, all the test cases are directly inherited from `BaseExtraSQLITCase` a
- `BaseITCase`: Provide generic methods for sub-class.
- `BaseExtraSQLITCase`: Provide table creation and CRUD statement execution methods.
-Test case example: MySQLGeneralScalingIT.
+Test case example: MySQLGeneralPipelineE2EIT.
Functions included:
- Database-level migration (all tables).
- Table-level migration (any number).
@@ -58,11 +58,11 @@ The user starts ShardingSphere-Proxy locally in advance, along with dependent co
The port required for ShardingSphere-Proxy is 3307.
Take MySQL as an example, `it-env.properties` can be configured as follows:
```
-scaling.it.env.type=NATIVE
-scaling.it.native.database=mysql
-scaling.it.native.mysql.username=root
-scaling.it.native.mysql.password=root
-scaling.it.native.mysql.port=3306
+pipeline.it.env.type=NATIVE
+pipeline.it.native.database=mysql
+pipeline.it.native.mysql.username=root
+pipeline.it.native.mysql.password=root
+pipeline.it.native.mysql.port=3306
```
Find the appropriate test case and start it with Junit under the IDE.
@@ -72,7 +72,7 @@ Find the appropriate test case and start it with Junit under the IDE.
Step 1: Package mirror.
```
-./mvnw -B clean install -am -pl shardingsphere-test/shardingsphere-test-e2e/shardingsphere-test-e2e-scaling -Pit.env.docker -DskipTests
+./mvnw -B clean install -am -pl shardingsphere-test/shardingsphere-test-e2e/shardingsphere-test-e2e-pipeline -Pit.env.docker -DskipTests
```
Running the above command will build a Docker mirror apache/shardingsphere-proxy-test:latest used for integration testing.
@@ -80,17 +80,17 @@ The mirror sets the port for remote debugging and the default port is 3308. If o
If you need to adjust Docker mirror startup parameters, you can modify the configuration of the ShardingSphereProxyDockerContainer file.
-The output log of ShardingSphere-Proxy has the prefix Scaling-Proxy.
+The output log of ShardingSphere-Proxy has the prefix Pipeline-Proxy.
Use Maven to run the test cases. Take MySQL as an example:
```
-./mvnw -nsu -B install -f shardingsphere-test/shardingsphere-test-e2e/shardingsphere-test-e2e-scaling/pom.xml -Dscaling.it.env.type=DOCKER -Dscaling.it.docker.mysql.version=${image-name}
+./mvnw -nsu -B install -f shardingsphere-test/shardingsphere-test-e2e/shardingsphere-test-e2e-pipeline/pom.xml -Dpipeline.it.env.type=DOCKER -Dpipeline.it.docker.mysql.version=${image-name}
```
You can also use IDE to run test cases. `it-env.properties` can be configured as follows:
```
-scaling.it.env.type=DOCKER
-scaling.it.docker.mysql.version=mysql:5.7
+pipeline.it.env.type=DOCKER
+pipeline.it.docker.mysql.version=mysql:5.7
```
diff --git a/test/e2e/scaling/pom.xml b/test/e2e/pipeline/pom.xml
similarity index 98%
rename from test/e2e/scaling/pom.xml
rename to test/e2e/pipeline/pom.xml
index ed0e99bcde8..13f01d7a93c 100644
--- a/test/e2e/scaling/pom.xml
+++ b/test/e2e/pipeline/pom.xml
@@ -24,7 +24,7 @@
<artifactId>shardingsphere-test-e2e</artifactId>
<version>5.2.2-SNAPSHOT</version>
</parent>
- <artifactId>shardingsphere-test-e2e-scaling</artifactId>
+ <artifactId>shardingsphere-test-e2e-pipeline</artifactId>
<name>${project.artifactId}</name>
<properties>
diff --git a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/base/BaseIncrementTask.java b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/base/BaseIncrementTask.java
similarity index 100%
rename from test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/base/BaseIncrementTask.java
rename to test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/base/BaseIncrementTask.java
diff --git a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/base/BaseITCase.java b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/base/PipelineBaseE2EIT.java
similarity index 90%
rename from test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/base/BaseITCase.java
rename to test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/base/PipelineBaseE2EIT.java
index a909bff60d6..a48258424bd 100644
--- a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/base/BaseITCase.java
+++ b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/base/PipelineBaseE2EIT.java
@@ -27,13 +27,13 @@ import org.apache.shardingsphere.data.pipeline.core.util.ThreadUtil;
import org.apache.shardingsphere.infra.database.metadata.url.JdbcUrlAppender;
import org.apache.shardingsphere.infra.database.type.DatabaseType;
import org.apache.shardingsphere.test.e2e.data.pipeline.command.ExtraSQLCommand;
-import org.apache.shardingsphere.test.e2e.data.pipeline.env.IntegrationTestEnvironment;
-import org.apache.shardingsphere.test.e2e.data.pipeline.env.enums.ITEnvTypeEnum;
+import org.apache.shardingsphere.test.e2e.data.pipeline.env.PipelineE2EEnvironment;
+import org.apache.shardingsphere.test.e2e.data.pipeline.env.enums.PipelineEnvTypeEnum;
import org.apache.shardingsphere.test.e2e.data.pipeline.framework.container.compose.BaseContainerComposer;
import org.apache.shardingsphere.test.e2e.data.pipeline.framework.container.compose.DockerContainerComposer;
import org.apache.shardingsphere.test.e2e.data.pipeline.framework.container.compose.NativeContainerComposer;
-import org.apache.shardingsphere.test.e2e.data.pipeline.framework.param.ScalingParameterized;
-import org.apache.shardingsphere.test.e2e.data.pipeline.framework.watcher.ScalingWatcher;
+import org.apache.shardingsphere.test.e2e.data.pipeline.framework.param.PipelineTestParameter;
+import org.apache.shardingsphere.test.e2e.data.pipeline.framework.watcher.PipelineWatcher;
import org.apache.shardingsphere.test.e2e.env.container.atomic.constants.ProxyContainerConstants;
import org.apache.shardingsphere.test.e2e.env.container.atomic.storage.DockerStorageContainer;
import org.apache.shardingsphere.test.e2e.env.container.atomic.util.DatabaseTypeUtil;
@@ -66,31 +66,31 @@ import java.util.stream.Collectors;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
-@Slf4j
@Getter(AccessLevel.PROTECTED)
-public abstract class BaseITCase {
+@Slf4j
+public abstract class PipelineBaseE2EIT {
- protected static final IntegrationTestEnvironment ENV = IntegrationTestEnvironment.getInstance();
+ protected static final PipelineE2EEnvironment ENV = PipelineE2EEnvironment.getInstance();
protected static final String SCHEMA_NAME = "test";
protected static final String PROXY_DATABASE = "sharding_db";
- protected static final String DS_0 = "scaling_it_0";
+ protected static final String DS_0 = "pipeline_it_0";
- protected static final String DS_1 = "scaling_it_1";
+ protected static final String DS_1 = "pipeline_it_1";
- protected static final String DS_2 = "scaling_it_2";
+ protected static final String DS_2 = "pipeline_it_2";
- protected static final String DS_3 = "scaling_it_3";
+ protected static final String DS_3 = "pipeline_it_3";
- protected static final String DS_4 = "scaling_it_4";
+ protected static final String DS_4 = "pipeline_it_4";
protected static final int TABLE_INIT_ROW_COUNT = 3000;
@Rule
@Getter(AccessLevel.NONE)
- public ScalingWatcher scalingWatcher;
+ public PipelineWatcher pipelineWatcher;
private final BaseContainerComposer containerComposer;
@@ -109,13 +109,13 @@ public abstract class BaseITCase {
@Setter
private Thread increaseTaskThread;
- public BaseITCase(final ScalingParameterized parameterized) {
- databaseType = parameterized.getDatabaseType();
- containerComposer = ENV.getItEnvType() == ITEnvTypeEnum.DOCKER
- ? new DockerContainerComposer(parameterized.getDatabaseType(), parameterized.getStorageContainerImage())
- : new NativeContainerComposer(parameterized.getDatabaseType());
+ public PipelineBaseE2EIT(final PipelineTestParameter testParameter) {
+ databaseType = testParameter.getDatabaseType();
+ containerComposer = ENV.getItEnvType() == PipelineEnvTypeEnum.DOCKER
+ ? new DockerContainerComposer(testParameter.getDatabaseType(), testParameter.getStorageContainerImage())
+ : new NativeContainerComposer(testParameter.getDatabaseType());
containerComposer.start();
- if (ENV.getItEnvType() == ITEnvTypeEnum.DOCKER) {
+ if (ENV.getItEnvType() == PipelineEnvTypeEnum.DOCKER) {
DockerStorageContainer storageContainer = ((DockerContainerComposer) containerComposer).getStorageContainer();
username = storageContainer.getUsername();
password = storageContainer.getPassword();
@@ -123,12 +123,12 @@ public abstract class BaseITCase {
username = ENV.getActualDataSourceUsername(databaseType);
password = ENV.getActualDataSourcePassword(databaseType);
}
- createProxyDatabase(parameterized.getDatabaseType());
- if (ITEnvTypeEnum.NATIVE == ENV.getItEnvType()) {
+ createProxyDatabase(testParameter.getDatabaseType());
+ if (PipelineEnvTypeEnum.NATIVE == ENV.getItEnvType()) {
cleanUpDataSource();
}
- extraSQLCommand = JAXB.unmarshal(Objects.requireNonNull(BaseITCase.class.getClassLoader().getResource(parameterized.getScenario())), ExtraSQLCommand.class);
- scalingWatcher = new ScalingWatcher(containerComposer);
+ extraSQLCommand = JAXB.unmarshal(Objects.requireNonNull(PipelineBaseE2EIT.class.getClassLoader().getResource(testParameter.getScenario())), ExtraSQLCommand.class);
+ pipelineWatcher = new PipelineWatcher(containerComposer);
}
private void cleanUpDataSource() {
@@ -144,7 +144,7 @@ public abstract class BaseITCase {
}
String jdbcUrl = containerComposer.getProxyJdbcUrl(defaultDatabaseName);
try (Connection connection = DriverManager.getConnection(jdbcUrl, ProxyContainerConstants.USERNAME, ProxyContainerConstants.PASSWORD)) {
- if (ITEnvTypeEnum.NATIVE == ENV.getItEnvType()) {
+ if (PipelineEnvTypeEnum.NATIVE == ENV.getItEnvType()) {
try {
connectionExecuteWithLog(connection, String.format("DROP DATABASE %s", PROXY_DATABASE));
} catch (final SQLException ex) {
@@ -173,7 +173,7 @@ public abstract class BaseITCase {
}
protected String getActualJdbcUrlTemplate(final String databaseName, final boolean isInContainer) {
- if (ITEnvTypeEnum.DOCKER == ENV.getItEnvType()) {
+ if (PipelineEnvTypeEnum.DOCKER == ENV.getItEnvType()) {
DockerStorageContainer storageContainer = ((DockerContainerComposer) containerComposer).getStorageContainer();
return isInContainer
? DataSourceEnvironment.getURL(getDatabaseType(), getDatabaseType().getType().toLowerCase() + ".host", storageContainer.getExposedPort(), databaseName)
diff --git a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/createtable/CreateTableSQLGeneratorIT.java b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/createtable/CreateTableSQLGeneratorIT.java
similarity index 82%
rename from test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/createtable/CreateTableSQLGeneratorIT.java
rename to test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/createtable/CreateTableSQLGeneratorIT.java
index 9ddc114a377..7b65048300b 100644
--- a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/createtable/CreateTableSQLGeneratorIT.java
+++ b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/createtable/CreateTableSQLGeneratorIT.java
@@ -26,9 +26,9 @@ import org.apache.shardingsphere.infra.database.type.dialect.PostgreSQLDatabaseT
import org.apache.shardingsphere.test.e2e.data.pipeline.entity.CreateTableSQLGeneratorAssertionEntity;
import org.apache.shardingsphere.test.e2e.data.pipeline.entity.CreateTableSQLGeneratorAssertionsRootEntity;
import org.apache.shardingsphere.test.e2e.data.pipeline.entity.CreateTableSQLGeneratorOutputEntity;
-import org.apache.shardingsphere.test.e2e.data.pipeline.env.IntegrationTestEnvironment;
-import org.apache.shardingsphere.test.e2e.data.pipeline.env.enums.ITEnvTypeEnum;
-import org.apache.shardingsphere.test.e2e.data.pipeline.framework.param.ScalingParameterized;
+import org.apache.shardingsphere.test.e2e.data.pipeline.env.PipelineE2EEnvironment;
+import org.apache.shardingsphere.test.e2e.data.pipeline.env.enums.PipelineEnvTypeEnum;
+import org.apache.shardingsphere.test.e2e.data.pipeline.framework.param.PipelineTestParameter;
import org.apache.shardingsphere.test.e2e.data.pipeline.util.DockerImageVersion;
import org.apache.shardingsphere.test.e2e.env.container.atomic.constants.StorageContainerConstants;
import org.apache.shardingsphere.test.e2e.env.container.atomic.storage.DockerStorageContainer;
@@ -72,52 +72,52 @@ public final class CreateTableSQLGeneratorIT {
private static final String DEFAULT_SCHEMA = "public";
- private static final String DEFAULT_DATABASE = "scaling_it_0";
+ private static final String DEFAULT_DATABASE = "pipeline_it_0";
private static final Pattern REPLACE_LINE_SPACE = Pattern.compile("\\s*|\t|\r|\n");
- private static final IntegrationTestEnvironment ENV = IntegrationTestEnvironment.getInstance();
+ private static final PipelineE2EEnvironment ENV = PipelineE2EEnvironment.getInstance();
private final DockerStorageContainer storageContainer;
- private final ScalingParameterized parameterized;
+ private final PipelineTestParameter testParameter;
private final CreateTableSQLGeneratorAssertionsRootEntity rootEntity;
- public CreateTableSQLGeneratorIT(final ScalingParameterized parameterized) {
- this.parameterized = parameterized;
+ public CreateTableSQLGeneratorIT(final PipelineTestParameter testParameter) {
+ this.testParameter = testParameter;
rootEntity = JAXB.unmarshal(
- Objects.requireNonNull(CreateTableSQLGeneratorIT.class.getClassLoader().getResource(parameterized.getScenario())), CreateTableSQLGeneratorAssertionsRootEntity.class);
- DatabaseType databaseType = parameterized.getDatabaseType();
- StorageContainerConfiguration storageContainerConfig = DatabaseTypeUtil.isMySQL(databaseType) && new DockerImageVersion(parameterized.getStorageContainerImage()).getMajorVersion() > 5
+ Objects.requireNonNull(CreateTableSQLGeneratorIT.class.getClassLoader().getResource(testParameter.getScenario())), CreateTableSQLGeneratorAssertionsRootEntity.class);
+ DatabaseType databaseType = testParameter.getDatabaseType();
+ StorageContainerConfiguration storageContainerConfig = DatabaseTypeUtil.isMySQL(databaseType) && new DockerImageVersion(testParameter.getStorageContainerImage()).getMajorVersion() > 5
? MySQLContainerConfigurationFactory.newInstance(null, null, Collections.singletonMap("/env/mysql/mysql8/my.cnf", StorageContainerConstants.MYSQL_CONF_IN_CONTAINER))
: StorageContainerConfigurationFactory.newInstance(databaseType);
- storageContainer = (DockerStorageContainer) StorageContainerFactory.newInstance(databaseType, parameterized.getStorageContainerImage(), "",
+ storageContainer = (DockerStorageContainer) StorageContainerFactory.newInstance(databaseType, testParameter.getStorageContainerImage(), "",
storageContainerConfig);
storageContainer.start();
}
@Parameters(name = "{0}")
- public static Collection<ScalingParameterized> getParameters() {
- Collection<ScalingParameterized> result = new LinkedList<>();
- if (ENV.getItEnvType() == ITEnvTypeEnum.NONE) {
+ public static Collection<PipelineTestParameter> getTestParameters() {
+ Collection<PipelineTestParameter> result = new LinkedList<>();
+ if (ENV.getItEnvType() == PipelineEnvTypeEnum.NONE) {
return result;
}
for (String each : ENV.getPostgresVersions()) {
- result.add(new ScalingParameterized(new PostgreSQLDatabaseType(), each, String.join("/", PARENT_PATH, POSTGRES_CASE_FILE_PATH)));
+ result.add(new PipelineTestParameter(new PostgreSQLDatabaseType(), each, String.join("/", PARENT_PATH, POSTGRES_CASE_FILE_PATH)));
}
for (String each : ENV.getMysqlVersions()) {
- result.add(new ScalingParameterized(new MySQLDatabaseType(), each, String.join("/", PARENT_PATH, MYSQL_CASE_FILE_PATH)));
+ result.add(new PipelineTestParameter(new MySQLDatabaseType(), each, String.join("/", PARENT_PATH, MYSQL_CASE_FILE_PATH)));
}
for (String each : ENV.getOpenGaussVersions()) {
- result.add(new ScalingParameterized(new OpenGaussDatabaseType(), each, String.join("/", PARENT_PATH, OPEN_GAUSS_CASE_FILE_PATH)));
+ result.add(new PipelineTestParameter(new OpenGaussDatabaseType(), each, String.join("/", PARENT_PATH, OPEN_GAUSS_CASE_FILE_PATH)));
}
return result;
}
@Test
public void assertGenerateCreateTableSQL() throws SQLException {
- log.info("generate create table sql, parameterized: {}", parameterized);
+ log.info("generate create table sql, parameterized: {}", testParameter);
DataSource dataSource = storageContainer.createAccessDataSource(DEFAULT_DATABASE);
try (
Connection connection = dataSource.getConnection();
@@ -125,7 +125,7 @@ public final class CreateTableSQLGeneratorIT {
int majorVersion = connection.getMetaData().getDatabaseMajorVersion();
for (CreateTableSQLGeneratorAssertionEntity each : rootEntity.getAssertions()) {
statement.execute(each.getInput().getSql());
- Collection<String> actualDDLs = CreateTableSQLGeneratorFactory.getInstance(parameterized.getDatabaseType()).generate(dataSource, DEFAULT_SCHEMA, each.getInput().getTable());
+ Collection<String> actualDDLs = CreateTableSQLGeneratorFactory.getInstance(testParameter.getDatabaseType()).generate(dataSource, DEFAULT_SCHEMA, each.getInput().getTable());
assertIsCorrect(actualDDLs, getVersionOutput(each.getOutputs(), majorVersion));
}
}
diff --git a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/AbstractMigrationITCase.java b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/AbstractMigrationE2EIT.java
similarity index 93%
rename from test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/AbstractMigrationITCase.java
rename to test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/AbstractMigrationE2EIT.java
index 9357d12c1e2..bbdd1743946 100644
--- a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/AbstractMigrationITCase.java
+++ b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/AbstractMigrationE2EIT.java
@@ -21,10 +21,10 @@ import com.google.common.base.Strings;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import org.apache.shardingsphere.data.pipeline.core.util.ThreadUtil;
-import org.apache.shardingsphere.test.e2e.data.pipeline.cases.base.BaseITCase;
+import org.apache.shardingsphere.test.e2e.data.pipeline.cases.base.PipelineBaseE2EIT;
import org.apache.shardingsphere.test.e2e.data.pipeline.command.MigrationDistSQLCommand;
-import org.apache.shardingsphere.test.e2e.data.pipeline.env.enums.ITEnvTypeEnum;
-import org.apache.shardingsphere.test.e2e.data.pipeline.framework.param.ScalingParameterized;
+import org.apache.shardingsphere.test.e2e.data.pipeline.env.enums.PipelineEnvTypeEnum;
+import org.apache.shardingsphere.test.e2e.data.pipeline.framework.param.PipelineTestParameter;
import org.apache.shardingsphere.test.e2e.env.container.atomic.util.DatabaseTypeUtil;
import org.opengauss.util.PSQLException;
@@ -41,16 +41,16 @@ import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertTrue;
+@Getter
@Slf4j
-public abstract class AbstractMigrationITCase extends BaseITCase {
+public abstract class AbstractMigrationE2EIT extends PipelineBaseE2EIT {
- @Getter
private final MigrationDistSQLCommand migrationDistSQLCommand;
- public AbstractMigrationITCase(final ScalingParameterized parameterized) {
- super(parameterized);
- migrationDistSQLCommand = JAXB.unmarshal(Objects.requireNonNull(BaseITCase.class.getClassLoader().getResource("env/common/migration-command.xml")), MigrationDistSQLCommand.class);
- if (ITEnvTypeEnum.NATIVE == ENV.getItEnvType()) {
+ public AbstractMigrationE2EIT(final PipelineTestParameter testParameter) {
+ super(testParameter);
+ migrationDistSQLCommand = JAXB.unmarshal(Objects.requireNonNull(PipelineBaseE2EIT.class.getClassLoader().getResource("env/common/migration-command.xml")), MigrationDistSQLCommand.class);
+ if (PipelineEnvTypeEnum.NATIVE == ENV.getItEnvType()) {
try {
cleanUpPipelineJobs();
} catch (final SQLException ex) {
@@ -67,7 +67,7 @@ public abstract class AbstractMigrationITCase extends BaseITCase {
}
protected void addMigrationSourceResource() throws SQLException {
- if (ITEnvTypeEnum.NATIVE == ENV.getItEnvType()) {
+ if (PipelineEnvTypeEnum.NATIVE == ENV.getItEnvType()) {
try {
proxyExecuteWithLog("UNREGISTER MIGRATION SOURCE STORAGE UNIT ds_0", 2);
} catch (final SQLException ex) {
@@ -131,7 +131,7 @@ public abstract class AbstractMigrationITCase extends BaseITCase {
}
protected void addMigrationProcessConfig() throws SQLException {
- if (ITEnvTypeEnum.NATIVE == ENV.getItEnvType()) {
+ if (PipelineEnvTypeEnum.NATIVE == ENV.getItEnvType()) {
try {
proxyExecuteWithLog("DROP MIGRATION PROCESS CONFIGURATION '/'", 0);
} catch (final SQLException ex) {
diff --git a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/MySQLMigrationGeneralIT.java b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/MySQLMigrationGeneralE2EIT.java
similarity index 80%
rename from test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/MySQLMigrationGeneralIT.java
rename to test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/MySQLMigrationGeneralE2EIT.java
index a7a18fcab28..5c1da2acbd4 100644
--- a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/MySQLMigrationGeneralIT.java
+++ b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/MySQLMigrationGeneralE2EIT.java
@@ -20,13 +20,13 @@ package org.apache.shardingsphere.test.e2e.data.pipeline.cases.migration.general
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.tuple.Pair;
import org.apache.shardingsphere.infra.database.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.test.e2e.data.pipeline.cases.migration.AbstractMigrationITCase;
+import org.apache.shardingsphere.test.e2e.data.pipeline.cases.migration.AbstractMigrationE2EIT;
import org.apache.shardingsphere.test.e2e.data.pipeline.cases.task.MySQLIncrementTask;
-import org.apache.shardingsphere.test.e2e.data.pipeline.env.enums.ITEnvTypeEnum;
-import org.apache.shardingsphere.test.e2e.data.pipeline.framework.helper.ScalingCaseHelper;
-import org.apache.shardingsphere.test.e2e.data.pipeline.framework.param.ScalingParameterized;
+import org.apache.shardingsphere.test.e2e.data.pipeline.env.enums.PipelineEnvTypeEnum;
+import org.apache.shardingsphere.test.e2e.data.pipeline.framework.helper.PipelineCaseHelper;
+import org.apache.shardingsphere.test.e2e.data.pipeline.framework.param.PipelineTestParameter;
import org.apache.shardingsphere.sharding.algorithm.keygen.SnowflakeKeyGenerateAlgorithm;
-import org.apache.shardingsphere.test.e2e.data.pipeline.cases.base.BaseITCase;
+import org.apache.shardingsphere.test.e2e.data.pipeline.cases.base.PipelineBaseE2EIT;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@@ -44,30 +44,27 @@ import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertTrue;
-/**
- * General migration test case, includes multiple cases.
- */
-@Slf4j
@RunWith(Parameterized.class)
-public final class MySQLMigrationGeneralIT extends AbstractMigrationITCase {
+@Slf4j
+public final class MySQLMigrationGeneralE2EIT extends AbstractMigrationE2EIT {
- private final ScalingParameterized parameterized;
+ private final PipelineTestParameter testParameter;
- public MySQLMigrationGeneralIT(final ScalingParameterized parameterized) {
- super(parameterized);
- this.parameterized = parameterized;
- log.info("parameterized:{}", parameterized);
+ public MySQLMigrationGeneralE2EIT(final PipelineTestParameter testParameter) {
+ super(testParameter);
+ this.testParameter = testParameter;
+ log.info("testParameter:{}", testParameter);
}
@Parameters(name = "{0}")
- public static Collection<ScalingParameterized> getParameters() {
- Collection<ScalingParameterized> result = new LinkedList<>();
- if (BaseITCase.ENV.getItEnvType() == ITEnvTypeEnum.NONE) {
+ public static Collection<PipelineTestParameter> getTestParameters() {
+ Collection<PipelineTestParameter> result = new LinkedList<>();
+ if (PipelineBaseE2EIT.ENV.getItEnvType() == PipelineEnvTypeEnum.NONE) {
return result;
}
MySQLDatabaseType databaseType = new MySQLDatabaseType();
- for (String each : BaseITCase.ENV.listStorageContainerImages(databaseType)) {
- result.add(new ScalingParameterized(databaseType, each, "env/scenario/general/mysql.xml"));
+ for (String each : PipelineBaseE2EIT.ENV.listStorageContainerImages(databaseType)) {
+ result.add(new PipelineTestParameter(databaseType, each, "env/scenario/general/mysql.xml"));
}
return result;
}
@@ -88,7 +85,7 @@ public final class MySQLMigrationGeneralIT extends AbstractMigrationITCase {
createTargetOrderTableEncryptRule();
createTargetOrderItemTableRule();
JdbcTemplate jdbcTemplate = new JdbcTemplate(getSourceDataSource());
- Pair<List<Object[]>, List<Object[]>> dataPair = ScalingCaseHelper.generateFullInsertData(parameterized.getDatabaseType(), 3000);
+ Pair<List<Object[]>, List<Object[]>> dataPair = PipelineCaseHelper.generateFullInsertData(testParameter.getDatabaseType(), 3000);
log.info("init data begin: {}", LocalDateTime.now());
jdbcTemplate.batchUpdate(getExtraSQLCommand().getFullInsertOrder(getSourceTableOrderName()), dataPair.getLeft());
jdbcTemplate.batchUpdate(getExtraSQLCommand().getFullInsertOrderItem(), dataPair.getRight());
@@ -107,7 +104,7 @@ public final class MySQLMigrationGeneralIT extends AbstractMigrationITCase {
}
List<String> lastJobIds = listJobId();
assertThat(lastJobIds.size(), is(0));
- assertGreaterThanOrderTableInitRows(BaseITCase.TABLE_INIT_ROW_COUNT, "");
+ assertGreaterThanOrderTableInitRows(PipelineBaseE2EIT.TABLE_INIT_ROW_COUNT, "");
}
private void assertMigrationSuccessById(final String jobId, final String algorithmType) throws SQLException, InterruptedException {
diff --git a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/PostgreSQLMigrationGeneralIT.java b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/PostgreSQLMigrationGeneralE2EIT.java
similarity index 70%
rename from test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/PostgreSQLMigrationGeneralIT.java
rename to test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/PostgreSQLMigrationGeneralE2EIT.java
index 2db81bf8670..fbe3f49c692 100644
--- a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/PostgreSQLMigrationGeneralIT.java
+++ b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/PostgreSQLMigrationGeneralE2EIT.java
@@ -21,13 +21,13 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.tuple.Pair;
import org.apache.shardingsphere.infra.database.type.dialect.OpenGaussDatabaseType;
import org.apache.shardingsphere.infra.database.type.dialect.PostgreSQLDatabaseType;
-import org.apache.shardingsphere.test.e2e.data.pipeline.cases.migration.AbstractMigrationITCase;
+import org.apache.shardingsphere.test.e2e.data.pipeline.cases.migration.AbstractMigrationE2EIT;
import org.apache.shardingsphere.test.e2e.data.pipeline.cases.task.PostgreSQLIncrementTask;
-import org.apache.shardingsphere.test.e2e.data.pipeline.env.enums.ITEnvTypeEnum;
-import org.apache.shardingsphere.test.e2e.data.pipeline.framework.helper.ScalingCaseHelper;
-import org.apache.shardingsphere.test.e2e.data.pipeline.framework.param.ScalingParameterized;
+import org.apache.shardingsphere.test.e2e.data.pipeline.env.enums.PipelineEnvTypeEnum;
+import org.apache.shardingsphere.test.e2e.data.pipeline.framework.helper.PipelineCaseHelper;
+import org.apache.shardingsphere.test.e2e.data.pipeline.framework.param.PipelineTestParameter;
import org.apache.shardingsphere.sharding.algorithm.keygen.SnowflakeKeyGenerateAlgorithm;
-import org.apache.shardingsphere.test.e2e.data.pipeline.cases.base.BaseITCase;
+import org.apache.shardingsphere.test.e2e.data.pipeline.cases.base.PipelineBaseE2EIT;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@@ -43,19 +43,16 @@ import java.util.List;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
-/**
- * PostgreSQL and openGauss general scaling test case.
- */
@RunWith(Parameterized.class)
@Slf4j
-public final class PostgreSQLMigrationGeneralIT extends AbstractMigrationITCase {
+public final class PostgreSQLMigrationGeneralE2EIT extends AbstractMigrationE2EIT {
- private final ScalingParameterized parameterized;
+ private final PipelineTestParameter testParameter;
- public PostgreSQLMigrationGeneralIT(final ScalingParameterized parameterized) {
- super(parameterized);
- this.parameterized = parameterized;
- log.info("parameterized:{}", parameterized);
+ public PostgreSQLMigrationGeneralE2EIT(final PipelineTestParameter testParameter) {
+ super(testParameter);
+ this.testParameter = testParameter;
+ log.info("testParameter:{}", testParameter);
}
@Override
@@ -64,16 +61,16 @@ public final class PostgreSQLMigrationGeneralIT extends AbstractMigrationITCase
}
@Parameters(name = "{0}")
- public static Collection<ScalingParameterized> getParameters() {
- Collection<ScalingParameterized> result = new LinkedList<>();
- if (BaseITCase.ENV.getItEnvType() == ITEnvTypeEnum.NONE) {
+ public static Collection<PipelineTestParameter> getTestParameters() {
+ Collection<PipelineTestParameter> result = new LinkedList<>();
+ if (PipelineBaseE2EIT.ENV.getItEnvType() == PipelineEnvTypeEnum.NONE) {
return result;
}
- for (String each : BaseITCase.ENV.listStorageContainerImages(new PostgreSQLDatabaseType())) {
- result.add(new ScalingParameterized(new PostgreSQLDatabaseType(), each, "env/scenario/general/postgresql.xml"));
+ for (String each : PipelineBaseE2EIT.ENV.listStorageContainerImages(new PostgreSQLDatabaseType())) {
+ result.add(new PipelineTestParameter(new PostgreSQLDatabaseType(), each, "env/scenario/general/postgresql.xml"));
}
- for (String each : BaseITCase.ENV.listStorageContainerImages(new OpenGaussDatabaseType())) {
- result.add(new ScalingParameterized(new OpenGaussDatabaseType(), each, "env/scenario/general/postgresql.xml"));
+ for (String each : PipelineBaseE2EIT.ENV.listStorageContainerImages(new OpenGaussDatabaseType())) {
+ result.add(new PipelineTestParameter(new OpenGaussDatabaseType(), each, "env/scenario/general/postgresql.xml"));
}
return result;
}
@@ -81,16 +78,16 @@ public final class PostgreSQLMigrationGeneralIT extends AbstractMigrationITCase
@Test
public void assertMigrationSuccess() throws SQLException, InterruptedException {
addMigrationProcessConfig();
- createSourceSchema(BaseITCase.SCHEMA_NAME);
+ createSourceSchema(PipelineBaseE2EIT.SCHEMA_NAME);
createSourceOrderTable();
createSourceOrderItemTable();
- createSourceTableIndexList(BaseITCase.SCHEMA_NAME);
- createSourceCommentOnList(BaseITCase.SCHEMA_NAME);
+ createSourceTableIndexList(PipelineBaseE2EIT.SCHEMA_NAME);
+ createSourceCommentOnList(PipelineBaseE2EIT.SCHEMA_NAME);
addMigrationSourceResource();
addMigrationTargetResource();
createTargetOrderTableRule();
createTargetOrderItemTableRule();
- Pair<List<Object[]>, List<Object[]>> dataPair = ScalingCaseHelper.generateFullInsertData(parameterized.getDatabaseType(), BaseITCase.TABLE_INIT_ROW_COUNT);
+ Pair<List<Object[]>, List<Object[]>> dataPair = PipelineCaseHelper.generateFullInsertData(testParameter.getDatabaseType(), PipelineBaseE2EIT.TABLE_INIT_ROW_COUNT);
JdbcTemplate jdbcTemplate = new JdbcTemplate(getSourceDataSource());
log.info("init data begin: {}", LocalDateTime.now());
jdbcTemplate.batchUpdate(getExtraSQLCommand().getFullInsertOrder(getSourceTableOrderName()), dataPair.getLeft());
@@ -103,22 +100,22 @@ public final class PostgreSQLMigrationGeneralIT extends AbstractMigrationITCase
}
List<String> lastJobIds = listJobId();
assertThat(lastJobIds.size(), is(0));
- assertGreaterThanOrderTableInitRows(BaseITCase.TABLE_INIT_ROW_COUNT, BaseITCase.SCHEMA_NAME);
+ assertGreaterThanOrderTableInitRows(PipelineBaseE2EIT.TABLE_INIT_ROW_COUNT, PipelineBaseE2EIT.SCHEMA_NAME);
}
private void checkOrderMigration(final JdbcTemplate jdbcTemplate) throws SQLException, InterruptedException {
startMigrationWithSchema(getSourceTableOrderName(), "t_order");
- startIncrementTask(new PostgreSQLIncrementTask(jdbcTemplate, BaseITCase.SCHEMA_NAME, getSourceTableOrderName(), 20));
+ startIncrementTask(new PostgreSQLIncrementTask(jdbcTemplate, PipelineBaseE2EIT.SCHEMA_NAME, getSourceTableOrderName(), 20));
String jobId = getJobIdByTableName(getSourceTableOrderName());
waitIncrementTaskFinished(String.format("SHOW MIGRATION STATUS '%s'", jobId));
stopMigrationByJobId(jobId);
long recordId = new SnowflakeKeyGenerateAlgorithm().generateKey();
sourceExecuteWithLog(
- String.format("INSERT INTO %s (order_id,user_id,status) VALUES (%s, %s, '%s')", String.join(".", BaseITCase.SCHEMA_NAME, getSourceTableOrderName()), recordId, 1, "afterStop"));
+ String.format("INSERT INTO %s (order_id,user_id,status) VALUES (%s, %s, '%s')", String.join(".", PipelineBaseE2EIT.SCHEMA_NAME, getSourceTableOrderName()), recordId, 1, "afterStop"));
startMigrationByJobId(jobId);
// must refresh firstly, otherwise proxy can't get schema and table info
proxyExecuteWithLog("REFRESH TABLE METADATA;", 2);
- assertProxyOrderRecordExist(recordId, String.join(".", BaseITCase.SCHEMA_NAME, getTargetTableOrderName()));
+ assertProxyOrderRecordExist(recordId, String.join(".", PipelineBaseE2EIT.SCHEMA_NAME, getTargetTableOrderName()));
assertCheckMigrationSuccess(jobId, "DATA_MATCH");
}
diff --git a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/primarykey/TextPrimaryKeyMigrationIT.java b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/primarykey/TextPrimaryKeyMigrationE2EIT.java
similarity index 73%
rename from test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/primarykey/TextPrimaryKeyMigrationIT.java
rename to test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/primarykey/TextPrimaryKeyMigrationE2EIT.java
index d3dc08fc77e..94e2b08679d 100644
--- a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/primarykey/TextPrimaryKeyMigrationIT.java
+++ b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/primarykey/TextPrimaryKeyMigrationE2EIT.java
@@ -21,11 +21,11 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.shardingsphere.infra.database.type.dialect.MySQLDatabaseType;
import org.apache.shardingsphere.infra.database.type.dialect.OpenGaussDatabaseType;
import org.apache.shardingsphere.infra.database.type.dialect.PostgreSQLDatabaseType;
-import org.apache.shardingsphere.test.e2e.data.pipeline.cases.migration.AbstractMigrationITCase;
-import org.apache.shardingsphere.test.e2e.data.pipeline.env.enums.ITEnvTypeEnum;
-import org.apache.shardingsphere.test.e2e.data.pipeline.framework.param.ScalingParameterized;
+import org.apache.shardingsphere.test.e2e.data.pipeline.cases.migration.AbstractMigrationE2EIT;
+import org.apache.shardingsphere.test.e2e.data.pipeline.env.enums.PipelineEnvTypeEnum;
+import org.apache.shardingsphere.test.e2e.data.pipeline.framework.param.PipelineTestParameter;
import org.apache.shardingsphere.sharding.algorithm.keygen.UUIDKeyGenerateAlgorithm;
-import org.apache.shardingsphere.test.e2e.data.pipeline.cases.base.BaseITCase;
+import org.apache.shardingsphere.test.e2e.data.pipeline.cases.base.PipelineBaseE2EIT;
import org.apache.shardingsphere.test.e2e.env.container.atomic.util.DatabaseTypeUtil;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -46,11 +46,11 @@ import static org.hamcrest.Matchers.is;
@RunWith(Parameterized.class)
@Slf4j
-public class TextPrimaryKeyMigrationIT extends AbstractMigrationITCase {
+public class TextPrimaryKeyMigrationE2EIT extends AbstractMigrationE2EIT {
- public TextPrimaryKeyMigrationIT(final ScalingParameterized parameterized) {
- super(parameterized);
- log.info("parameterized:{}", parameterized);
+ public TextPrimaryKeyMigrationE2EIT(final PipelineTestParameter testParameter) {
+ super(testParameter);
+ log.info("testParameter:{}", testParameter);
}
@Override
@@ -62,20 +62,20 @@ public class TextPrimaryKeyMigrationIT extends AbstractMigrationITCase {
}
@Parameters(name = "{0}")
- public static Collection<ScalingParameterized> getParameters() {
- Collection<ScalingParameterized> result = new LinkedList<>();
- if (BaseITCase.ENV.getItEnvType() == ITEnvTypeEnum.NONE) {
+ public static Collection<PipelineTestParameter> getTestParameters() {
+ Collection<PipelineTestParameter> result = new LinkedList<>();
+ if (PipelineBaseE2EIT.ENV.getItEnvType() == PipelineEnvTypeEnum.NONE) {
return result;
}
- for (String version : BaseITCase.ENV.listStorageContainerImages(new MySQLDatabaseType())) {
- result.add(new ScalingParameterized(new MySQLDatabaseType(), version, "env/scenario/primary_key/text_primary_key/mysql.xml"));
- result.add(new ScalingParameterized(new MySQLDatabaseType(), version, "env/scenario/primary_key/unique_key/mysql.xml"));
+ for (String version : PipelineBaseE2EIT.ENV.listStorageContainerImages(new MySQLDatabaseType())) {
+ result.add(new PipelineTestParameter(new MySQLDatabaseType(), version, "env/scenario/primary_key/text_primary_key/mysql.xml"));
+ result.add(new PipelineTestParameter(new MySQLDatabaseType(), version, "env/scenario/primary_key/unique_key/mysql.xml"));
}
- for (String version : BaseITCase.ENV.listStorageContainerImages(new PostgreSQLDatabaseType())) {
- result.add(new ScalingParameterized(new PostgreSQLDatabaseType(), version, "env/scenario/primary_key/text_primary_key/postgresql.xml"));
+ for (String version : PipelineBaseE2EIT.ENV.listStorageContainerImages(new PostgreSQLDatabaseType())) {
+ result.add(new PipelineTestParameter(new PostgreSQLDatabaseType(), version, "env/scenario/primary_key/text_primary_key/postgresql.xml"));
}
- for (String version : BaseITCase.ENV.listStorageContainerImages(new OpenGaussDatabaseType())) {
- result.add(new ScalingParameterized(new OpenGaussDatabaseType(), version, "env/scenario/primary_key/text_primary_key/postgresql.xml"));
+ for (String version : PipelineBaseE2EIT.ENV.listStorageContainerImages(new OpenGaussDatabaseType())) {
+ result.add(new PipelineTestParameter(new OpenGaussDatabaseType(), version, "env/scenario/primary_key/text_primary_key/postgresql.xml"));
}
return result;
}
@@ -93,7 +93,7 @@ public class TextPrimaryKeyMigrationIT extends AbstractMigrationITCase {
sourceExecuteWithLog(String.format("INSERT INTO %s (order_id,user_id,status) VALUES (%s, %s, '%s')", getSourceTableOrderName(), "1000000000", 1, "afterStop"));
waitIncrementTaskFinished(String.format("SHOW MIGRATION STATUS '%s'", jobId));
assertCheckMigrationSuccess(jobId, "DATA_MATCH");
- if (BaseITCase.ENV.getItEnvType() == ITEnvTypeEnum.DOCKER) {
+ if (PipelineBaseE2EIT.ENV.getItEnvType() == PipelineEnvTypeEnum.DOCKER) {
commitMigrationByJobId(jobId);
List<String> lastJobIds = listJobId();
assertThat(lastJobIds.size(), is(0));
@@ -105,7 +105,7 @@ public class TextPrimaryKeyMigrationIT extends AbstractMigrationITCase {
UUIDKeyGenerateAlgorithm keyGenerateAlgorithm = new UUIDKeyGenerateAlgorithm();
try (Connection connection = getSourceDataSource().getConnection()) {
PreparedStatement preparedStatement = connection.prepareStatement(String.format("INSERT INTO %s (order_id,user_id,status) VALUES (?,?,?)", getSourceTableOrderName()));
- for (int i = 0; i < BaseITCase.TABLE_INIT_ROW_COUNT * 2; i++) {
+ for (int i = 0; i < PipelineBaseE2EIT.TABLE_INIT_ROW_COUNT * 2; i++) {
preparedStatement.setObject(1, keyGenerateAlgorithm.generateKey());
preparedStatement.setObject(2, ThreadLocalRandom.current().nextInt(0, 6));
preparedStatement.setObject(3, "OK");
diff --git a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/task/MySQLIncrementTask.java b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/task/MySQLIncrementTask.java
similarity index 96%
rename from test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/task/MySQLIncrementTask.java
rename to test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/task/MySQLIncrementTask.java
index 03e013be3ee..8c8ae23290c 100644
--- a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/task/MySQLIncrementTask.java
+++ b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/task/MySQLIncrementTask.java
@@ -21,7 +21,7 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.shardingsphere.test.e2e.data.pipeline.cases.base.BaseIncrementTask;
-import org.apache.shardingsphere.test.e2e.data.pipeline.framework.helper.ScalingCaseHelper;
+import org.apache.shardingsphere.test.e2e.data.pipeline.framework.helper.PipelineCaseHelper;
import org.apache.shardingsphere.sharding.spi.KeyGenerateAlgorithm;
import org.springframework.jdbc.core.JdbcTemplate;
@@ -69,7 +69,7 @@ public final class MySQLIncrementTask extends BaseIncrementTask {
private Object insertOrderItem() {
ThreadLocalRandom random = ThreadLocalRandom.current();
String status = 0 == random.nextInt() % 2 ? null : "NOT-NULL";
- Object[] orderInsertItemDate = new Object[]{primaryKeyGenerateAlgorithm.generateKey(), ScalingCaseHelper.generateSnowflakeKey(), random.nextInt(0, 6), status};
+ Object[] orderInsertItemDate = new Object[]{primaryKeyGenerateAlgorithm.generateKey(), PipelineCaseHelper.generateSnowflakeKey(), random.nextInt(0, 6), status};
jdbcTemplate.update("INSERT INTO t_order_item(item_id,order_id,user_id,status) VALUES(?, ?, ?, ?)", orderInsertItemDate);
return orderInsertItemDate[0];
}
diff --git a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/task/PostgreSQLIncrementTask.java b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/task/PostgreSQLIncrementTask.java
similarity index 97%
rename from test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/task/PostgreSQLIncrementTask.java
rename to test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/task/PostgreSQLIncrementTask.java
index c5794304d6e..4b274e1d9a9 100644
--- a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/task/PostgreSQLIncrementTask.java
+++ b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/task/PostgreSQLIncrementTask.java
@@ -21,7 +21,7 @@ import com.google.common.base.Strings;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.shardingsphere.test.e2e.data.pipeline.cases.base.BaseIncrementTask;
-import org.apache.shardingsphere.test.e2e.data.pipeline.framework.helper.ScalingCaseHelper;
+import org.apache.shardingsphere.test.e2e.data.pipeline.framework.helper.PipelineCaseHelper;
import org.apache.shardingsphere.sharding.algorithm.keygen.SnowflakeKeyGenerateAlgorithm;
import org.apache.shardingsphere.sharding.spi.KeyGenerateAlgorithm;
import org.springframework.jdbc.core.JdbcTemplate;
@@ -81,7 +81,7 @@ public final class PostgreSQLIncrementTask extends BaseIncrementTask {
private Object insertOrderItem() {
ThreadLocalRandom random = ThreadLocalRandom.current();
String status = 0 == random.nextInt() % 2 ? null : "NOT-NULL";
- Object[] orderInsertItemDate = new Object[]{KEY_GENERATE_ALGORITHM.generateKey(), ScalingCaseHelper.generateSnowflakeKey(), random.nextInt(0, 6), status};
+ Object[] orderInsertItemDate = new Object[]{KEY_GENERATE_ALGORITHM.generateKey(), PipelineCaseHelper.generateSnowflakeKey(), random.nextInt(0, 6), status};
jdbcTemplate.update(String.format("INSERT INTO %s(item_id,order_id,user_id,status) VALUES(?,?,?,?)", getTableNameWithSchema("t_order_item")), orderInsertItemDate);
return orderInsertItemDate[0];
}
diff --git a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/command/ExtraSQLCommand.java b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/command/ExtraSQLCommand.java
similarity index 100%
rename from test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/command/ExtraSQLCommand.java
rename to test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/command/ExtraSQLCommand.java
diff --git a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/command/MigrationDistSQLCommand.java b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/command/MigrationDistSQLCommand.java
similarity index 100%
rename from test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/command/MigrationDistSQLCommand.java
rename to test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/command/MigrationDistSQLCommand.java
diff --git a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/entity/CreateTableSQLGeneratorAssertionEntity.java b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/entity/CreateTableSQLGeneratorAssertionEntity.java
similarity index 100%
rename from test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/entity/CreateTableSQLGeneratorAssertionEntity.java
rename to test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/entity/CreateTableSQLGeneratorAssertionEntity.java
diff --git a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/entity/CreateTableSQLGeneratorAssertionsRootEntity.java b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/entity/CreateTableSQLGeneratorAssertionsRootEntity.java
similarity index 100%
rename from test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/entity/CreateTableSQLGeneratorAssertionsRootEntity.java
rename to test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/entity/CreateTableSQLGeneratorAssertionsRootEntity.java
diff --git a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/entity/CreateTableSQLGeneratorInputEntity.java b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/entity/CreateTableSQLGeneratorInputEntity.java
similarity index 100%
rename from test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/entity/CreateTableSQLGeneratorInputEntity.java
rename to test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/entity/CreateTableSQLGeneratorInputEntity.java
diff --git a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/entity/CreateTableSQLGeneratorOutputEntity.java b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/entity/CreateTableSQLGeneratorOutputEntity.java
similarity index 100%
rename from test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/entity/CreateTableSQLGeneratorOutputEntity.java
rename to test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/entity/CreateTableSQLGeneratorOutputEntity.java
diff --git a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/env/IntegrationTestEnvironment.java b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/env/PipelineE2EEnvironment.java
similarity index 67%
rename from test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/env/IntegrationTestEnvironment.java
rename to test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/env/PipelineE2EEnvironment.java
index e9f7c6661f2..cf827b22e60 100644
--- a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/env/IntegrationTestEnvironment.java
+++ b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/env/PipelineE2EEnvironment.java
@@ -21,7 +21,7 @@ import com.google.common.base.Strings;
import lombok.Getter;
import lombok.SneakyThrows;
import org.apache.shardingsphere.infra.database.type.DatabaseType;
-import org.apache.shardingsphere.test.e2e.data.pipeline.env.enums.ITEnvTypeEnum;
+import org.apache.shardingsphere.test.e2e.data.pipeline.env.enums.PipelineEnvTypeEnum;
import org.apache.shardingsphere.test.e2e.env.container.atomic.constants.StorageContainerConstants;
import java.io.IOException;
@@ -33,13 +33,13 @@ import java.util.Properties;
import java.util.stream.Collectors;
@Getter
-public final class IntegrationTestEnvironment {
+public final class PipelineE2EEnvironment {
- private static final IntegrationTestEnvironment INSTANCE = new IntegrationTestEnvironment();
+ private static final PipelineE2EEnvironment INSTANCE = new PipelineE2EEnvironment();
private final Properties props;
- private final ITEnvTypeEnum itEnvType;
+ private final PipelineEnvTypeEnum itEnvType;
private final List<String> mysqlVersions;
@@ -47,18 +47,18 @@ public final class IntegrationTestEnvironment {
private final List<String> openGaussVersions;
- private IntegrationTestEnvironment() {
+ private PipelineE2EEnvironment() {
props = loadProperties();
- itEnvType = ITEnvTypeEnum.valueOf(props.getProperty("scaling.it.env.type", ITEnvTypeEnum.NONE.name()).toUpperCase());
- mysqlVersions = Arrays.stream(props.getOrDefault("scaling.it.docker.mysql.version", "").toString().split(",")).filter(each -> !Strings.isNullOrEmpty(each)).collect(Collectors.toList());
- postgresVersions = Arrays.stream(props.getOrDefault("scaling.it.docker.postgresql.version", "").toString().split(",")).filter(cs -> !Strings.isNullOrEmpty(cs)).collect(Collectors.toList());
- openGaussVersions = Arrays.stream(props.getOrDefault("scaling.it.docker.opengauss.version", "").toString().split(",")).filter(cs -> !Strings.isNullOrEmpty(cs)).collect(Collectors.toList());
+ itEnvType = PipelineEnvTypeEnum.valueOf(props.getProperty("pipeline.it.env.type", PipelineEnvTypeEnum.NONE.name()).toUpperCase());
+ mysqlVersions = Arrays.stream(props.getOrDefault("pipeline.it.docker.mysql.version", "").toString().split(",")).filter(each -> !Strings.isNullOrEmpty(each)).collect(Collectors.toList());
+ postgresVersions = Arrays.stream(props.getOrDefault("pipeline.it.docker.postgresql.version", "").toString().split(",")).filter(cs -> !Strings.isNullOrEmpty(cs)).collect(Collectors.toList());
+ openGaussVersions = Arrays.stream(props.getOrDefault("pipeline.it.docker.opengauss.version", "").toString().split(",")).filter(cs -> !Strings.isNullOrEmpty(cs)).collect(Collectors.toList());
}
@SneakyThrows(IOException.class)
private Properties loadProperties() {
Properties result = new Properties();
- try (InputStream inputStream = IntegrationTestEnvironment.class.getClassLoader().getResourceAsStream("env/it-env.properties")) {
+ try (InputStream inputStream = PipelineE2EEnvironment.class.getClassLoader().getResourceAsStream("env/it-env.properties")) {
result.load(inputStream);
}
for (String each : System.getProperties().stringPropertyNames()) {
@@ -76,11 +76,11 @@ public final class IntegrationTestEnvironment {
public int getActualDatabasePort(final DatabaseType databaseType) {
switch (databaseType.getType()) {
case "MySQL":
- return Integer.parseInt(props.getOrDefault("scaling.it.native.mysql.port", 3307).toString());
+ return Integer.parseInt(props.getOrDefault("pipeline.it.native.mysql.port", 3307).toString());
case "PostgreSQL":
- return Integer.parseInt(props.getOrDefault("scaling.it.native.postgresql.port", 5432).toString());
+ return Integer.parseInt(props.getOrDefault("pipeline.it.native.postgresql.port", 5432).toString());
case "openGauss":
- return Integer.parseInt(props.getOrDefault("scaling.it.native.opengauss.port", 5432).toString());
+ return Integer.parseInt(props.getOrDefault("pipeline.it.native.opengauss.port", 5432).toString());
default:
throw new UnsupportedOperationException("Unsupported database type: " + databaseType.getType());
}
@@ -95,11 +95,11 @@ public final class IntegrationTestEnvironment {
public int getActualDataSourceDefaultPort(final DatabaseType databaseType) {
switch (databaseType.getType()) {
case "MySQL":
- return Integer.parseInt(props.getOrDefault("scaling.it.native.mysql.port", StorageContainerConstants.MYSQL_EXPOSED_PORT).toString());
+ return Integer.parseInt(props.getOrDefault("pipeline.it.native.mysql.port", StorageContainerConstants.MYSQL_EXPOSED_PORT).toString());
case "PostgreSQL":
- return Integer.parseInt(props.getOrDefault("scaling.it.native.postgresql.port", StorageContainerConstants.POSTGRESQL_EXPOSED_PORT).toString());
+ return Integer.parseInt(props.getOrDefault("pipeline.it.native.postgresql.port", StorageContainerConstants.POSTGRESQL_EXPOSED_PORT).toString());
case "openGauss":
- return Integer.parseInt(props.getOrDefault("scaling.it.native.opengauss.port", StorageContainerConstants.OPENGAUSS_EXPOSED_PORT).toString());
+ return Integer.parseInt(props.getOrDefault("pipeline.it.native.opengauss.port", StorageContainerConstants.OPENGAUSS_EXPOSED_PORT).toString());
default:
throw new IllegalArgumentException("Unsupported database type: " + databaseType.getType());
}
@@ -111,7 +111,7 @@ public final class IntegrationTestEnvironment {
* @return native database type
*/
public String getNativeDatabaseType() {
- return String.valueOf(props.get("scaling.it.native.database"));
+ return String.valueOf(props.get("pipeline.it.native.database"));
}
/**
@@ -121,7 +121,7 @@ public final class IntegrationTestEnvironment {
* @return actual data source username
*/
public String getActualDataSourceUsername(final DatabaseType databaseType) {
- return String.valueOf(props.getOrDefault(String.format("scaling.it.native.%s.username", databaseType.getType().toLowerCase()), "Root@123"));
+ return String.valueOf(props.getOrDefault(String.format("pipeline.it.native.%s.username", databaseType.getType().toLowerCase()), "Root@123"));
}
/**
@@ -131,7 +131,7 @@ public final class IntegrationTestEnvironment {
* @return actual data source username
*/
public String getActualDataSourcePassword(final DatabaseType databaseType) {
- return String.valueOf(props.getOrDefault(String.format("scaling.it.native.%s.password", databaseType.getType().toLowerCase()), "Root@123"));
+ return String.valueOf(props.getOrDefault(String.format("pipeline.it.native.%s.password", databaseType.getType().toLowerCase()), "Root@123"));
}
/**
@@ -139,7 +139,7 @@ public final class IntegrationTestEnvironment {
*
* @return singleton instance
*/
- public static IntegrationTestEnvironment getInstance() {
+ public static PipelineE2EEnvironment getInstance() {
return INSTANCE;
}
@@ -151,7 +151,7 @@ public final class IntegrationTestEnvironment {
*/
public List<String> listStorageContainerImages(final DatabaseType databaseType) {
// Native mode needn't use docker image, just return a list which contain one item
- if (ITEnvTypeEnum.NATIVE == getItEnvType()) {
+ if (PipelineEnvTypeEnum.NATIVE == getItEnvType()) {
return databaseType.getType().equalsIgnoreCase(getNativeDatabaseType()) ? Collections.singletonList("") : Collections.emptyList();
}
switch (databaseType.getType()) {
diff --git a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/env/enums/ITEnvTypeEnum.java b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/env/enums/PipelineEnvTypeEnum.java
similarity index 96%
rename from test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/env/enums/ITEnvTypeEnum.java
rename to test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/env/enums/PipelineEnvTypeEnum.java
index 7331bebd886..83b783d44f7 100644
--- a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/env/enums/ITEnvTypeEnum.java
+++ b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/env/enums/PipelineEnvTypeEnum.java
@@ -17,7 +17,7 @@
package org.apache.shardingsphere.test.e2e.data.pipeline.env.enums;
-public enum ITEnvTypeEnum {
+public enum PipelineEnvTypeEnum {
NONE, DOCKER, NATIVE
}
diff --git a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/container/compose/BaseContainerComposer.java b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/container/compose/BaseContainerComposer.java
similarity index 100%
rename from test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/container/compose/BaseContainerComposer.java
rename to test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/container/compose/BaseContainerComposer.java
diff --git a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/container/compose/DockerContainerComposer.java b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/container/compose/DockerContainerComposer.java
similarity index 95%
rename from test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/container/compose/DockerContainerComposer.java
rename to test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/container/compose/DockerContainerComposer.java
index 26179c38cbb..fbf2750186c 100644
--- a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/container/compose/DockerContainerComposer.java
+++ b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/container/compose/DockerContainerComposer.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.test.e2e.data.pipeline.framework.container.com
import lombok.Getter;
import org.apache.shardingsphere.infra.database.type.DatabaseType;
-import org.apache.shardingsphere.test.e2e.data.pipeline.framework.container.config.proxy.ScalingProxyClusterContainerConfigurationFactory;
+import org.apache.shardingsphere.test.e2e.data.pipeline.framework.container.config.proxy.PipelineProxyClusterContainerConfigurationFactory;
import org.apache.shardingsphere.test.e2e.data.pipeline.util.DockerImageVersion;
import org.apache.shardingsphere.test.e2e.env.container.atomic.adapter.AdapterContainerFactory;
import org.apache.shardingsphere.test.e2e.env.container.atomic.adapter.config.AdaptorContainerConfiguration;
@@ -62,7 +62,7 @@ public final class DockerContainerComposer extends BaseContainerComposer {
: StorageContainerConfigurationFactory.newInstance(databaseType);
storageContainer = getContainers().registerContainer((DockerStorageContainer) StorageContainerFactory.newInstance(databaseType, storageContainerImage,
"", storageContainerConfig));
- AdaptorContainerConfiguration containerConfig = ScalingProxyClusterContainerConfigurationFactory.newInstance(databaseType, storageContainerImage);
+ AdaptorContainerConfiguration containerConfig = PipelineProxyClusterContainerConfigurationFactory.newInstance(databaseType, storageContainerImage);
ShardingSphereProxyClusterContainer proxyClusterContainer = (ShardingSphereProxyClusterContainer) AdapterContainerFactory.newInstance(EnvironmentConstants.CLUSTER_MODE,
AdapterContainerConstants.PROXY, databaseType, storageContainer, "", containerConfig);
proxyClusterContainer.dependsOn(governanceContainer, storageContainer);
diff --git a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/container/compose/NativeContainerComposer.java b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/container/compose/NativeContainerComposer.java
similarity index 96%
rename from test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/container/compose/NativeContainerComposer.java
rename to test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/container/compose/NativeContainerComposer.java
index 974ec790119..fe77ca21adc 100644
--- a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/container/compose/NativeContainerComposer.java
+++ b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/container/compose/NativeContainerComposer.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.test.e2e.data.pipeline.framework.container.com
import lombok.SneakyThrows;
import org.apache.shardingsphere.infra.database.metadata.url.JdbcUrlAppender;
import org.apache.shardingsphere.infra.database.type.DatabaseType;
-import org.apache.shardingsphere.test.e2e.data.pipeline.env.IntegrationTestEnvironment;
+import org.apache.shardingsphere.test.e2e.data.pipeline.env.PipelineE2EEnvironment;
import org.apache.shardingsphere.test.e2e.env.runtime.DataSourceEnvironment;
import java.sql.Connection;
@@ -36,7 +36,7 @@ import java.util.Properties;
*/
public final class NativeContainerComposer extends BaseContainerComposer {
- private static final IntegrationTestEnvironment ENV = IntegrationTestEnvironment.getInstance();
+ private static final PipelineE2EEnvironment ENV = PipelineE2EEnvironment.getInstance();
private final JdbcUrlAppender jdbcUrlAppender = new JdbcUrlAppender();
diff --git a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/container/config/proxy/ScalingProxyClusterContainerConfigurationFactory.java b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/container/config/proxy/PipelineProxyClusterContainerConfigurationFactory.java
similarity index 96%
rename from test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/container/config/proxy/ScalingProxyClusterContainerConfigurationFactory.java
rename to test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/container/config/proxy/PipelineProxyClusterContainerConfigurationFactory.java
index f77068c13a9..a4cd39c67d6 100644
--- a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/container/config/proxy/ScalingProxyClusterContainerConfigurationFactory.java
+++ b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/container/config/proxy/PipelineProxyClusterContainerConfigurationFactory.java
@@ -30,10 +30,10 @@ import java.util.HashMap;
import java.util.Map;
/**
- * Scaling proxy cluster container configuration factory.
+ * Pipeline proxy cluster container configuration factory.
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
-public final class ScalingProxyClusterContainerConfigurationFactory {
+public final class PipelineProxyClusterContainerConfigurationFactory {
/**
* Create instance of adaptor container configuration.
diff --git a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/helper/ScalingCaseHelper.java b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/helper/PipelineCaseHelper.java
similarity index 97%
rename from test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/helper/ScalingCaseHelper.java
rename to test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/helper/PipelineCaseHelper.java
index 77f375f7140..fc939b34597 100644
--- a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/helper/ScalingCaseHelper.java
+++ b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/helper/PipelineCaseHelper.java
@@ -33,10 +33,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ThreadLocalRandom;
-/**
- * Scaling case helper, some config is different between different database.
- */
-public final class ScalingCaseHelper {
+public final class PipelineCaseHelper {
private static final SnowflakeKeyGenerateAlgorithm SNOWFLAKE_KEY_GENERATE_ALGORITHM = new SnowflakeKeyGenerateAlgorithm();
diff --git a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/param/ScalingParameterized.java b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/param/PipelineTestParameter.java
similarity index 96%
rename from test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/param/ScalingParameterized.java
rename to test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/param/PipelineTestParameter.java
index b8d3a6ce54e..9e20e497f54 100644
--- a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/param/ScalingParameterized.java
+++ b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/param/PipelineTestParameter.java
@@ -22,10 +22,10 @@ import lombok.RequiredArgsConstructor;
import lombok.ToString;
import org.apache.shardingsphere.infra.database.type.DatabaseType;
-@Getter
@RequiredArgsConstructor
+@Getter
@ToString
-public final class ScalingParameterized {
+public final class PipelineTestParameter {
private final DatabaseType databaseType;
diff --git a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/watcher/ScalingWatcher.java b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/watcher/PipelineWatcher.java
similarity index 97%
rename from test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/watcher/ScalingWatcher.java
rename to test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/watcher/PipelineWatcher.java
index 7537287ceb5..5e52c114b93 100644
--- a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/watcher/ScalingWatcher.java
+++ b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/framework/watcher/PipelineWatcher.java
@@ -36,7 +36,7 @@ import java.util.Properties;
@RequiredArgsConstructor
@Slf4j
-public class ScalingWatcher extends TestWatcher {
+public class PipelineWatcher extends TestWatcher {
private final BaseContainerComposer containerComposer;
@@ -58,7 +58,7 @@ public class ScalingWatcher extends TestWatcher {
zookeeperRepository.init(config);
List<String> childrenKeys = zookeeperRepository.getChildrenKeys("/");
for (String each : childrenKeys) {
- if (!"scaling".equals(each)) {
+ if (!"pipeline".equals(each)) {
continue;
}
Map<String, String> nodeMap = new LinkedHashMap<>();
diff --git a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/logger/PipelineLoggerFilter.java b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/logger/PipelineLoggerFilter.java
similarity index 97%
rename from test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/logger/PipelineLoggerFilter.java
rename to test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/logger/PipelineLoggerFilter.java
index ea34154c044..78f1fd78e14 100644
--- a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/logger/PipelineLoggerFilter.java
+++ b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/logger/PipelineLoggerFilter.java
@@ -37,7 +37,7 @@ public final class PipelineLoggerFilter extends Filter<ILoggingEvent> {
if (IGNORE_LOGGER_NAMES.contains(event.getLoggerName())) {
return FilterReply.DENY;
}
- if (":Scaling-Proxy".equals(event.getLoggerName())) {
+ if (":Pipeline-Proxy".equals(event.getLoggerName())) {
for (Object each : event.getArgumentArray()) {
String arg = each.toString();
if (Strings.isNullOrEmpty(arg)) {
diff --git a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/util/AutoIncrementKeyGenerateAlgorithm.java b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/util/AutoIncrementKeyGenerateAlgorithm.java
similarity index 100%
rename from test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/util/AutoIncrementKeyGenerateAlgorithm.java
rename to test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/util/AutoIncrementKeyGenerateAlgorithm.java
diff --git a/test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/util/DockerImageVersion.java b/test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/util/DockerImageVersion.java
similarity index 100%
rename from test/e2e/scaling/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/util/DockerImageVersion.java
rename to test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/util/DockerImageVersion.java
diff --git a/test/e2e/scaling/src/test/resources/env/common/migration-command.xml b/test/e2e/pipeline/src/test/resources/env/common/migration-command.xml
similarity index 100%
rename from test/e2e/scaling/src/test/resources/env/common/migration-command.xml
rename to test/e2e/pipeline/src/test/resources/env/common/migration-command.xml
diff --git a/test/e2e/pipeline/src/test/resources/env/it-env.properties b/test/e2e/pipeline/src/test/resources/env/it-env.properties
new file mode 100644
index 00000000000..3bc6e99ffd6
--- /dev/null
+++ b/test/e2e/pipeline/src/test/resources/env/it-env.properties
@@ -0,0 +1,35 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# pipeline.it.type=NONE,DOCKER,NATIVE
+pipeline.it.env.type=NONE
+# pipeline.it.docker.mysql.version=mysql:5.7,mysql:8.0
+pipeline.it.docker.mysql.version=
+# pipeline.it.docker.postgresql.version=postgres:10-alpine,postgres:11-alpine,postgres:12-alpine,postgres:13-alpine,postgres:14-alpine
+pipeline.it.docker.postgresql.version=
+# pipeline.it.docker.opengauss.version=enmotech/opengauss:3.0.0,enmotech/opengauss:2.1.0
+pipeline.it.docker.opengauss.version=
+# pipeline.it.native.database=mysql or postgresql or opengauss
+pipeline.it.native.database=
+pipeline.it.native.mysql.username=root
+pipeline.it.native.mysql.password=Root@123
+pipeline.it.native.mysql.port=3306
+pipeline.it.native.postgresql.username=postgres
+pipeline.it.native.postgresql.password=Root@123
+pipeline.it.native.postgresql.port=5432
+pipeline.it.native.opengauss.username=gaussdb
+pipeline.it.native.opengauss.password=Root@123
+pipeline.it.native.opengauss.port=5432
diff --git a/test/e2e/scaling/src/test/resources/env/logback.xml b/test/e2e/pipeline/src/test/resources/env/logback.xml
similarity index 100%
rename from test/e2e/scaling/src/test/resources/env/logback.xml
rename to test/e2e/pipeline/src/test/resources/env/logback.xml
diff --git a/test/e2e/scaling/src/test/resources/env/mysql/01-initdb.sql b/test/e2e/pipeline/src/test/resources/env/mysql/01-initdb.sql
similarity index 61%
rename from test/e2e/scaling/src/test/resources/env/mysql/01-initdb.sql
rename to test/e2e/pipeline/src/test/resources/env/mysql/01-initdb.sql
index cb6ceeed6af..fdd0280ba24 100644
--- a/test/e2e/scaling/src/test/resources/env/mysql/01-initdb.sql
+++ b/test/e2e/pipeline/src/test/resources/env/mysql/01-initdb.sql
@@ -17,16 +17,16 @@
REVOKE ALL PRIVILEGES ON *.* FROM 'test_user'@'%';
-CREATE DATABASE scaling_it_0;
-CREATE DATABASE scaling_it_1;
-CREATE DATABASE scaling_it_2;
-CREATE DATABASE scaling_it_3;
-CREATE DATABASE scaling_it_4;
+CREATE DATABASE pipeline_it_0;
+CREATE DATABASE pipeline_it_1;
+CREATE DATABASE pipeline_it_2;
+CREATE DATABASE pipeline_it_3;
+CREATE DATABASE pipeline_it_4;
GRANT REPLICATION CLIENT, REPLICATION SLAVE ON *.* TO `test_user`@`%`;
-GRANT CREATE, DROP, SELECT, INSERT, UPDATE, DELETE, INDEX ON scaling_it_0.* TO `test_user`@`%`;
-GRANT CREATE, DROP, SELECT, INSERT, UPDATE, DELETE, INDEX ON scaling_it_1.* TO `test_user`@`%`;
-GRANT CREATE, DROP, SELECT, INSERT, UPDATE, DELETE, INDEX ON scaling_it_2.* TO `test_user`@`%`;
-GRANT CREATE, DROP, SELECT, INSERT, UPDATE, DELETE, INDEX ON scaling_it_3.* TO `test_user`@`%`;
-GRANT CREATE, DROP, SELECT, INSERT, UPDATE, DELETE, INDEX ON scaling_it_4.* TO `test_user`@`%`;
+GRANT CREATE, DROP, SELECT, INSERT, UPDATE, DELETE, INDEX ON pipeline_it_0.* TO `test_user`@`%`;
+GRANT CREATE, DROP, SELECT, INSERT, UPDATE, DELETE, INDEX ON pipeline_it_1.* TO `test_user`@`%`;
+GRANT CREATE, DROP, SELECT, INSERT, UPDATE, DELETE, INDEX ON pipeline_it_2.* TO `test_user`@`%`;
+GRANT CREATE, DROP, SELECT, INSERT, UPDATE, DELETE, INDEX ON pipeline_it_3.* TO `test_user`@`%`;
+GRANT CREATE, DROP, SELECT, INSERT, UPDATE, DELETE, INDEX ON pipeline_it_4.* TO `test_user`@`%`;
ALTER USER `test_user`@`%` IDENTIFIED WITH mysql_native_password by 'Test@123';
diff --git a/test/e2e/scaling/src/test/resources/env/mysql/my.cnf b/test/e2e/pipeline/src/test/resources/env/mysql/my.cnf
similarity index 100%
rename from test/e2e/scaling/src/test/resources/env/mysql/my.cnf
rename to test/e2e/pipeline/src/test/resources/env/mysql/my.cnf
diff --git a/test/e2e/scaling/src/test/resources/env/mysql/mysql8/my.cnf b/test/e2e/pipeline/src/test/resources/env/mysql/mysql8/my.cnf
similarity index 100%
rename from test/e2e/scaling/src/test/resources/env/mysql/mysql8/my.cnf
rename to test/e2e/pipeline/src/test/resources/env/mysql/mysql8/my.cnf
diff --git a/test/e2e/scaling/src/test/resources/env/mysql/server-5.yaml b/test/e2e/pipeline/src/test/resources/env/mysql/server-5.yaml
similarity index 100%
rename from test/e2e/scaling/src/test/resources/env/mysql/server-5.yaml
rename to test/e2e/pipeline/src/test/resources/env/mysql/server-5.yaml
diff --git a/test/e2e/scaling/src/test/resources/env/mysql/server-8.yaml b/test/e2e/pipeline/src/test/resources/env/mysql/server-8.yaml
similarity index 100%
rename from test/e2e/scaling/src/test/resources/env/mysql/server-8.yaml
rename to test/e2e/pipeline/src/test/resources/env/mysql/server-8.yaml
diff --git a/test/e2e/scaling/src/test/resources/env/opengauss/01-initdb.sql b/test/e2e/pipeline/src/test/resources/env/opengauss/01-initdb.sql
similarity index 64%
rename from test/e2e/scaling/src/test/resources/env/opengauss/01-initdb.sql
rename to test/e2e/pipeline/src/test/resources/env/opengauss/01-initdb.sql
index 777ed891dda..f65962b1e0a 100644
--- a/test/e2e/scaling/src/test/resources/env/opengauss/01-initdb.sql
+++ b/test/e2e/pipeline/src/test/resources/env/opengauss/01-initdb.sql
@@ -16,13 +16,13 @@
--
ALTER USER test_user REPLICATION;
-CREATE DATABASE scaling_it_0;
-CREATE DATABASE scaling_it_1;
-CREATE DATABASE scaling_it_2;
-CREATE DATABASE scaling_it_3;
-CREATE DATABASE scaling_it_4;
-GRANT CREATE, CONNECT ON DATABASE scaling_it_0 TO test_user;
-GRANT CREATE, CONNECT ON DATABASE scaling_it_1 TO test_user;
-GRANT CREATE, CONNECT ON DATABASE scaling_it_2 TO test_user;
-GRANT CREATE, CONNECT ON DATABASE scaling_it_3 TO test_user;
-GRANT CREATE, CONNECT ON DATABASE scaling_it_4 TO test_user;
+CREATE DATABASE pipeline_it_0;
+CREATE DATABASE pipeline_it_1;
+CREATE DATABASE pipeline_it_2;
+CREATE DATABASE pipeline_it_3;
+CREATE DATABASE pipeline_it_4;
+GRANT CREATE, CONNECT ON DATABASE pipeline_it_0 TO test_user;
+GRANT CREATE, CONNECT ON DATABASE pipeline_it_1 TO test_user;
+GRANT CREATE, CONNECT ON DATABASE pipeline_it_2 TO test_user;
+GRANT CREATE, CONNECT ON DATABASE pipeline_it_3 TO test_user;
+GRANT CREATE, CONNECT ON DATABASE pipeline_it_4 TO test_user;
diff --git a/test/e2e/scaling/src/test/resources/env/opengauss/pg_hba.conf b/test/e2e/pipeline/src/test/resources/env/opengauss/pg_hba.conf
similarity index 100%
rename from test/e2e/scaling/src/test/resources/env/opengauss/pg_hba.conf
rename to test/e2e/pipeline/src/test/resources/env/opengauss/pg_hba.conf
diff --git a/test/e2e/scaling/src/test/resources/env/opengauss/server.yaml b/test/e2e/pipeline/src/test/resources/env/opengauss/server.yaml
similarity index 100%
rename from test/e2e/scaling/src/test/resources/env/opengauss/server.yaml
rename to test/e2e/pipeline/src/test/resources/env/opengauss/server.yaml
diff --git a/test/e2e/scaling/src/test/resources/env/postgresql/01-initdb.sql b/test/e2e/pipeline/src/test/resources/env/postgresql/01-initdb.sql
similarity index 65%
rename from test/e2e/scaling/src/test/resources/env/postgresql/01-initdb.sql
rename to test/e2e/pipeline/src/test/resources/env/postgresql/01-initdb.sql
index 0d181f5ac1a..93f6248a9b3 100644
--- a/test/e2e/scaling/src/test/resources/env/postgresql/01-initdb.sql
+++ b/test/e2e/pipeline/src/test/resources/env/postgresql/01-initdb.sql
@@ -16,13 +16,13 @@
ALTER USER test_user NOSUPERUSER;
ALTER USER test_user REPLICATION;
-CREATE DATABASE scaling_it_0;
-CREATE DATABASE scaling_it_1;
-CREATE DATABASE scaling_it_2;
-CREATE DATABASE scaling_it_3;
-CREATE DATABASE scaling_it_4;
-GRANT CREATE, CONNECT ON DATABASE scaling_it_0 TO test_user;
-GRANT CREATE, CONNECT ON DATABASE scaling_it_1 TO test_user;
-GRANT CREATE, CONNECT ON DATABASE scaling_it_2 TO test_user;
-GRANT CREATE, CONNECT ON DATABASE scaling_it_3 TO test_user;
-GRANT CREATE, CONNECT ON DATABASE scaling_it_4 TO test_user;
+CREATE DATABASE pipeline_it_0;
+CREATE DATABASE pipeline_it_1;
+CREATE DATABASE pipeline_it_2;
+CREATE DATABASE pipeline_it_3;
+CREATE DATABASE pipeline_it_4;
+GRANT CREATE, CONNECT ON DATABASE pipeline_it_0 TO test_user;
+GRANT CREATE, CONNECT ON DATABASE pipeline_it_1 TO test_user;
+GRANT CREATE, CONNECT ON DATABASE pipeline_it_2 TO test_user;
+GRANT CREATE, CONNECT ON DATABASE pipeline_it_3 TO test_user;
+GRANT CREATE, CONNECT ON DATABASE pipeline_it_4 TO test_user;
diff --git a/test/e2e/scaling/src/test/resources/env/postgresql/postgresql.conf b/test/e2e/pipeline/src/test/resources/env/postgresql/postgresql.conf
similarity index 100%
rename from test/e2e/scaling/src/test/resources/env/postgresql/postgresql.conf
rename to test/e2e/pipeline/src/test/resources/env/postgresql/postgresql.conf
diff --git a/test/e2e/scaling/src/test/resources/env/postgresql/server.yaml b/test/e2e/pipeline/src/test/resources/env/postgresql/server.yaml
similarity index 100%
rename from test/e2e/scaling/src/test/resources/env/postgresql/server.yaml
rename to test/e2e/pipeline/src/test/resources/env/postgresql/server.yaml
diff --git a/test/e2e/scaling/src/test/resources/env/scenario/createtablegenerator/mysql/create-table-sql-generator.xml b/test/e2e/pipeline/src/test/resources/env/scenario/createtablegenerator/mysql/create-table-sql-generator.xml
similarity index 100%
rename from test/e2e/scaling/src/test/resources/env/scenario/createtablegenerator/mysql/create-table-sql-generator.xml
rename to test/e2e/pipeline/src/test/resources/env/scenario/createtablegenerator/mysql/create-table-sql-generator.xml
diff --git a/test/e2e/scaling/src/test/resources/env/scenario/createtablegenerator/opengauss/create-table-sql-generator.xml b/test/e2e/pipeline/src/test/resources/env/scenario/createtablegenerator/opengauss/create-table-sql-generator.xml
similarity index 100%
rename from test/e2e/scaling/src/test/resources/env/scenario/createtablegenerator/opengauss/create-table-sql-generator.xml
rename to test/e2e/pipeline/src/test/resources/env/scenario/createtablegenerator/opengauss/create-table-sql-generator.xml
diff --git a/test/e2e/scaling/src/test/resources/env/scenario/createtablegenerator/postgresql/create-table-sql-generator.xml b/test/e2e/pipeline/src/test/resources/env/scenario/createtablegenerator/postgresql/create-table-sql-generator.xml
similarity index 100%
rename from test/e2e/scaling/src/test/resources/env/scenario/createtablegenerator/postgresql/create-table-sql-generator.xml
rename to test/e2e/pipeline/src/test/resources/env/scenario/createtablegenerator/postgresql/create-table-sql-generator.xml
diff --git a/test/e2e/scaling/src/test/resources/env/scenario/general/mysql.xml b/test/e2e/pipeline/src/test/resources/env/scenario/general/mysql.xml
similarity index 100%
rename from test/e2e/scaling/src/test/resources/env/scenario/general/mysql.xml
rename to test/e2e/pipeline/src/test/resources/env/scenario/general/mysql.xml
diff --git a/test/e2e/scaling/src/test/resources/env/scenario/general/postgresql.xml b/test/e2e/pipeline/src/test/resources/env/scenario/general/postgresql.xml
similarity index 100%
rename from test/e2e/scaling/src/test/resources/env/scenario/general/postgresql.xml
rename to test/e2e/pipeline/src/test/resources/env/scenario/general/postgresql.xml
diff --git a/test/e2e/scaling/src/test/resources/env/scenario/primary_key/text_primary_key/mysql.xml b/test/e2e/pipeline/src/test/resources/env/scenario/primary_key/text_primary_key/mysql.xml
similarity index 100%
rename from test/e2e/scaling/src/test/resources/env/scenario/primary_key/text_primary_key/mysql.xml
rename to test/e2e/pipeline/src/test/resources/env/scenario/primary_key/text_primary_key/mysql.xml
diff --git a/test/e2e/scaling/src/test/resources/env/scenario/primary_key/text_primary_key/postgresql.xml b/test/e2e/pipeline/src/test/resources/env/scenario/primary_key/text_primary_key/postgresql.xml
similarity index 100%
rename from test/e2e/scaling/src/test/resources/env/scenario/primary_key/text_primary_key/postgresql.xml
rename to test/e2e/pipeline/src/test/resources/env/scenario/primary_key/text_primary_key/postgresql.xml
diff --git a/test/e2e/scaling/src/test/resources/env/scenario/primary_key/unique_key/mysql.xml b/test/e2e/pipeline/src/test/resources/env/scenario/primary_key/unique_key/mysql.xml
similarity index 100%
rename from test/e2e/scaling/src/test/resources/env/scenario/primary_key/unique_key/mysql.xml
rename to test/e2e/pipeline/src/test/resources/env/scenario/primary_key/unique_key/mysql.xml
diff --git a/test/e2e/scaling/src/test/resources/logback-test.xml b/test/e2e/pipeline/src/test/resources/logback-test.xml
similarity index 100%
rename from test/e2e/scaling/src/test/resources/logback-test.xml
rename to test/e2e/pipeline/src/test/resources/logback-test.xml
diff --git a/test/e2e/pom.xml b/test/e2e/pom.xml
index b960ddc561f..2b0044d0b98 100644
--- a/test/e2e/pom.xml
+++ b/test/e2e/pom.xml
@@ -32,11 +32,11 @@
<module>fixture</module>
<module>env</module>
<module>suite</module>
- <module>scaling</module>
+ <module>driver</module>
+ <module>pipeline</module>
<module>transaction</module>
<module>discovery</module>
<module>showprocesslist</module>
- <module>driver</module>
<module>agent</module>
</modules>
diff --git a/test/e2e/scaling/src/test/resources/env/it-env.properties b/test/e2e/scaling/src/test/resources/env/it-env.properties
deleted file mode 100644
index f79fca09406..00000000000
--- a/test/e2e/scaling/src/test/resources/env/it-env.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# scaling.it.type=NONE,DOCKER,NATIVE
-scaling.it.env.type=NONE
-# scaling.it.docker.mysql.version=mysql:5.7,mysql:8.0
-scaling.it.docker.mysql.version=
-# scaling.it.docker.postgresql.version=postgres:10-alpine,postgres:11-alpine,postgres:12-alpine,postgres:13-alpine,postgres:14-alpine
-scaling.it.docker.postgresql.version=
-# scaling.it.docker.opengauss.version=enmotech/opengauss:3.0.0,enmotech/opengauss:2.1.0
-scaling.it.docker.opengauss.version=
-# scaling.it.native.database=mysql or postgresql or opengauss
-scaling.it.native.database=
-scaling.it.native.mysql.username=root
-scaling.it.native.mysql.password=Root@123
-scaling.it.native.mysql.port=3306
-scaling.it.native.postgresql.username=postgres
-scaling.it.native.postgresql.password=Root@123
-scaling.it.native.postgresql.port=5432
-scaling.it.native.opengauss.username=gaussdb
-scaling.it.native.opengauss.password=Root@123
-scaling.it.native.opengauss.port=5432