You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by pa...@apache.org on 2023/03/27 15:29:32 UTC
[shardingsphere] branch master updated: Move AbstractSQLTest to e2e module (#24864)
This is an automated email from the ASF dual-hosted git repository.
panjuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 5e2f0a6c0e7 Move AbstractSQLTest to e2e module (#24864)
5e2f0a6c0e7 is described below
commit 5e2f0a6c0e74974ef0bc03a343c8d5f3962be130
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Mon Mar 27 23:29:23 2023 +0800
Move AbstractSQLTest to e2e module (#24864)
---
.../ShardingRoutingEngineFixtureBuilder.java | 2 +-
...hardingsphere.sharding.spi.KeyGenerateAlgorithm | 19 ---
...e.shardingsphere.sharding.spi.ShardingAlgorithm | 18 ---
.../org.mockito.plugins.MockMaker | 18 ---
.../test/e2e/driver}/AbstractSQLTest.java | 2 +-
...ractShardingSphereDataSourceForEncryptTest.java | 2 +-
...gSphereDataSourceForReadwriteSplittingTest.java | 2 +-
...tractShardingSphereDataSourceForShadowTest.java | 2 +-
...actShardingSphereDataSourceForShardingTest.java | 2 +-
.../e2e/driver/AbstractYamlDataSourceE2EIT.java | 71 -----------
.../fixture/TestClusterPersistRepository.java | 95 --------------
.../e2e/driver/fixture/TestRuleConfiguration.java | 24 ----
.../fixture/TestRuleConfigurationChecker.java | 42 -------
.../keygen/DriverKeyGenerateAlgorithmFixture.java | 37 ------
.../DriverComplexKeysShardingAlgorithmFixture.java | 37 ------
.../DriverStandardShardingAlgorithmFixture.java | 47 -------
.../encrypt/JDBCEncryptAlgorithmFixture.java | 0
.../JDBCQueryAssistedEncryptAlgorithmFixture.java | 0
.../IncrementKeyGenerateAlgorithmFixture.java | 0
.../ResetIncrementKeyGenerateAlgorithmFixture.java | 0
.../JDBCStandardShardingAlgorithmFixture.java | 0
.../YamlShardingWithReadwriteSplittingE2EIT.java | 78 ------------
.../readwrite/YamlReadwriteSplittingE2EIT.java | 98 ---------------
.../driver}/resultset/EncryptResultSetTest.java | 4 +-
.../e2e/driver/sharding/YamlShardingE2EIT.java | 74 -----------
.../statement/EncryptPreparedStatementTest.java | 4 +-
.../driver}/statement/EncryptStatementTest.java | 6 +-
.../ReadwriteSplittingPreparedStatementTest.java | 6 +-
.../statement/ReadwriteSplittingStatementTest.java | 4 +-
.../statement/ShadowPreparedStatementTest.java | 4 +-
.../e2e/driver}/statement/ShadowStatementTest.java | 4 +-
.../ShardingSpherePreparedStatementTest.java | 4 +-
.../statement/ShardingSphereStatementTest.java | 4 +-
...che.shardingsphere.encrypt.spi.EncryptAlgorithm | 0
...ra.config.rule.checker.RuleConfigurationChecker | 18 ---
...ode.repository.cluster.ClusterPersistRepository | 18 ---
...hardingsphere.sharding.spi.KeyGenerateAlgorithm | 3 +-
...e.shardingsphere.sharding.spi.ShardingAlgorithm | 3 +-
.../config/config-encrypt-query-with-cipher.yaml | 0
.../config/config-encrypt-query-with-plain.yaml | 0
.../config/config-readwrite-splitting.yaml | 0
.../src/test/resources/config/config-shadow.yaml | 0
.../src/test/resources/config/config-sharding.yaml | 0
.../e2e/driver/src/test/resources/logback-test.xml | 3 +-
.../src/test/resources/sql/encrypt_data.sql | 0
.../driver}/src/test/resources/sql/jdbc_data.sql | 0
.../src/test/resources/sql/jdbc_encrypt_init.sql | 0
.../driver}/src/test/resources/sql/jdbc_init.sql | 0
.../src/test/resources/sql/jdbc_shadow_init.sql | 0
.../src/test/resources/sql/single_jdbc_init.sql | 0
...gWithReadwriteSplittingDataSourceWithProps.yaml | 61 ---------
...thReadwriteSplittingDataSourceWithoutProps.yaml | 61 ---------
.../sharding/configWithDataSourceWithProps.yaml | 101 ---------------
.../sharding/configWithDataSourceWithoutProps.yaml | 99 ---------------
.../sharding/configWithoutDataSourceWithProps.yaml | 79 ------------
.../configWithoutDataSourceWithoutProps.yaml | 83 ------------
.../configWithDataSourceWithProps.yaml | 137 --------------------
.../configWithDataSourceWithoutProps.yaml | 139 ---------------------
.../configWithDataSourceWithoutRules.yaml | 58 ---------
.../configWithoutDataSourceWithProps.yaml | 101 ---------------
.../configWithoutDataSourceWithoutProps.yaml | 100 ---------------
.../yaml/schema/readwrite_splitting/read_ds_0.sql | 25 ----
.../yaml/schema/readwrite_splitting/read_ds_1.sql | 25 ----
.../yaml/schema/readwrite_splitting/write_ds.sql | 25 ----
.../test/resources/yaml/schema/sharding/db0.sql | 29 -----
.../test/resources/yaml/schema/sharding/db1.sql | 29 -----
.../sharding_readwrite_splitting/read_ds_0.sql | 29 -----
.../sharding_readwrite_splitting/read_ds_1.sql | 29 -----
.../sharding_readwrite_splitting/write_ds_0.sql | 29 -----
.../sharding_readwrite_splitting/write_ds_1.sql | 29 -----
.../src/test/resources/yaml/unit/sharding.yaml | 104 ---------------
71 files changed, 30 insertions(+), 2097 deletions(-)
diff --git a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/fixture/ShardingRoutingEngineFixtureBuilder.java b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/fixture/ShardingRoutingEngineFixtureBuilder.java
index d469a9d090f..30dbd6f17ec 100644
--- a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/fixture/ShardingRoutingEngineFixtureBuilder.java
+++ b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/fixture/ShardingRoutingEngineFixtureBuilder.java
@@ -225,7 +225,7 @@ public final class ShardingRoutingEngineFixtureBuilder {
}
private static ShardingTableRuleConfiguration createTableRuleConfig(final String tableName, final String actualDataNodes,
- final ShardingStrategyConfiguration dsShardingStrategyConfig, final ShardingStrategyConfiguration tableShardingStrategyConfig) {
+ final ShardingStrategyConfiguration dsShardingStrategyConfig, final ShardingStrategyConfiguration tableShardingStrategyConfig) {
ShardingTableRuleConfiguration result = new ShardingTableRuleConfiguration(tableName, actualDataNodes);
result.setDatabaseShardingStrategy(dsShardingStrategyConfig);
result.setTableShardingStrategy(tableShardingStrategyConfig);
diff --git a/jdbc/core/src/test/resources/META-INF/services/org.apache.shardingsphere.sharding.spi.KeyGenerateAlgorithm b/jdbc/core/src/test/resources/META-INF/services/org.apache.shardingsphere.sharding.spi.KeyGenerateAlgorithm
deleted file mode 100644
index 659957f5e1a..00000000000
--- a/jdbc/core/src/test/resources/META-INF/services/org.apache.shardingsphere.sharding.spi.KeyGenerateAlgorithm
+++ /dev/null
@@ -1,19 +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.
-#
-
-org.apache.shardingsphere.test.e2e.driver.fixture.keygen.IncrementKeyGenerateAlgorithmFixture
-org.apache.shardingsphere.test.e2e.driver.fixture.keygen.ResetIncrementKeyGenerateAlgorithmFixture
diff --git a/jdbc/core/src/test/resources/META-INF/services/org.apache.shardingsphere.sharding.spi.ShardingAlgorithm b/jdbc/core/src/test/resources/META-INF/services/org.apache.shardingsphere.sharding.spi.ShardingAlgorithm
deleted file mode 100644
index f352845def8..00000000000
--- a/jdbc/core/src/test/resources/META-INF/services/org.apache.shardingsphere.sharding.spi.ShardingAlgorithm
+++ /dev/null
@@ -1,18 +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.
-#
-
-org.apache.shardingsphere.test.e2e.driver.fixture.sharding.JDBCStandardShardingAlgorithmFixture
diff --git a/jdbc/core/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker b/jdbc/core/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker
deleted file mode 100644
index c9217d3ca69..00000000000
--- a/jdbc/core/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker
+++ /dev/null
@@ -1,18 +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.
-#
-
-mock-maker-inline
diff --git a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/base/AbstractSQLTest.java b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/AbstractSQLTest.java
similarity index 98%
rename from jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/base/AbstractSQLTest.java
rename to test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/AbstractSQLTest.java
index 9e72f27b44e..f8cade77f39 100644
--- a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/base/AbstractSQLTest.java
+++ b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/AbstractSQLTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.driver.jdbc.base;
+package org.apache.shardingsphere.test.e2e.driver;
import com.zaxxer.hikari.HikariDataSource;
import org.h2.tools.RunScript;
diff --git a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/base/AbstractShardingSphereDataSourceForEncryptTest.java b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/AbstractShardingSphereDataSourceForEncryptTest.java
similarity index 98%
rename from jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/base/AbstractShardingSphereDataSourceForEncryptTest.java
rename to test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/AbstractShardingSphereDataSourceForEncryptTest.java
index 40ec4b3bd4f..0a6ea337b5d 100644
--- a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/base/AbstractShardingSphereDataSourceForEncryptTest.java
+++ b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/AbstractShardingSphereDataSourceForEncryptTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.driver.jdbc.base;
+package org.apache.shardingsphere.test.e2e.driver;
import org.apache.shardingsphere.driver.api.yaml.YamlShardingSphereDataSourceFactory;
import org.apache.shardingsphere.driver.jdbc.core.connection.ShardingSphereConnection;
diff --git a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/base/AbstractShardingSphereDataSourceForReadwriteSplittingTest.java b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/AbstractShardingSphereDataSourceForReadwriteSplittingTest.java
similarity index 98%
rename from jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/base/AbstractShardingSphereDataSourceForReadwriteSplittingTest.java
rename to test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/AbstractShardingSphereDataSourceForReadwriteSplittingTest.java
index 9c664dd7feb..5cf4662277f 100644
--- a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/base/AbstractShardingSphereDataSourceForReadwriteSplittingTest.java
+++ b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/AbstractShardingSphereDataSourceForReadwriteSplittingTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.driver.jdbc.base;
+package org.apache.shardingsphere.test.e2e.driver;
import org.apache.shardingsphere.driver.api.yaml.YamlShardingSphereDataSourceFactory;
import org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource;
diff --git a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/base/AbstractShardingSphereDataSourceForShadowTest.java b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/AbstractShardingSphereDataSourceForShadowTest.java
similarity index 98%
rename from jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/base/AbstractShardingSphereDataSourceForShadowTest.java
rename to test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/AbstractShardingSphereDataSourceForShadowTest.java
index 85d93ba46b9..158ef2bb211 100644
--- a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/base/AbstractShardingSphereDataSourceForShadowTest.java
+++ b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/AbstractShardingSphereDataSourceForShadowTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.driver.jdbc.base;
+package org.apache.shardingsphere.test.e2e.driver;
import org.apache.shardingsphere.driver.api.yaml.YamlShardingSphereDataSourceFactory;
import org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource;
diff --git a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/base/AbstractShardingSphereDataSourceForShardingTest.java b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/AbstractShardingSphereDataSourceForShardingTest.java
similarity index 98%
rename from jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/base/AbstractShardingSphereDataSourceForShardingTest.java
rename to test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/AbstractShardingSphereDataSourceForShardingTest.java
index 3e2989458b3..722e6ca84e3 100644
--- a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/base/AbstractShardingSphereDataSourceForShardingTest.java
+++ b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/AbstractShardingSphereDataSourceForShardingTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.driver.jdbc.base;
+package org.apache.shardingsphere.test.e2e.driver;
import org.apache.shardingsphere.driver.api.yaml.YamlShardingSphereDataSourceFactory;
import org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource;
diff --git a/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/AbstractYamlDataSourceE2EIT.java b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/AbstractYamlDataSourceE2EIT.java
deleted file mode 100644
index df78d39b418..00000000000
--- a/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/AbstractYamlDataSourceE2EIT.java
+++ /dev/null
@@ -1,71 +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.
- */
-
-package org.apache.shardingsphere.test.e2e.driver;
-
-import com.zaxxer.hikari.HikariDataSource;
-import org.h2.tools.RunScript;
-import org.junit.jupiter.api.BeforeAll;
-
-import javax.sql.DataSource;
-import java.io.File;
-import java.io.InputStreamReader;
-import java.sql.SQLException;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Objects;
-
-// TODO move to new acceptance test module with mode
-public abstract class AbstractYamlDataSourceE2EIT {
-
- @BeforeAll
- static void createSchema() throws SQLException {
- for (String each : getSchemaFiles()) {
- RunScript.execute(
- createDataSource(getFileName(each)).getConnection(), new InputStreamReader(Objects.requireNonNull(AbstractYamlDataSourceE2EIT.class.getClassLoader().getResourceAsStream(each))));
- }
- }
-
- protected static DataSource createDataSource(final String dataSourceName) {
- HikariDataSource result = new HikariDataSource();
- result.setDriverClassName("org.h2.Driver");
- result.setJdbcUrl(String.format("jdbc:h2:mem:%s;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL", dataSourceName));
- result.setUsername("sa");
- result.setMaximumPoolSize(100);
- return result;
- }
-
- private static String getFileName(final String dataSetFile) {
- String fileName = new File(dataSetFile).getName();
- if (-1 == fileName.lastIndexOf('.')) {
- return fileName;
- }
- return fileName.substring(0, fileName.lastIndexOf('.'));
- }
-
- private static List<String> getSchemaFiles() {
- return Arrays.asList("yaml/schema/sharding/db0.sql",
- "yaml/schema/sharding/db1.sql",
- "yaml/schema/readwrite_splitting/write_ds.sql",
- "yaml/schema/readwrite_splitting/read_ds_0.sql",
- "yaml/schema/readwrite_splitting/read_ds_1.sql",
- "yaml/schema/sharding_readwrite_splitting/write_ds_0.sql",
- "yaml/schema/sharding_readwrite_splitting/write_ds_1.sql",
- "yaml/schema/sharding_readwrite_splitting/read_ds_0.sql",
- "yaml/schema/sharding_readwrite_splitting/read_ds_1.sql");
- }
-}
diff --git a/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/TestClusterPersistRepository.java b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/TestClusterPersistRepository.java
deleted file mode 100644
index 23440e601ef..00000000000
--- a/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/TestClusterPersistRepository.java
+++ /dev/null
@@ -1,95 +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.
- */
-
-package org.apache.shardingsphere.test.e2e.driver.fixture;
-
-import org.apache.shardingsphere.infra.database.DefaultDatabase;
-import org.apache.shardingsphere.mode.repository.cluster.ClusterPersistRepository;
-import org.apache.shardingsphere.mode.repository.cluster.ClusterPersistRepositoryConfiguration;
-import org.apache.shardingsphere.mode.repository.cluster.listener.DataChangedEventListener;
-import org.apache.shardingsphere.mode.repository.cluster.lock.holder.DistributedLockHolder;
-
-import java.util.Collections;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
-public final class TestClusterPersistRepository implements ClusterPersistRepository {
-
- private final Map<String, String> registryData = new LinkedHashMap<>();
-
- @Override
- public void init(final ClusterPersistRepositoryConfiguration config) {
- registryData.put("/metadata", DefaultDatabase.LOGIC_NAME);
- }
-
- @Override
- public String getDirectly(final String key) {
- return registryData.get(key);
- }
-
- @Override
- public List<String> getChildrenKeys(final String key) {
- return registryData.containsKey(key) ? Collections.singletonList(registryData.get(key)) : Collections.emptyList();
- }
-
- @Override
- public boolean isExisted(final String key) {
- return false;
- }
-
- @Override
- public void persist(final String key, final String value) {
- registryData.put(key, value);
- }
-
- @Override
- public void update(final String key, final String value) {
- }
-
- @Override
- public void persistEphemeral(final String key, final String value) {
- registryData.put(key, value);
- }
-
- @Override
- public void persistExclusiveEphemeral(final String key, final String value) {
- }
-
- @Override
- public DistributedLockHolder getDistributedLockHolder() {
- return null;
- }
-
- @Override
- public void delete(final String key) {
- }
-
- @Override
- public void watch(final String key, final DataChangedEventListener listener) {
- }
-
- @Override
- public void close() {
- registryData.clear();
- }
-
- @Override
- public String getType() {
- return "GOV_TEST";
- }
-}
diff --git a/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/TestRuleConfiguration.java b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/TestRuleConfiguration.java
deleted file mode 100644
index fc81ba7725d..00000000000
--- a/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/TestRuleConfiguration.java
+++ /dev/null
@@ -1,24 +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.
- */
-
-package org.apache.shardingsphere.test.e2e.driver.fixture;
-
-import org.apache.shardingsphere.infra.config.rule.RuleConfiguration;
-import org.apache.shardingsphere.infra.config.rule.function.EnhancedRuleConfiguration;
-
-public final class TestRuleConfiguration implements RuleConfiguration, EnhancedRuleConfiguration {
-}
diff --git a/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/TestRuleConfigurationChecker.java b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/TestRuleConfigurationChecker.java
deleted file mode 100644
index a43283daeb5..00000000000
--- a/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/TestRuleConfigurationChecker.java
+++ /dev/null
@@ -1,42 +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.
- */
-
-package org.apache.shardingsphere.test.e2e.driver.fixture;
-
-import org.apache.shardingsphere.infra.config.rule.checker.RuleConfigurationChecker;
-import org.apache.shardingsphere.infra.rule.ShardingSphereRule;
-
-import javax.sql.DataSource;
-import java.util.Collection;
-import java.util.Map;
-
-public final class TestRuleConfigurationChecker implements RuleConfigurationChecker<TestRuleConfiguration> {
-
- @Override
- public void check(final String databaseName, final TestRuleConfiguration config, final Map<String, DataSource> dataSourceMap, final Collection<ShardingSphereRule> rules) {
- }
-
- @Override
- public int getOrder() {
- return 10080;
- }
-
- @Override
- public Class<TestRuleConfiguration> getTypeClass() {
- return TestRuleConfiguration.class;
- }
-}
diff --git a/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/algorithm/keygen/DriverKeyGenerateAlgorithmFixture.java b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/algorithm/keygen/DriverKeyGenerateAlgorithmFixture.java
deleted file mode 100644
index a6f8193f739..00000000000
--- a/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/algorithm/keygen/DriverKeyGenerateAlgorithmFixture.java
+++ /dev/null
@@ -1,37 +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.
- */
-
-package org.apache.shardingsphere.test.e2e.driver.fixture.algorithm.keygen;
-
-import org.apache.shardingsphere.sharding.spi.KeyGenerateAlgorithm;
-
-import java.util.concurrent.atomic.AtomicInteger;
-
-public final class DriverKeyGenerateAlgorithmFixture implements KeyGenerateAlgorithm {
-
- private static final AtomicInteger SEQUENCE = new AtomicInteger(100);
-
- @Override
- public Comparable<?> generateKey() {
- return SEQUENCE.incrementAndGet();
- }
-
- @Override
- public String getType() {
- return "DRIVER.FIXTURE";
- }
-}
diff --git a/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/algorithm/sharding/DriverComplexKeysShardingAlgorithmFixture.java b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/algorithm/sharding/DriverComplexKeysShardingAlgorithmFixture.java
deleted file mode 100644
index fe82247c3a5..00000000000
--- a/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/algorithm/sharding/DriverComplexKeysShardingAlgorithmFixture.java
+++ /dev/null
@@ -1,37 +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.
- */
-
-package org.apache.shardingsphere.test.e2e.driver.fixture.algorithm.sharding;
-
-import org.apache.shardingsphere.sharding.api.sharding.complex.ComplexKeysShardingAlgorithm;
-import org.apache.shardingsphere.sharding.api.sharding.complex.ComplexKeysShardingValue;
-
-import java.util.Collection;
-import java.util.Collections;
-
-public final class DriverComplexKeysShardingAlgorithmFixture implements ComplexKeysShardingAlgorithm<String> {
-
- @Override
- public Collection<String> doSharding(final Collection<String> availableTargetNames, final ComplexKeysShardingValue<String> shardingValue) {
- return Collections.emptyList();
- }
-
- @Override
- public String getType() {
- return "DRIVER.COMPLEX.FIXTURE";
- }
-}
diff --git a/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/algorithm/sharding/DriverStandardShardingAlgorithmFixture.java b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/algorithm/sharding/DriverStandardShardingAlgorithmFixture.java
deleted file mode 100644
index 5a561d85daf..00000000000
--- a/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/algorithm/sharding/DriverStandardShardingAlgorithmFixture.java
+++ /dev/null
@@ -1,47 +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.
- */
-
-package org.apache.shardingsphere.test.e2e.driver.fixture.algorithm.sharding;
-
-import org.apache.shardingsphere.sharding.api.sharding.standard.PreciseShardingValue;
-import org.apache.shardingsphere.sharding.api.sharding.standard.RangeShardingValue;
-import org.apache.shardingsphere.sharding.api.sharding.standard.StandardShardingAlgorithm;
-
-import java.util.Collection;
-
-public final class DriverStandardShardingAlgorithmFixture implements StandardShardingAlgorithm<Integer> {
-
- @Override
- public String doSharding(final Collection<String> availableTargetNames, final PreciseShardingValue<Integer> shardingValue) {
- for (String each : availableTargetNames) {
- if (each.endsWith(String.valueOf(shardingValue.getValue() % 10))) {
- return each;
- }
- }
- throw new UnsupportedOperationException("");
- }
-
- @Override
- public Collection<String> doSharding(final Collection<String> availableTargetNames, final RangeShardingValue<Integer> shardingValue) {
- throw new UnsupportedOperationException("Cannot find range sharding strategy in sharding rule.");
- }
-
- @Override
- public String getType() {
- return "DRIVER.STANDARD.FIXTURE";
- }
-}
diff --git a/jdbc/core/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/encrypt/JDBCEncryptAlgorithmFixture.java b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/encrypt/JDBCEncryptAlgorithmFixture.java
similarity index 100%
rename from jdbc/core/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/encrypt/JDBCEncryptAlgorithmFixture.java
rename to test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/encrypt/JDBCEncryptAlgorithmFixture.java
diff --git a/jdbc/core/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/encrypt/JDBCQueryAssistedEncryptAlgorithmFixture.java b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/encrypt/JDBCQueryAssistedEncryptAlgorithmFixture.java
similarity index 100%
rename from jdbc/core/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/encrypt/JDBCQueryAssistedEncryptAlgorithmFixture.java
rename to test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/encrypt/JDBCQueryAssistedEncryptAlgorithmFixture.java
diff --git a/jdbc/core/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/keygen/IncrementKeyGenerateAlgorithmFixture.java b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/keygen/IncrementKeyGenerateAlgorithmFixture.java
similarity index 100%
rename from jdbc/core/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/keygen/IncrementKeyGenerateAlgorithmFixture.java
rename to test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/keygen/IncrementKeyGenerateAlgorithmFixture.java
diff --git a/jdbc/core/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/keygen/ResetIncrementKeyGenerateAlgorithmFixture.java b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/keygen/ResetIncrementKeyGenerateAlgorithmFixture.java
similarity index 100%
rename from jdbc/core/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/keygen/ResetIncrementKeyGenerateAlgorithmFixture.java
rename to test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/keygen/ResetIncrementKeyGenerateAlgorithmFixture.java
diff --git a/jdbc/core/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/sharding/JDBCStandardShardingAlgorithmFixture.java b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/sharding/JDBCStandardShardingAlgorithmFixture.java
similarity index 100%
rename from jdbc/core/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/sharding/JDBCStandardShardingAlgorithmFixture.java
rename to test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/sharding/JDBCStandardShardingAlgorithmFixture.java
diff --git a/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/mix/YamlShardingWithReadwriteSplittingE2EIT.java b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/mix/YamlShardingWithReadwriteSplittingE2EIT.java
deleted file mode 100644
index 665cb8bf689..00000000000
--- a/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/mix/YamlShardingWithReadwriteSplittingE2EIT.java
+++ /dev/null
@@ -1,78 +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.
- */
-
-package org.apache.shardingsphere.test.e2e.driver.mix;
-
-import org.apache.shardingsphere.driver.api.yaml.YamlShardingSphereDataSourceFactory;
-import org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource;
-import org.apache.shardingsphere.test.e2e.driver.AbstractYamlDataSourceE2EIT;
-import org.junit.jupiter.api.extension.ExtensionContext;
-import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.Arguments;
-import org.junit.jupiter.params.provider.ArgumentsProvider;
-import org.junit.jupiter.params.provider.ArgumentsSource;
-
-import javax.sql.DataSource;
-import java.io.File;
-import java.sql.Connection;
-import java.sql.Statement;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Objects;
-import java.util.stream.Stream;
-
-class YamlShardingWithReadwriteSplittingE2EIT extends AbstractYamlDataSourceE2EIT {
-
- @ParameterizedTest(name = "{index}:{0}-{1}")
- @ArgumentsSource(TestCaseArgumentsProvider.class)
- void assertWithDataSource(final String filePath, final boolean hasDataSource) throws Exception {
- File yamlFile = new File(Objects.requireNonNull(YamlShardingWithReadwriteSplittingE2EIT.class.getResource(filePath)).toURI());
- DataSource dataSource;
- if (hasDataSource) {
- dataSource = YamlShardingSphereDataSourceFactory.createDataSource(yamlFile);
- } else {
- Map<String, DataSource> dataSourceMap = new HashMap<>(4, 1);
- dataSourceMap.put("write_ds_0", createDataSource("write_ds_0"));
- dataSourceMap.put("read_ds_0", createDataSource("read_ds_0"));
- dataSourceMap.put("write_ds_1", createDataSource("write_ds_1"));
- dataSourceMap.put("read_ds_1", createDataSource("read_ds_1"));
- Map<String, DataSource> result = new HashMap<>(dataSourceMap.size(), 1);
- result.putAll(dataSourceMap);
- dataSource = YamlShardingSphereDataSourceFactory.createDataSource(result, yamlFile);
- }
- try (
- Connection connection = dataSource.getConnection();
- Statement statement = connection.createStatement()) {
- statement.execute(String.format("INSERT INTO t_order(user_id,status) values(%d, %s)", 10, "'insert'"));
- statement.executeQuery("SELECT * FROM t_order");
- statement.executeQuery("SELECT * FROM t_order_item");
- statement.executeQuery("SELECT * FROM config");
- }
- ((ShardingSphereDataSource) dataSource).close();
- }
-
- private static class TestCaseArgumentsProvider implements ArgumentsProvider {
-
- @Override
- public Stream<? extends Arguments> provideArguments(final ExtensionContext extensionContext) {
- return Stream.of(Arguments.of("/yaml/integrate/sharding_readwrite_splitting/configWithDataSourceWithoutProps.yaml", true),
- Arguments.of("/yaml/integrate/sharding_readwrite_splitting/configWithoutDataSourceWithoutProps.yaml", false),
- Arguments.of("/yaml/integrate/sharding_readwrite_splitting/configWithDataSourceWithProps.yaml", true),
- Arguments.of("/yaml/integrate/sharding_readwrite_splitting/configWithoutDataSourceWithProps.yaml", false));
- }
- }
-}
diff --git a/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/readwrite/YamlReadwriteSplittingE2EIT.java b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/readwrite/YamlReadwriteSplittingE2EIT.java
deleted file mode 100644
index 13d53d264a9..00000000000
--- a/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/readwrite/YamlReadwriteSplittingE2EIT.java
+++ /dev/null
@@ -1,98 +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.
- */
-
-package org.apache.shardingsphere.test.e2e.driver.readwrite;
-
-import org.apache.shardingsphere.driver.api.yaml.YamlShardingSphereDataSourceFactory;
-import org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource;
-import org.apache.shardingsphere.test.e2e.driver.AbstractYamlDataSourceE2EIT;
-import org.junit.jupiter.api.extension.ExtensionContext;
-import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.Arguments;
-import org.junit.jupiter.params.provider.ArgumentsProvider;
-import org.junit.jupiter.params.provider.ArgumentsSource;
-
-import javax.sql.DataSource;
-import java.io.File;
-import java.sql.Connection;
-import java.sql.Statement;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Objects;
-import java.util.stream.Stream;
-
-class YamlReadwriteSplittingE2EIT extends AbstractYamlDataSourceE2EIT {
-
- @ParameterizedTest(name = "{index}:{0}-{1}")
- @ArgumentsSource(TestCaseArgumentsProvider.class)
- void assertWithDataSource(final String filePath, final boolean hasDataSource) throws Exception {
- File yamlFile = new File(Objects.requireNonNull(YamlReadwriteSplittingE2EIT.class.getResource(filePath)).toURI());
- DataSource dataSource;
- if (hasDataSource) {
- dataSource = YamlShardingSphereDataSourceFactory.createDataSource(yamlFile);
- } else {
- Map<String, DataSource> dataSourceMap = new HashMap<>(3, 1);
- dataSourceMap.put("db_write", createDataSource("db_write"));
- dataSourceMap.put("read_ds_0", createDataSource("read_ds_0"));
- dataSourceMap.put("read_ds_1", createDataSource("read_ds_1"));
- dataSource = YamlShardingSphereDataSourceFactory.createDataSource(dataSourceMap, yamlFile);
- }
- try (
- Connection connection = dataSource.getConnection();
- Statement statement = connection.createStatement()) {
- statement.executeQuery("SELECT * FROM t_order");
- statement.executeQuery("SELECT * FROM t_order_item");
- statement.executeQuery("SELECT * FROM t_config");
- }
- ((ShardingSphereDataSource) dataSource).close();
- }
-
- @ParameterizedTest(name = "{index}:{0}-{1}")
- @ArgumentsSource(TestCaseArgumentsProvider.class)
- void assertWithDataSourceByYamlBytes(final String filePath, final boolean hasDataSource) throws Exception {
- File yamlFile = new File(Objects.requireNonNull(YamlReadwriteSplittingE2EIT.class.getResource(filePath)).toURI());
- DataSource dataSource;
- if (hasDataSource) {
- dataSource = YamlShardingSphereDataSourceFactory.createDataSource(yamlFile);
- } else {
- Map<String, DataSource> dataSourceMap = new HashMap<>(3, 1);
- dataSourceMap.put("db_write", createDataSource("db_write"));
- dataSourceMap.put("read_ds_0", createDataSource("read_ds_0"));
- dataSourceMap.put("read_ds_1", createDataSource("read_ds_1"));
- dataSource = YamlShardingSphereDataSourceFactory.createDataSource(dataSourceMap, yamlFile);
- }
- try (
- Connection connection = dataSource.getConnection();
- Statement statement = connection.createStatement()) {
- statement.executeQuery("SELECT * FROM t_order");
- statement.executeQuery("SELECT * FROM t_order_item");
- statement.executeQuery("SELECT * FROM t_config");
- }
- ((ShardingSphereDataSource) dataSource).close();
- }
-
- private static class TestCaseArgumentsProvider implements ArgumentsProvider {
-
- @Override
- public Stream<? extends Arguments> provideArguments(final ExtensionContext extensionContext) {
- return Stream.of(Arguments.of("/yaml/integrate/readwrite_splitting/configWithReadwriteSplittingDataSourceWithoutProps.yaml", true),
- Arguments.of("/yaml/integrate/readwrite_splitting/configWithReadwriteSplittingDataSourceWithoutProps.yaml", true),
- Arguments.of("/yaml/integrate/readwrite_splitting/configWithReadwriteSplittingDataSourceWithProps.yaml", true),
- Arguments.of("/yaml/integrate/readwrite_splitting/configWithReadwriteSplittingDataSourceWithProps.yaml", true));
- }
- }
-}
diff --git a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/resultset/EncryptResultSetTest.java b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/resultset/EncryptResultSetTest.java
similarity index 96%
rename from jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/resultset/EncryptResultSetTest.java
rename to test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/resultset/EncryptResultSetTest.java
index 5e2b0356f11..6ececd18596 100644
--- a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/resultset/EncryptResultSetTest.java
+++ b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/resultset/EncryptResultSetTest.java
@@ -15,9 +15,9 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.driver.jdbc.core.resultset;
+package org.apache.shardingsphere.test.e2e.driver.resultset;
-import org.apache.shardingsphere.driver.jdbc.base.AbstractShardingSphereDataSourceForEncryptTest;
+import org.apache.shardingsphere.test.e2e.driver.AbstractShardingSphereDataSourceForEncryptTest;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
diff --git a/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/sharding/YamlShardingE2EIT.java b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/sharding/YamlShardingE2EIT.java
deleted file mode 100644
index 359eeae7e67..00000000000
--- a/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/sharding/YamlShardingE2EIT.java
+++ /dev/null
@@ -1,74 +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.
- */
-
-package org.apache.shardingsphere.test.e2e.driver.sharding;
-
-import org.apache.shardingsphere.driver.api.yaml.YamlShardingSphereDataSourceFactory;
-import org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource;
-import org.apache.shardingsphere.test.e2e.driver.AbstractYamlDataSourceE2EIT;
-import org.junit.jupiter.api.extension.ExtensionContext;
-import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.Arguments;
-import org.junit.jupiter.params.provider.ArgumentsProvider;
-import org.junit.jupiter.params.provider.ArgumentsSource;
-
-import javax.sql.DataSource;
-import java.io.File;
-import java.sql.Connection;
-import java.sql.Statement;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Objects;
-import java.util.stream.Stream;
-
-class YamlShardingE2EIT extends AbstractYamlDataSourceE2EIT {
-
- @ParameterizedTest(name = "{index}:{0}-{1}")
- @ArgumentsSource(TestCaseArgumentsProvider.class)
- void assertWithDataSource(final String filePath, final boolean hasDataSource) throws Exception {
- File yamlFile = new File(Objects.requireNonNull(YamlShardingE2EIT.class.getResource(filePath)).toURI());
- DataSource dataSource;
- if (hasDataSource) {
- dataSource = YamlShardingSphereDataSourceFactory.createDataSource(yamlFile);
- } else {
- Map<String, DataSource> dataSourceMap = new HashMap<>(2, 1);
- dataSourceMap.put("db0", createDataSource("db0"));
- dataSourceMap.put("db1", createDataSource("db1"));
- dataSource = YamlShardingSphereDataSourceFactory.createDataSource(dataSourceMap, yamlFile);
- }
- try (
- Connection connection = dataSource.getConnection();
- Statement statement = connection.createStatement()) {
- statement.execute(String.format("INSERT INTO t_order(user_id,status) values(%d, %s)", 10, "'insert'"));
- statement.executeQuery("SELECT * FROM t_order");
- statement.executeQuery("SELECT * FROM t_order_item");
- statement.executeQuery("SELECT * FROM config");
- }
- ((ShardingSphereDataSource) dataSource).close();
- }
-
- private static class TestCaseArgumentsProvider implements ArgumentsProvider {
-
- @Override
- public Stream<? extends Arguments> provideArguments(final ExtensionContext extensionContext) {
- return Stream.of(Arguments.of("/yaml/integrate/sharding/configWithDataSourceWithoutProps.yaml", true),
- Arguments.of("/yaml/integrate/sharding/configWithoutDataSourceWithoutProps.yaml", false),
- Arguments.of("/yaml/integrate/sharding/configWithDataSourceWithProps.yaml", true),
- Arguments.of("/yaml/integrate/sharding/configWithoutDataSourceWithProps.yaml", false));
- }
- }
-}
diff --git a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/statement/EncryptPreparedStatementTest.java b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/statement/EncryptPreparedStatementTest.java
similarity index 98%
rename from jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/statement/EncryptPreparedStatementTest.java
rename to test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/statement/EncryptPreparedStatementTest.java
index dfb66672484..33bf2aec3a1 100644
--- a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/statement/EncryptPreparedStatementTest.java
+++ b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/statement/EncryptPreparedStatementTest.java
@@ -15,10 +15,10 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.driver.jdbc.core.statement;
+package org.apache.shardingsphere.test.e2e.driver.statement;
-import org.apache.shardingsphere.driver.jdbc.base.AbstractShardingSphereDataSourceForEncryptTest;
import org.apache.shardingsphere.infra.config.props.ConfigurationPropertyKey;
+import org.apache.shardingsphere.test.e2e.driver.AbstractShardingSphereDataSourceForEncryptTest;
import org.junit.jupiter.api.Test;
import java.sql.Connection;
diff --git a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/statement/EncryptStatementTest.java b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/statement/EncryptStatementTest.java
similarity index 98%
rename from jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/statement/EncryptStatementTest.java
rename to test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/statement/EncryptStatementTest.java
index 400b21fd761..2a57d091ace 100644
--- a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/statement/EncryptStatementTest.java
+++ b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/statement/EncryptStatementTest.java
@@ -15,10 +15,10 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.driver.jdbc.core.statement;
+package org.apache.shardingsphere.test.e2e.driver.statement;
-import org.apache.shardingsphere.driver.jdbc.base.AbstractShardingSphereDataSourceForEncryptTest;
import org.apache.shardingsphere.infra.config.props.ConfigurationPropertyKey;
+import org.apache.shardingsphere.test.e2e.driver.AbstractShardingSphereDataSourceForEncryptTest;
import org.junit.jupiter.api.Test;
import java.sql.Connection;
@@ -30,8 +30,8 @@ import java.util.Arrays;
import java.util.List;
import static org.hamcrest.CoreMatchers.is;
-import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
diff --git a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/statement/ReadwriteSplittingPreparedStatementTest.java b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/statement/ReadwriteSplittingPreparedStatementTest.java
similarity index 96%
rename from jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/statement/ReadwriteSplittingPreparedStatementTest.java
rename to test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/statement/ReadwriteSplittingPreparedStatementTest.java
index ae63e93c49b..5d33d029c5a 100644
--- a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/statement/ReadwriteSplittingPreparedStatementTest.java
+++ b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/statement/ReadwriteSplittingPreparedStatementTest.java
@@ -15,9 +15,9 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.driver.jdbc.core.statement;
+package org.apache.shardingsphere.test.e2e.driver.statement;
-import org.apache.shardingsphere.driver.jdbc.base.AbstractShardingSphereDataSourceForReadwriteSplittingTest;
+import org.apache.shardingsphere.test.e2e.driver.AbstractShardingSphereDataSourceForReadwriteSplittingTest;
import org.junit.jupiter.api.Test;
import java.sql.Connection;
@@ -28,9 +28,9 @@ import java.sql.Statement;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
diff --git a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/statement/ReadwriteSplittingStatementTest.java b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/statement/ReadwriteSplittingStatementTest.java
similarity index 94%
rename from jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/statement/ReadwriteSplittingStatementTest.java
rename to test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/statement/ReadwriteSplittingStatementTest.java
index 4766b374de2..f539ac11bab 100644
--- a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/statement/ReadwriteSplittingStatementTest.java
+++ b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/statement/ReadwriteSplittingStatementTest.java
@@ -15,9 +15,9 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.driver.jdbc.core.statement;
+package org.apache.shardingsphere.test.e2e.driver.statement;
-import org.apache.shardingsphere.driver.jdbc.base.AbstractShardingSphereDataSourceForReadwriteSplittingTest;
+import org.apache.shardingsphere.test.e2e.driver.AbstractShardingSphereDataSourceForReadwriteSplittingTest;
import org.junit.jupiter.api.Test;
import java.sql.ResultSet;
diff --git a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShadowPreparedStatementTest.java b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/statement/ShadowPreparedStatementTest.java
similarity index 98%
rename from jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShadowPreparedStatementTest.java
rename to test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/statement/ShadowPreparedStatementTest.java
index 764655a8abf..09e6cef807a 100644
--- a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShadowPreparedStatementTest.java
+++ b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/statement/ShadowPreparedStatementTest.java
@@ -15,9 +15,9 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.driver.jdbc.core.statement;
+package org.apache.shardingsphere.test.e2e.driver.statement;
-import org.apache.shardingsphere.driver.jdbc.base.AbstractShardingSphereDataSourceForShadowTest;
+import org.apache.shardingsphere.test.e2e.driver.AbstractShardingSphereDataSourceForShadowTest;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;
diff --git a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShadowStatementTest.java b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/statement/ShadowStatementTest.java
similarity index 97%
rename from jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShadowStatementTest.java
rename to test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/statement/ShadowStatementTest.java
index 50c4a9d900a..11960d1767f 100644
--- a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShadowStatementTest.java
+++ b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/statement/ShadowStatementTest.java
@@ -15,9 +15,9 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.driver.jdbc.core.statement;
+package org.apache.shardingsphere.test.e2e.driver.statement;
-import org.apache.shardingsphere.driver.jdbc.base.AbstractShardingSphereDataSourceForShadowTest;
+import org.apache.shardingsphere.test.e2e.driver.AbstractShardingSphereDataSourceForShadowTest;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;
diff --git a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShardingSpherePreparedStatementTest.java b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/statement/ShardingSpherePreparedStatementTest.java
similarity index 99%
rename from jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShardingSpherePreparedStatementTest.java
rename to test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/statement/ShardingSpherePreparedStatementTest.java
index 4e1e32b91aa..9b75a486ae0 100644
--- a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShardingSpherePreparedStatementTest.java
+++ b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/statement/ShardingSpherePreparedStatementTest.java
@@ -15,9 +15,9 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.driver.jdbc.core.statement;
+package org.apache.shardingsphere.test.e2e.driver.statement;
-import org.apache.shardingsphere.driver.jdbc.base.AbstractShardingSphereDataSourceForShardingTest;
+import org.apache.shardingsphere.test.e2e.driver.AbstractShardingSphereDataSourceForShardingTest;
import org.apache.shardingsphere.test.e2e.driver.fixture.keygen.ResetIncrementKeyGenerateAlgorithmFixture;
import org.junit.jupiter.api.Test;
diff --git a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShardingSphereStatementTest.java b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/statement/ShardingSphereStatementTest.java
similarity index 97%
rename from jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShardingSphereStatementTest.java
rename to test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/statement/ShardingSphereStatementTest.java
index a391caeb082..6b2543d23e8 100644
--- a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShardingSphereStatementTest.java
+++ b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/statement/ShardingSphereStatementTest.java
@@ -15,10 +15,10 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.driver.jdbc.core.statement;
+package org.apache.shardingsphere.test.e2e.driver.statement;
-import org.apache.shardingsphere.driver.jdbc.base.AbstractShardingSphereDataSourceForShardingTest;
import org.apache.shardingsphere.infra.database.DefaultDatabase;
+import org.apache.shardingsphere.test.e2e.driver.AbstractShardingSphereDataSourceForShardingTest;
import org.junit.jupiter.api.Test;
import java.sql.Connection;
diff --git a/jdbc/core/src/test/resources/META-INF/services/org.apache.shardingsphere.encrypt.spi.EncryptAlgorithm b/test/e2e/driver/src/test/resources/META-INF/services/org.apache.shardingsphere.encrypt.spi.EncryptAlgorithm
similarity index 100%
rename from jdbc/core/src/test/resources/META-INF/services/org.apache.shardingsphere.encrypt.spi.EncryptAlgorithm
rename to test/e2e/driver/src/test/resources/META-INF/services/org.apache.shardingsphere.encrypt.spi.EncryptAlgorithm
diff --git a/test/e2e/driver/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.config.rule.checker.RuleConfigurationChecker b/test/e2e/driver/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.config.rule.checker.RuleConfigurationChecker
deleted file mode 100644
index 2502a0a574b..00000000000
--- a/test/e2e/driver/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.config.rule.checker.RuleConfigurationChecker
+++ /dev/null
@@ -1,18 +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.
-#
-
-org.apache.shardingsphere.test.e2e.driver.fixture.TestRuleConfigurationChecker
diff --git a/test/e2e/driver/src/test/resources/META-INF/services/org.apache.shardingsphere.mode.repository.cluster.ClusterPersistRepository b/test/e2e/driver/src/test/resources/META-INF/services/org.apache.shardingsphere.mode.repository.cluster.ClusterPersistRepository
deleted file mode 100644
index 2c8b9728786..00000000000
--- a/test/e2e/driver/src/test/resources/META-INF/services/org.apache.shardingsphere.mode.repository.cluster.ClusterPersistRepository
+++ /dev/null
@@ -1,18 +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.
-#
-
-org.apache.shardingsphere.test.e2e.driver.fixture.TestClusterPersistRepository
diff --git a/test/e2e/driver/src/test/resources/META-INF/services/org.apache.shardingsphere.sharding.spi.KeyGenerateAlgorithm b/test/e2e/driver/src/test/resources/META-INF/services/org.apache.shardingsphere.sharding.spi.KeyGenerateAlgorithm
index bb81f8d449a..659957f5e1a 100644
--- a/test/e2e/driver/src/test/resources/META-INF/services/org.apache.shardingsphere.sharding.spi.KeyGenerateAlgorithm
+++ b/test/e2e/driver/src/test/resources/META-INF/services/org.apache.shardingsphere.sharding.spi.KeyGenerateAlgorithm
@@ -15,4 +15,5 @@
# limitations under the License.
#
-org.apache.shardingsphere.test.e2e.driver.fixture.algorithm.keygen.DriverKeyGenerateAlgorithmFixture
+org.apache.shardingsphere.test.e2e.driver.fixture.keygen.IncrementKeyGenerateAlgorithmFixture
+org.apache.shardingsphere.test.e2e.driver.fixture.keygen.ResetIncrementKeyGenerateAlgorithmFixture
diff --git a/test/e2e/driver/src/test/resources/META-INF/services/org.apache.shardingsphere.sharding.spi.ShardingAlgorithm b/test/e2e/driver/src/test/resources/META-INF/services/org.apache.shardingsphere.sharding.spi.ShardingAlgorithm
index 6af442ec18f..f352845def8 100644
--- a/test/e2e/driver/src/test/resources/META-INF/services/org.apache.shardingsphere.sharding.spi.ShardingAlgorithm
+++ b/test/e2e/driver/src/test/resources/META-INF/services/org.apache.shardingsphere.sharding.spi.ShardingAlgorithm
@@ -15,5 +15,4 @@
# limitations under the License.
#
-org.apache.shardingsphere.test.e2e.driver.fixture.algorithm.sharding.DriverStandardShardingAlgorithmFixture
-org.apache.shardingsphere.test.e2e.driver.fixture.algorithm.sharding.DriverComplexKeysShardingAlgorithmFixture
+org.apache.shardingsphere.test.e2e.driver.fixture.sharding.JDBCStandardShardingAlgorithmFixture
diff --git a/jdbc/core/src/test/resources/config/config-encrypt-query-with-cipher.yaml b/test/e2e/driver/src/test/resources/config/config-encrypt-query-with-cipher.yaml
similarity index 100%
rename from jdbc/core/src/test/resources/config/config-encrypt-query-with-cipher.yaml
rename to test/e2e/driver/src/test/resources/config/config-encrypt-query-with-cipher.yaml
diff --git a/jdbc/core/src/test/resources/config/config-encrypt-query-with-plain.yaml b/test/e2e/driver/src/test/resources/config/config-encrypt-query-with-plain.yaml
similarity index 100%
rename from jdbc/core/src/test/resources/config/config-encrypt-query-with-plain.yaml
rename to test/e2e/driver/src/test/resources/config/config-encrypt-query-with-plain.yaml
diff --git a/jdbc/core/src/test/resources/config/config-readwrite-splitting.yaml b/test/e2e/driver/src/test/resources/config/config-readwrite-splitting.yaml
similarity index 100%
rename from jdbc/core/src/test/resources/config/config-readwrite-splitting.yaml
rename to test/e2e/driver/src/test/resources/config/config-readwrite-splitting.yaml
diff --git a/jdbc/core/src/test/resources/config/config-shadow.yaml b/test/e2e/driver/src/test/resources/config/config-shadow.yaml
similarity index 100%
rename from jdbc/core/src/test/resources/config/config-shadow.yaml
rename to test/e2e/driver/src/test/resources/config/config-shadow.yaml
diff --git a/jdbc/core/src/test/resources/config/config-sharding.yaml b/test/e2e/driver/src/test/resources/config/config-sharding.yaml
similarity index 100%
rename from jdbc/core/src/test/resources/config/config-sharding.yaml
rename to test/e2e/driver/src/test/resources/config/config-sharding.yaml
diff --git a/test/e2e/driver/src/test/resources/logback-test.xml b/test/e2e/driver/src/test/resources/logback-test.xml
index 29123bfa8f2..dc172427e06 100644
--- a/test/e2e/driver/src/test/resources/logback-test.xml
+++ b/test/e2e/driver/src/test/resources/logback-test.xml
@@ -25,8 +25,7 @@
<logger name="org.apache.shardingsphere" level="warn" additivity="false">
<appender-ref ref="console" />
</logger>
- <logger name="org.apache.shardingsphere.schedule.core.ModeScheduleContext" level="error" />
- <logger name="org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.service.ComputeNodeStatusService" level="off" />
+ <logger name="org.apache.shardingsphere.infra.executor.sql.execute.engine.SQLExecutorExceptionHandler" level="off" />
<root>
<level value="error" />
diff --git a/jdbc/core/src/test/resources/sql/encrypt_data.sql b/test/e2e/driver/src/test/resources/sql/encrypt_data.sql
similarity index 100%
rename from jdbc/core/src/test/resources/sql/encrypt_data.sql
rename to test/e2e/driver/src/test/resources/sql/encrypt_data.sql
diff --git a/jdbc/core/src/test/resources/sql/jdbc_data.sql b/test/e2e/driver/src/test/resources/sql/jdbc_data.sql
similarity index 100%
rename from jdbc/core/src/test/resources/sql/jdbc_data.sql
rename to test/e2e/driver/src/test/resources/sql/jdbc_data.sql
diff --git a/jdbc/core/src/test/resources/sql/jdbc_encrypt_init.sql b/test/e2e/driver/src/test/resources/sql/jdbc_encrypt_init.sql
similarity index 100%
rename from jdbc/core/src/test/resources/sql/jdbc_encrypt_init.sql
rename to test/e2e/driver/src/test/resources/sql/jdbc_encrypt_init.sql
diff --git a/jdbc/core/src/test/resources/sql/jdbc_init.sql b/test/e2e/driver/src/test/resources/sql/jdbc_init.sql
similarity index 100%
rename from jdbc/core/src/test/resources/sql/jdbc_init.sql
rename to test/e2e/driver/src/test/resources/sql/jdbc_init.sql
diff --git a/jdbc/core/src/test/resources/sql/jdbc_shadow_init.sql b/test/e2e/driver/src/test/resources/sql/jdbc_shadow_init.sql
similarity index 100%
rename from jdbc/core/src/test/resources/sql/jdbc_shadow_init.sql
rename to test/e2e/driver/src/test/resources/sql/jdbc_shadow_init.sql
diff --git a/jdbc/core/src/test/resources/sql/single_jdbc_init.sql b/test/e2e/driver/src/test/resources/sql/single_jdbc_init.sql
similarity index 100%
rename from jdbc/core/src/test/resources/sql/single_jdbc_init.sql
rename to test/e2e/driver/src/test/resources/sql/single_jdbc_init.sql
diff --git a/test/e2e/driver/src/test/resources/yaml/integrate/readwrite_splitting/configWithReadwriteSplittingDataSourceWithProps.yaml b/test/e2e/driver/src/test/resources/yaml/integrate/readwrite_splitting/configWithReadwriteSplittingDataSourceWithProps.yaml
deleted file mode 100644
index 4068e5f76da..00000000000
--- a/test/e2e/driver/src/test/resources/yaml/integrate/readwrite_splitting/configWithReadwriteSplittingDataSourceWithProps.yaml
+++ /dev/null
@@ -1,61 +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.
-#
-
-dataSources:
- db_write:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: org.h2.Driver
- jdbcUrl: jdbc:h2:mem:db_write;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
- username: sa
- password:
- maxTotal: 100
- read_ds_0:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: org.h2.Driver
- jdbcUrl: jdbc:h2:mem:read_ds_0;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
- username: sa
- password:
- maxTotal: 100
- read_ds_1:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: org.h2.Driver
- jdbcUrl: jdbc:h2:mem:read_ds_1;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
- username: sa
- password:
- maxTotal: 100
-
-rules:
- - !READWRITE_SPLITTING
- dataSources:
- readwrite_ds:
- staticStrategy:
- writeDataSourceName: db_write
- readDataSourceNames:
- - read_ds_0
- - read_ds_1
-
-mode:
- type: Cluster
- repository:
- type: GOV_TEST
- props:
- namespace: test_rw_registry_name
- server-lists: localhost:3181
- retryIntervalMilliseconds: 10
- timeToLiveSeconds: 10
- maxRetries: 10
- operationTimeoutMilliseconds: 10
diff --git a/test/e2e/driver/src/test/resources/yaml/integrate/readwrite_splitting/configWithReadwriteSplittingDataSourceWithoutProps.yaml b/test/e2e/driver/src/test/resources/yaml/integrate/readwrite_splitting/configWithReadwriteSplittingDataSourceWithoutProps.yaml
deleted file mode 100644
index ef90e660097..00000000000
--- a/test/e2e/driver/src/test/resources/yaml/integrate/readwrite_splitting/configWithReadwriteSplittingDataSourceWithoutProps.yaml
+++ /dev/null
@@ -1,61 +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.
-#
-
-dataSources:
- db_write:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: org.h2.Driver
- jdbcUrl: jdbc:h2:mem:db_write;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
- username: sa
- password:
- maxTotal: 100
- read_ds_0:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: org.h2.Driver
- jdbcUrl: jdbc:h2:mem:read_ds_0;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
- username: sa
- password:
- maxTotal: 100
- read_ds_1:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: org.h2.Driver
- jdbcUrl: jdbc:h2:mem:read_ds_1;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
- username: sa
- password:
- maxTotal: 100
-
-rules:
-- !READWRITE_SPLITTING
- dataSources:
- readwrite_ds:
- staticStrategy:
- writeDataSourceName: db_write
- readDataSourceNames:
- - read_ds_0
- - read_ds_1
-
-mode:
- type: Cluster
- repository:
- type: GOV_TEST
- props:
- namespace: test_rw_registry_name
- server-lists: localhost:3181
- retryIntervalMilliseconds: 10
- timeToLiveSeconds: 10
- maxRetries: 10
- operationTimeoutMilliseconds: 10
diff --git a/test/e2e/driver/src/test/resources/yaml/integrate/sharding/configWithDataSourceWithProps.yaml b/test/e2e/driver/src/test/resources/yaml/integrate/sharding/configWithDataSourceWithProps.yaml
deleted file mode 100644
index 4c398c79b58..00000000000
--- a/test/e2e/driver/src/test/resources/yaml/integrate/sharding/configWithDataSourceWithProps.yaml
+++ /dev/null
@@ -1,101 +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.
-#
-
-databaseName: logic_db
-
-dataSources:
- db0:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: org.h2.Driver
- jdbcUrl: jdbc:h2:mem:db0;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
- username: sa
- password:
- maxTotal: 100
- db1:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: org.h2.Driver
- jdbcUrl: jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
- username: sa
- password:
- maxTotal: 100
-
-rules:
-- !SHARDING
- tables:
- config:
- actualDataNodes: db${0..1}.t_config
- t_order:
- actualDataNodes: db${0..1}.t_order_${0..1}
- databaseStrategy:
- standard:
- shardingColumn: user_id
- shardingAlgorithmName: standard_sharding_fixture
- tableStrategy:
- standard:
- shardingColumn: order_id
- shardingAlgorithmName: t_order_inline
- keyGenerateStrategy:
- column: order_id
- keyGeneratorName: keygen_fixture
- t_order_item:
- actualDataNodes: db${0..1}.t_order_item_${0..1}
- databaseStrategy:
- standard:
- shardingColumn: user_id
- shardingAlgorithmName: standard_sharding_fixture
- tableStrategy:
- standard:
- shardingColumn: order_id
- shardingAlgorithmName: t_order_item_inline
- bindingTables:
- - t_order,t_order_item
- defaultDatabaseStrategy:
- none:
- defaultTableStrategy:
- complex:
- shardingColumns: id, order_id
- shardingAlgorithmName: complex_sharding_fixture
-
- shardingAlgorithms:
- standard_sharding_fixture:
- type: DRIVER.STANDARD.FIXTURE
- complex_sharding_fixture:
- type: DRIVER.COMPLEX.FIXTURE
- t_order_inline:
- type: INLINE
- props:
- algorithm-expression: t_order_${order_id % 2}
- t_order_item_inline:
- type: INLINE
- props:
- algorithm-expression: t_order_item_${order_id % 2}
-
- keyGenerators:
- keygen_fixture:
- type: DRIVER.FIXTURE
-
-mode:
- type: Cluster
- repository:
- type: GOV_TEST
- props:
- namespace: test_sharding_registry_name
- server-lists: localhost:3181
- retryIntervalMilliseconds: 10
- timeToLiveSeconds: 10
- maxRetries: 10
- operationTimeoutMilliseconds: 10
diff --git a/test/e2e/driver/src/test/resources/yaml/integrate/sharding/configWithDataSourceWithoutProps.yaml b/test/e2e/driver/src/test/resources/yaml/integrate/sharding/configWithDataSourceWithoutProps.yaml
deleted file mode 100644
index 1a2026c3c19..00000000000
--- a/test/e2e/driver/src/test/resources/yaml/integrate/sharding/configWithDataSourceWithoutProps.yaml
+++ /dev/null
@@ -1,99 +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.
-#
-
-dataSources:
- db0:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: org.h2.Driver
- jdbcUrl: jdbc:h2:mem:db0;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
- username: sa
- password:
- maxTotal: 100
- db1:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: org.h2.Driver
- jdbcUrl: jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
- username: sa
- password:
- maxTotal: 100
-
-rules:
-- !SHARDING
- tables:
- config:
- actualDataNodes: db${0..1}.t_config
- t_order:
- actualDataNodes: db${0..1}.t_order_${0..1}
- databaseStrategy:
- standard:
- shardingColumn: user_id
- shardingAlgorithmName: standard_sharding_fixture
- tableStrategy:
- standard:
- shardingColumn: order_id
- shardingAlgorithmName: t_order_inline
- keyGenerateStrategy:
- column: order_id
- keyGeneratorName: keygen_fixture
- t_order_item:
- actualDataNodes: db${0..1}.t_order_item_${0..1}
- databaseStrategy:
- standard:
- shardingColumn: user_id
- shardingAlgorithmName: standard_sharding_fixture
- tableStrategy:
- standard:
- shardingColumn: order_id
- shardingAlgorithmName: t_order_item_inline
- bindingTables:
- - t_order,t_order_item
- defaultDatabaseStrategy:
- none:
- defaultTableStrategy:
- complex:
- shardingColumns: id, order_id
- shardingAlgorithmName: complex_sharding_fixture
-
- shardingAlgorithms:
- standard_sharding_fixture:
- type: DRIVER.STANDARD.FIXTURE
- complex_sharding_fixture:
- type: DRIVER.COMPLEX.FIXTURE
- t_order_inline:
- type: INLINE
- props:
- algorithm-expression: t_order_${order_id % 2}
- t_order_item_inline:
- type: INLINE
- props:
- algorithm-expression: t_order_item_${order_id % 2}
-
- keyGenerators:
- keygen_fixture:
- type: DRIVER.FIXTURE
-
-mode:
- type: Cluster
- repository:
- type: GOV_TEST
- props:
- namespace: test_sharding_registry_name
- server-lists: localhost:3181
- retryIntervalMilliseconds: 10
- timeToLiveSeconds: 10
- maxRetries: 10
- operationTimeoutMilliseconds: 10
diff --git a/test/e2e/driver/src/test/resources/yaml/integrate/sharding/configWithoutDataSourceWithProps.yaml b/test/e2e/driver/src/test/resources/yaml/integrate/sharding/configWithoutDataSourceWithProps.yaml
deleted file mode 100644
index 214a83e429e..00000000000
--- a/test/e2e/driver/src/test/resources/yaml/integrate/sharding/configWithoutDataSourceWithProps.yaml
+++ /dev/null
@@ -1,79 +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.
-#
-
-mode:
- type: Cluster
- repository:
- type: GOV_TEST
- props:
- namespace: test_sharding_registry_name
- server-lists: localhost:3181
- retryIntervalMilliseconds: 10
- timeToLiveSeconds: 10
- maxRetries: 10
- operationTimeoutMilliseconds: 10
-
-rules:
-- !SHARDING
- tables:
- config:
- actualDataNodes: db${0..1}.t_config
- t_order:
- actualDataNodes: db${0..1}.t_order_${0..1}
- databaseStrategy:
- standard:
- shardingColumn: user_id
- shardingAlgorithmName: standard_sharding_fixture
- tableStrategy:
- standard:
- shardingColumn: order_id
- shardingAlgorithmName: t_order_inline
- keyGenerateStrategy:
- column: order_id
- keyGeneratorName: keygen_fixture
- t_order_item:
- actualDataNodes: db${0..1}.t_order_item_${0..1}
- databaseStrategy:
- standard:
- shardingColumn: user_id
- shardingAlgorithmName: standard_sharding_fixture
- tableStrategy:
- standard:
- shardingColumn: order_id
- shardingAlgorithmName: t_order_item_inline
- bindingTables:
- - t_order,t_order_item
- defaultDatabaseStrategy:
- none:
- defaultTableStrategy:
- none:
-
- shardingAlgorithms:
- standard_sharding_fixture:
- type: DRIVER.STANDARD.FIXTURE
- t_order_inline:
- type: INLINE
- props:
- algorithm-expression: t_order_${order_id % 2}
- t_order_item_inline:
- type: INLINE
- props:
- algorithm-expression: t_order_item_${order_id % 2}
-
- keyGenerators:
- keygen_fixture:
- type: DRIVER.FIXTURE
diff --git a/test/e2e/driver/src/test/resources/yaml/integrate/sharding/configWithoutDataSourceWithoutProps.yaml b/test/e2e/driver/src/test/resources/yaml/integrate/sharding/configWithoutDataSourceWithoutProps.yaml
deleted file mode 100644
index ae854850575..00000000000
--- a/test/e2e/driver/src/test/resources/yaml/integrate/sharding/configWithoutDataSourceWithoutProps.yaml
+++ /dev/null
@@ -1,83 +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.
-#
-
-mode:
- type: Cluster
- repository:
- type: GOV_TEST
- props:
- namespace: test_sharding_registry_name
- server-lists: localhost:3181
- retryIntervalMilliseconds: 10
- timeToLiveSeconds: 10
- maxRetries: 10
- operationTimeoutMilliseconds: 10
-
-rules:
-- !SHARDING
- tables:
- config:
- actualDataNodes: db${0..1}.t_config
- t_order:
- actualDataNodes: db${0..1}.t_order_${0..1}
- databaseStrategy:
- standard:
- shardingColumn: user_id
- shardingAlgorithmName: standard_sharding_fixture
- tableStrategy:
- standard:
- shardingColumn: order_id
- shardingAlgorithmName: t_order_inline
- keyGenerateStrategy:
- column: order_id
- keyGeneratorName: keygen_fixture
- t_order_item:
- actualDataNodes: db${0..1}.t_order_item_${0..1}
- databaseStrategy:
- standard:
- shardingColumn: user_id
- shardingAlgorithmName: standard_sharding_fixture
- tableStrategy:
- standard:
- shardingColumn: order_id
- shardingAlgorithmName: t_order_item_inline
- bindingTables:
- - t_order,t_order_item
- defaultDatabaseStrategy:
- none:
- defaultTableStrategy:
- complex:
- shardingColumns: id, order_id
- shardingAlgorithmName: complex_sharding_fixture
-
- shardingAlgorithms:
- standard_sharding_fixture:
- type: DRIVER.STANDARD.FIXTURE
- complex_sharding_fixture:
- type: DRIVER.COMPLEX.FIXTURE
- t_order_inline:
- type: INLINE
- props:
- algorithm-expression: t_order_${order_id % 2}
- t_order_item_inline:
- type: INLINE
- props:
- algorithm-expression: t_order_item_${order_id % 2}
-
- keyGenerators:
- keygen_fixture:
- type: DRIVER.FIXTURE
diff --git a/test/e2e/driver/src/test/resources/yaml/integrate/sharding_readwrite_splitting/configWithDataSourceWithProps.yaml b/test/e2e/driver/src/test/resources/yaml/integrate/sharding_readwrite_splitting/configWithDataSourceWithProps.yaml
deleted file mode 100644
index d2b62ec87c0..00000000000
--- a/test/e2e/driver/src/test/resources/yaml/integrate/sharding_readwrite_splitting/configWithDataSourceWithProps.yaml
+++ /dev/null
@@ -1,137 +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.
-#
-
-dataSources:
- write_ds_0:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: org.h2.Driver
- jdbcUrl: jdbc:h2:mem:write_ds_0;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
- username: sa
- password:
- maxTotal: 100
- write_ds_1:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: org.h2.Driver
- jdbcUrl: jdbc:h2:mem:write_ds_1;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
- username: sa
- password:
- maxTotal: 100
- read_ds_0:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: org.h2.Driver
- jdbcUrl: jdbc:h2:mem:read_ds_0;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
- username: sa
- password:
- maxTotal: 100
- read_ds_1:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: org.h2.Driver
- jdbcUrl: jdbc:h2:mem:read_ds_1;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
- username: sa
- password:
- maxTotal: 100
-
-rules:
-- !SHARDING
- tables:
- config:
- actualDataNodes: readwrite_ds_${0..1}.t_config
- t_order:
- actualDataNodes: readwrite_ds_${0..1}.t_order_${0..1}
- databaseStrategy:
- standard:
- shardingColumn: user_id
- shardingAlgorithmName: standard_sharding_fixture
- tableStrategy:
- standard:
- shardingColumn: order_id
- shardingAlgorithmName: t_order_inline
- keyGenerateStrategy:
- column: order_id
- keyGeneratorName: keygen_fixture
- t_order_item:
- actualDataNodes: readwrite_ds_${0..1}.t_order_item_${0..1}
- databaseStrategy:
- standard:
- shardingColumn: order_id
- shardingAlgorithmName: standard_sharding_fixture
- tableStrategy:
- standard:
- shardingColumn: id
- shardingAlgorithmName: t_order_item_inline
- bindingTables:
- - t_order,t_order_item
- defaultDatabaseStrategy:
- none:
- defaultTableStrategy:
- complex:
- shardingColumns: id, order_id
- shardingAlgorithmName: complex_sharding_fixture
-
- shardingAlgorithms:
- standard_sharding_fixture:
- type: DRIVER.STANDARD.FIXTURE
- complex_sharding_fixture:
- type: DRIVER.COMPLEX.FIXTURE
- database_inline:
- type: INLINE
- props:
- algorithm-expression: ds_${order_id % 2}
- t_order_inline:
- type: INLINE
- props:
- algorithm-expression: t_order_${order_id % 2}
- t_order_item_inline:
- type: INLINE
- props:
- algorithm-expression: t_order_item_${id % 2}
-
- keyGenerators:
- keygen_fixture:
- type: DRIVER.FIXTURE
-
-- !READWRITE_SPLITTING
- dataSources:
- readwrite_ds_0:
- staticStrategy:
- writeDataSourceName: write_ds_0
- readDataSourceNames:
- - read_ds_0
- loadBalancerName: random
- readwrite_ds_1:
- staticStrategy:
- writeDataSourceName: write_ds_1
- readDataSourceNames:
- - read_ds_1
- loadBalancerName: roundRobin
- loadBalancers:
- random:
- type: RANDOM
- roundRobin:
- type: ROUND_ROBIN
-
-mode:
- type: Cluster
- repository:
- type: GOV_TEST
- props:
- namespace: test_sharding_ms_registry_name
- server-lists: localhost:3181
- retryIntervalMilliseconds: 10
- timeToLiveSeconds: 10
- maxRetries: 10
- operationTimeoutMilliseconds: 10
diff --git a/test/e2e/driver/src/test/resources/yaml/integrate/sharding_readwrite_splitting/configWithDataSourceWithoutProps.yaml b/test/e2e/driver/src/test/resources/yaml/integrate/sharding_readwrite_splitting/configWithDataSourceWithoutProps.yaml
deleted file mode 100644
index ff16535e360..00000000000
--- a/test/e2e/driver/src/test/resources/yaml/integrate/sharding_readwrite_splitting/configWithDataSourceWithoutProps.yaml
+++ /dev/null
@@ -1,139 +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.
-#
-
-dataSources:
- write_ds_0:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: org.h2.Driver
- jdbcUrl: jdbc:h2:mem:write_ds_0;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
- username: sa
- password:
- maxTotal: 100
- write_ds_1:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: org.h2.Driver
- jdbcUrl: jdbc:h2:mem:write_ds_1;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
- username: sa
- password:
- maxTotal: 100
- read_ds_0:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: org.h2.Driver
- jdbcUrl: jdbc:h2:mem:read_ds_0;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
- username: sa
- password:
- maxTotal: 100
- read_ds_1:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: org.h2.Driver
- jdbcUrl: jdbc:h2:mem:read_ds_1;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
- username: sa
- password:
- maxTotal: 100
-
-rules:
-- !SHARDING
- tables:
- config:
- actualDataNodes: readwrite_ds_${0..1}.t_config
- t_order:
- actualDataNodes: readwrite_ds_${0..1}.t_order_${0..1}
- databaseStrategy:
- standard:
- shardingColumn: user_id
- shardingAlgorithmName: standard_sharding_fixture
- tableStrategy:
- standard:
- shardingColumn: order_id
- shardingAlgorithmName: t_order_inline
- keyGenerateStrategy:
- column: order_id
- keyGeneratorName: keygen_fixture
- t_order_item:
- actualDataNodes: readwrite_ds_${0..1}.t_order_item_${0..1}
- databaseStrategy:
- standard:
- shardingColumn: user_id
- shardingAlgorithmName: standard_sharding_fixture
- tableStrategy:
- standard:
- shardingColumn: order_id
- shardingAlgorithmName: t_order_item_inline
- bindingTables:
- - t_order,t_order_item
- defaultDatabaseStrategy:
- none:
- defaultTableStrategy:
- complex:
- shardingColumns: id, order_id
- shardingAlgorithmName: complex_sharding_fixture
-
- shardingAlgorithms:
- standard_sharding_fixture:
- type: DRIVER.STANDARD.FIXTURE
- complex_sharding_fixture:
- type: DRIVER.COMPLEX.FIXTURE
- database_inline:
- type: INLINE
- props:
- algorithm-expression: ds_${order_id % 2}
- table_inline:
- type: INLINE
- props:
- algorithm-expression: t_order_${order_id % 2}
- t_order_inline:
- type: INLINE
- props:
- algorithm-expression: t_order_${order_id % 2}
- t_order_item_inline:
- type: INLINE
- props:
- algorithm-expression: t_order_item_${order_id % 2}
-
- keyGenerators:
- keygen_fixture:
- type: DRIVER.FIXTURE
-
-- !READWRITE_SPLITTING
- dataSources:
- readwrite_ds_0:
- staticStrategy:
- writeDataSourceName: write_ds_0
- readDataSourceNames:
- - read_ds_0
- loadBalancerName: roundRobin
- readwrite_ds_1:
- staticStrategy:
- writeDataSourceName: write_ds_1
- readDataSourceNames:
- - read_ds_1
- loadBalancerName: roundRobin
- loadBalancers:
- roundRobin:
- type: ROUND_ROBIN
-
-mode:
- type: Cluster
- repository:
- type: GOV_TEST
- props:
- namespace: test_sharding_ms_registry_name
- server-lists: localhost:3181
- retryIntervalMilliseconds: 10
- timeToLiveSeconds: 10
- maxRetries: 10
- operationTimeoutMilliseconds: 10
diff --git a/test/e2e/driver/src/test/resources/yaml/integrate/sharding_readwrite_splitting/configWithDataSourceWithoutRules.yaml b/test/e2e/driver/src/test/resources/yaml/integrate/sharding_readwrite_splitting/configWithDataSourceWithoutRules.yaml
deleted file mode 100644
index 8848aaedd33..00000000000
--- a/test/e2e/driver/src/test/resources/yaml/integrate/sharding_readwrite_splitting/configWithDataSourceWithoutRules.yaml
+++ /dev/null
@@ -1,58 +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.
-#
-
-dataSources:
- write_ds_0:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: org.h2.Driver
- jdbcUrl: jdbc:h2:mem:write_ds_0;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
- username: sa
- password:
- maxTotal: 100
- write_ds_1:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: org.h2.Driver
- jdbcUrl: jdbc:h2:mem:write_ds_1;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
- username: sa
- password:
- maxTotal: 100
- read_ds_0:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: org.h2.Driver
- jdbcUrl: jdbc:h2:mem:read_ds_0;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
- username: sa
- password:
- maxTotal: 100
- read_ds_1:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: org.h2.Driver
- jdbcUrl: jdbc:h2:mem:read_ds_1;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
- username: sa
- password:
- maxTotal: 100
-
-mode:
- type: Cluster
- repository:
- type: GOV_TEST
- props:
- namespace: test_sharding_ms_registry_name
- server-lists: localhost:3181
- retryIntervalMilliseconds: 10
- timeToLiveSeconds: 10
- maxRetries: 10
- operationTimeoutMilliseconds: 10
diff --git a/test/e2e/driver/src/test/resources/yaml/integrate/sharding_readwrite_splitting/configWithoutDataSourceWithProps.yaml b/test/e2e/driver/src/test/resources/yaml/integrate/sharding_readwrite_splitting/configWithoutDataSourceWithProps.yaml
deleted file mode 100644
index 8b6a2bdecf7..00000000000
--- a/test/e2e/driver/src/test/resources/yaml/integrate/sharding_readwrite_splitting/configWithoutDataSourceWithProps.yaml
+++ /dev/null
@@ -1,101 +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.
-#
-
-mode:
- type: Cluster
- repository:
- type: GOV_TEST
- props:
- namespace: test_sharding_ms_registry_name
- server-lists: localhost:3181
- retryIntervalMilliseconds: 10
- timeToLiveSeconds: 10
- maxRetries: 10
- operationTimeoutMilliseconds: 10
-
-rules:
-- !SHARDING
- tables:
- config:
- actualDataNodes: readwrite_ds_${0..1}.t_config
- t_order:
- actualDataNodes: readwrite_ds_${0..1}.t_order_${0..1}
- databaseStrategy:
- standard:
- shardingColumn: user_id
- shardingAlgorithmName: standard_sharding_fixture
- tableStrategy:
- standard:
- shardingColumn: order_id
- shardingAlgorithmName: t_order_inline
- keyGenerateStrategy:
- column: order_id
- keyGeneratorName: keygen_fixture
- t_order_item:
- actualDataNodes: readwrite_ds_${0..1}.t_order_item_${0..1}
- databaseStrategy:
- standard:
- shardingColumn: user_id
- shardingAlgorithmName: standard_sharding_fixture
- tableStrategy:
- standard:
- shardingColumn: order_id
- shardingAlgorithmName: t_order_item_inline
- bindingTables:
- - t_order,t_order_item
- defaultDatabaseStrategy:
- none:
- defaultTableStrategy:
- complex:
- shardingColumns: id, order_id
- shardingAlgorithmName: complex_sharding_fixture
-
- shardingAlgorithms:
- standard_sharding_fixture:
- type: DRIVER.STANDARD.FIXTURE
- complex_sharding_fixture:
- type: DRIVER.COMPLEX.FIXTURE
- t_order_inline:
- type: INLINE
- props:
- algorithm-expression: t_order_${order_id % 2}
- t_order_item_inline:
- type: INLINE
- props:
- algorithm-expression: t_order_item_${order_id % 2}
-
- keyGenerators:
- keygen_fixture:
- type: DRIVER.FIXTURE
-
-- !READWRITE_SPLITTING
- dataSources:
- readwrite_ds_0:
- staticStrategy:
- writeDataSourceName: write_ds_0
- readDataSourceNames:
- - read_ds_0
- loadBalancerName: roundRobin
- readwrite_ds_1:
- staticStrategy:
- writeDataSourceName: write_ds_1
- readDataSourceNames:
- - read_ds_1
- loadBalancers:
- roundRobin:
- type: ROUND_ROBIN
-
diff --git a/test/e2e/driver/src/test/resources/yaml/integrate/sharding_readwrite_splitting/configWithoutDataSourceWithoutProps.yaml b/test/e2e/driver/src/test/resources/yaml/integrate/sharding_readwrite_splitting/configWithoutDataSourceWithoutProps.yaml
deleted file mode 100644
index 22760c9f3f2..00000000000
--- a/test/e2e/driver/src/test/resources/yaml/integrate/sharding_readwrite_splitting/configWithoutDataSourceWithoutProps.yaml
+++ /dev/null
@@ -1,100 +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.
-#
-
-mode:
- type: Cluster
- repository:
- type: GOV_TEST
- props:
- namespace: test_sharding_ms_registry_name
- server-lists: localhost:3181
- retryIntervalMilliseconds: 10
- timeToLiveSeconds: 10
- maxRetries: 10
- operationTimeoutMilliseconds: 10
-
-rules:
-- !SHARDING
- tables:
- config:
- actualDataNodes: readwrite_ds_${0..1}.t_config
- t_order:
- actualDataNodes: readwrite_ds_${0..1}.t_order_${0..1}
- databaseStrategy:
- standard:
- shardingColumn: user_id
- shardingAlgorithmName: standard_sharding_fixture
- tableStrategy:
- standard:
- shardingColumn: order_id
- shardingAlgorithmName: t_order_inline
- keyGenerateStrategy:
- column: order_id
- keyGeneratorName: keygen_fixture
- t_order_item:
- actualDataNodes: readwrite_ds_${0..1}.t_order_item_${0..1}
- databaseStrategy:
- standard:
- shardingColumn: user_id
- shardingAlgorithmName: standard_sharding_fixture
- tableStrategy:
- standard:
- shardingColumn: order_id
- shardingAlgorithmName: t_order_item_inline
- bindingTables:
- - t_order,t_order_item
- defaultDatabaseStrategy:
- none:
- defaultTableStrategy:
- complex:
- shardingColumns: id, order_id
- shardingAlgorithmName: complex_sharding_fixture
-
- shardingAlgorithms:
- standard_sharding_fixture:
- type: DRIVER.STANDARD.FIXTURE
- complex_sharding_fixture:
- type: DRIVER.COMPLEX.FIXTURE
- t_order_inline:
- type: INLINE
- props:
- algorithm-expression: t_order_${order_id % 2}
- t_order_item_inline:
- type: INLINE
- props:
- algorithm-expression: t_order_item_${order_id % 2}
-
- keyGenerators:
- keygen_fixture:
- type: DRIVER.FIXTURE
-
-- !READWRITE_SPLITTING
- dataSources:
- readwrite_ds_0:
- staticStrategy:
- writeDataSourceName: write_ds_0
- readDataSourceNames:
- - read_ds_0
- loadBalancerName: roundRobin
- readwrite_ds_1:
- staticStrategy:
- writeDataSourceName: write_ds_1
- readDataSourceNames:
- - read_ds_1
- loadBalancers:
- roundRobin:
- type: ROUND_ROBIN
diff --git a/test/e2e/driver/src/test/resources/yaml/schema/readwrite_splitting/read_ds_0.sql b/test/e2e/driver/src/test/resources/yaml/schema/readwrite_splitting/read_ds_0.sql
deleted file mode 100644
index 890b758eded..00000000000
--- a/test/e2e/driver/src/test/resources/yaml/schema/readwrite_splitting/read_ds_0.sql
+++ /dev/null
@@ -1,25 +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.
- */
-
-DROP SCHEMA IF EXISTS `read_ds_0`;
-CREATE SCHEMA `read_ds_0`;
-DROP TABLE IF EXISTS `t_order`;
-DROP TABLE IF EXISTS `t_order_item`;
-DROP TABLE IF EXISTS `t_config`;
-CREATE TABLE `t_order` (`order_id` INT NOT NULL, `user_id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`order_id`));
-CREATE TABLE `t_order_item` (`order_item_id` INT NOT NULL, `order_id` INT NOT NULL, `user_id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`order_item_id`));
-CREATE TABLE `t_config` (`id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`id`));
diff --git a/test/e2e/driver/src/test/resources/yaml/schema/readwrite_splitting/read_ds_1.sql b/test/e2e/driver/src/test/resources/yaml/schema/readwrite_splitting/read_ds_1.sql
deleted file mode 100644
index 413f8f331fb..00000000000
--- a/test/e2e/driver/src/test/resources/yaml/schema/readwrite_splitting/read_ds_1.sql
+++ /dev/null
@@ -1,25 +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.
- */
-
-DROP SCHEMA IF EXISTS `read_ds_1`;
-CREATE SCHEMA `read_ds_1`;
-DROP TABLE IF EXISTS `t_order`;
-DROP TABLE IF EXISTS `t_order_item`;
-DROP TABLE IF EXISTS `t_config`;
-CREATE TABLE `t_order` (`order_id` INT NOT NULL, `user_id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`order_id`));
-CREATE TABLE `t_order_item` (`order_item_id` INT NOT NULL, `order_id` INT NOT NULL, `user_id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`order_item_id`));
-CREATE TABLE `t_config` (`id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`id`));
diff --git a/test/e2e/driver/src/test/resources/yaml/schema/readwrite_splitting/write_ds.sql b/test/e2e/driver/src/test/resources/yaml/schema/readwrite_splitting/write_ds.sql
deleted file mode 100644
index 2d5405be023..00000000000
--- a/test/e2e/driver/src/test/resources/yaml/schema/readwrite_splitting/write_ds.sql
+++ /dev/null
@@ -1,25 +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.
- */
-
-DROP SCHEMA IF EXISTS `write_ds`;
-CREATE SCHEMA `write_ds`;
-DROP TABLE IF EXISTS `t_order`;
-DROP TABLE IF EXISTS `t_order_item`;
-DROP TABLE IF EXISTS `t_config`;
-CREATE TABLE `t_order` (`order_id` INT NOT NULL, `user_id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`order_id`));
-CREATE TABLE `t_order_item` (`order_item_id` INT NOT NULL, `order_id` INT NOT NULL, `user_id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`order_item_id`));
-CREATE TABLE `t_config` (`id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`id`));
diff --git a/test/e2e/driver/src/test/resources/yaml/schema/sharding/db0.sql b/test/e2e/driver/src/test/resources/yaml/schema/sharding/db0.sql
deleted file mode 100644
index 8f3bd3b0a71..00000000000
--- a/test/e2e/driver/src/test/resources/yaml/schema/sharding/db0.sql
+++ /dev/null
@@ -1,29 +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.
- */
-
-DROP SCHEMA IF EXISTS `db0`;
-CREATE SCHEMA `db0`;
-DROP TABLE IF EXISTS `t_order_0`;
-DROP TABLE IF EXISTS `t_order_1`;
-DROP TABLE IF EXISTS `t_order_item_0`;
-DROP TABLE IF EXISTS `t_order_item_1`;
-DROP TABLE IF EXISTS `t_config`;
-CREATE TABLE `t_order_0` (`order_id` INT NOT NULL, `user_id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`order_id`));
-CREATE TABLE `t_order_1` (`order_id` INT NOT NULL, `user_id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`order_id`));
-CREATE TABLE `t_order_item_0` (`order_item_id` INT NOT NULL, `order_id` INT NOT NULL, `user_id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`order_item_id`));
-CREATE TABLE `t_order_item_1` (`order_item_id` INT NOT NULL, `order_id` INT NOT NULL, `user_id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`order_item_id`));
-CREATE TABLE `t_config` (`id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`id`));
diff --git a/test/e2e/driver/src/test/resources/yaml/schema/sharding/db1.sql b/test/e2e/driver/src/test/resources/yaml/schema/sharding/db1.sql
deleted file mode 100644
index 347a02b9a36..00000000000
--- a/test/e2e/driver/src/test/resources/yaml/schema/sharding/db1.sql
+++ /dev/null
@@ -1,29 +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.
- */
-
-DROP SCHEMA IF EXISTS `db1`;
-CREATE SCHEMA `db1`;
-DROP TABLE IF EXISTS `t_order_0`;
-DROP TABLE IF EXISTS `t_order_1`;
-DROP TABLE IF EXISTS `t_order_item_0`;
-DROP TABLE IF EXISTS `t_order_item_1`;
-DROP TABLE IF EXISTS `t_config`;
-CREATE TABLE `t_order_0` (`order_id` INT NOT NULL, `user_id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`order_id`));
-CREATE TABLE `t_order_1` (`order_id` INT NOT NULL, `user_id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`order_id`));
-CREATE TABLE `t_order_item_0` (`order_item_id` INT NOT NULL, `order_id` INT NOT NULL, `user_id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`order_item_id`));
-CREATE TABLE `t_order_item_1` (`order_item_id` INT NOT NULL, `order_id` INT NOT NULL, `user_id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`order_item_id`));
-CREATE TABLE `t_config` (`id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`id`));
diff --git a/test/e2e/driver/src/test/resources/yaml/schema/sharding_readwrite_splitting/read_ds_0.sql b/test/e2e/driver/src/test/resources/yaml/schema/sharding_readwrite_splitting/read_ds_0.sql
deleted file mode 100644
index 6f410e2e7f6..00000000000
--- a/test/e2e/driver/src/test/resources/yaml/schema/sharding_readwrite_splitting/read_ds_0.sql
+++ /dev/null
@@ -1,29 +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.
- */
-
-DROP SCHEMA IF EXISTS `read_ds_0`;
-CREATE SCHEMA `read_ds_0`;
-DROP TABLE IF EXISTS `t_order_0`;
-DROP TABLE IF EXISTS `t_order_1`;
-DROP TABLE IF EXISTS `t_order_item_0`;
-DROP TABLE IF EXISTS `t_order_item_1`;
-DROP TABLE IF EXISTS `t_config`;
-CREATE TABLE `t_order_0` (`order_id` INT NOT NULL, `user_id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`order_id`));
-CREATE TABLE `t_order_1` (`order_id` INT NOT NULL, `user_id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`order_id`));
-CREATE TABLE `t_order_item_0` (`order_item_id` INT NOT NULL, `order_id` INT NOT NULL, `user_id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`order_item_id`));
-CREATE TABLE `t_order_item_1` (`order_item_id` INT NOT NULL, `order_id` INT NOT NULL, `user_id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`order_item_id`));
-CREATE TABLE `t_config` (`id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`id`));
diff --git a/test/e2e/driver/src/test/resources/yaml/schema/sharding_readwrite_splitting/read_ds_1.sql b/test/e2e/driver/src/test/resources/yaml/schema/sharding_readwrite_splitting/read_ds_1.sql
deleted file mode 100644
index 5b47f506150..00000000000
--- a/test/e2e/driver/src/test/resources/yaml/schema/sharding_readwrite_splitting/read_ds_1.sql
+++ /dev/null
@@ -1,29 +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.
- */
-
-DROP SCHEMA IF EXISTS `read_ds_1`;
-CREATE SCHEMA `read_ds_1`;
-DROP TABLE IF EXISTS `t_order_0`;
-DROP TABLE IF EXISTS `t_order_1`;
-DROP TABLE IF EXISTS `t_order_item_0`;
-DROP TABLE IF EXISTS `t_order_item_1`;
-DROP TABLE IF EXISTS `t_config`;
-CREATE TABLE `t_order_0` (`order_id` INT NOT NULL, `user_id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`order_id`));
-CREATE TABLE `t_order_1` (`order_id` INT NOT NULL, `user_id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`order_id`));
-CREATE TABLE `t_order_item_0` (`order_item_id` INT NOT NULL, `order_id` INT NOT NULL, `user_id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`order_item_id`));
-CREATE TABLE `t_order_item_1` (`order_item_id` INT NOT NULL, `order_id` INT NOT NULL, `user_id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`order_item_id`));
-CREATE TABLE `t_config` (`id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`id`));
diff --git a/test/e2e/driver/src/test/resources/yaml/schema/sharding_readwrite_splitting/write_ds_0.sql b/test/e2e/driver/src/test/resources/yaml/schema/sharding_readwrite_splitting/write_ds_0.sql
deleted file mode 100644
index 80ad5bef076..00000000000
--- a/test/e2e/driver/src/test/resources/yaml/schema/sharding_readwrite_splitting/write_ds_0.sql
+++ /dev/null
@@ -1,29 +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.
- */
-
-DROP SCHEMA IF EXISTS `write_ds_0`;
-CREATE SCHEMA `write_ds_0`;
-DROP TABLE IF EXISTS `t_order_0`;
-DROP TABLE IF EXISTS `t_order_1`;
-DROP TABLE IF EXISTS `t_order_item_0`;
-DROP TABLE IF EXISTS `t_order_item_1`;
-DROP TABLE IF EXISTS `t_config`;
-CREATE TABLE `t_order_0` (`order_id` INT NOT NULL, `user_id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`order_id`));
-CREATE TABLE `t_order_1` (`order_id` INT NOT NULL, `user_id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`order_id`));
-CREATE TABLE `t_order_item_0` (`order_item_id` INT NOT NULL, `order_id` INT NOT NULL, `user_id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`order_item_id`));
-CREATE TABLE `t_order_item_1` (`order_item_id` INT NOT NULL, `order_id` INT NOT NULL, `user_id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`order_item_id`));
-CREATE TABLE `t_config` (`id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`id`));
diff --git a/test/e2e/driver/src/test/resources/yaml/schema/sharding_readwrite_splitting/write_ds_1.sql b/test/e2e/driver/src/test/resources/yaml/schema/sharding_readwrite_splitting/write_ds_1.sql
deleted file mode 100644
index b7a7419fb13..00000000000
--- a/test/e2e/driver/src/test/resources/yaml/schema/sharding_readwrite_splitting/write_ds_1.sql
+++ /dev/null
@@ -1,29 +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.
- */
-
-DROP SCHEMA IF EXISTS `write_ds_1`;
-CREATE SCHEMA `write_ds_1`;
-DROP TABLE IF EXISTS `t_order_0`;
-DROP TABLE IF EXISTS `t_order_1`;
-DROP TABLE IF EXISTS `t_order_item_0`;
-DROP TABLE IF EXISTS `t_order_item_1`;
-DROP TABLE IF EXISTS `t_config`;
-CREATE TABLE `t_order_0` (`order_id` INT NOT NULL, `user_id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`order_id`));
-CREATE TABLE `t_order_1` (`order_id` INT NOT NULL, `user_id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`order_id`));
-CREATE TABLE `t_order_item_0` (`order_item_id` INT NOT NULL, `order_id` INT NOT NULL, `user_id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`order_item_id`));
-CREATE TABLE `t_order_item_1` (`order_item_id` INT NOT NULL, `order_id` INT NOT NULL, `user_id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`order_item_id`));
-CREATE TABLE `t_config` (`id` INT NOT NULL, `status` VARCHAR(45) NULL, PRIMARY KEY (`id`));
diff --git a/test/e2e/driver/src/test/resources/yaml/unit/sharding.yaml b/test/e2e/driver/src/test/resources/yaml/unit/sharding.yaml
deleted file mode 100644
index 10c53988b2d..00000000000
--- a/test/e2e/driver/src/test/resources/yaml/unit/sharding.yaml
+++ /dev/null
@@ -1,104 +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.
-#
-
-mode:
- type: Cluster
- repository:
- type: GOV_TEST
- props:
- namespace: test_name
- server-lists: localhost:3181
-
-dataSources:
- write_ds:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: org.h2.Driver
- jdbcUrl: jdbc:h2:mem:write_ds;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
- username: sa
- password:
- read_ds:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: org.h2.Driver
- jdbcUrl: jdbc:h2:mem:read_ds;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
- username: sa
- password:
-
-rules:
-- !SHARDING
- tables:
- t_order:
- actualDataNodes: readwrite_ds.t_order_${0..1}
- databaseStrategy:
- standard:
- shardingColumn: user_id
- shardingAlgorithmName: t_order_database_inline
- tableStrategy:
- standard:
- shardingColumn: order_id
- shardingAlgorithmName: t_order_inline
- keyGenerateStrategy:
- column: order_id
- keyGeneratorName: snowflake
- t_order_item:
- actualDataNodes: readwrite_ds.t_order_item_${0..1}
- tableStrategy:
- standard:
- shardingColumn: order_id
- shardingAlgorithmName: t_order_item_inline
- keyGenerateStrategy:
- column: order_item_id
- keyGeneratorName: snowflake
- bindingTables:
- - t_order,t_order_item
- defaultDatabaseStrategy:
- standard:
- shardingColumn: user_id
- shardingAlgorithmName: default_database_inline
- defaultTableStrategy:
- none:
-
- shardingAlgorithms:
- default_database_inline:
- type: INLINE
- props:
- algorithm-expression: readwrite_ds_${user_id % 2}
- t_order_database_inline:
- type: INLINE
- props:
- algorithm-expression: t_order_${user_id % 2}
- t_order_inline:
- type: INLINE
- props:
- algorithm-expression: t_order_${order_id % 2}
- t_order_item_inline:
- type: INLINE
- props:
- algorithm-expression: t_order_item_${order_id % 2}
-
- keyGenerators:
- snowflake:
- type: SNOWFLAKE
-
-- !READWRITE_SPLITTING
- dataSources:
- readwrite_ds:
- staticStrategy:
- writeDataSourceName: write_ds
- readDataSourceNames:
- - read_ds
-props:
- sql-show: false