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 2020/12/29 11:36:30 UTC
[shardingsphere] branch master updated: Remove useless cases of IT
(#8806)
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 4ffb781 Remove useless cases of IT (#8806)
4ffb781 is described below
commit 4ffb781a693b028ff41b5f8bd7d90f8489672e34
Author: Liang Zhang <te...@163.com>
AuthorDate: Tue Dec 29 19:36:00 2020 +0800
Remove useless cases of IT (#8806)
* Remove useless exception
* Refactor BaseDDLIT
* Remove useless table for db IT
* Remove useless test cases for DDL
* Remove useless test cases for DML
* Remove useless table for IT
* Remove useless cases
* Refactor EnvironmentPath
* Rename DataSourceBuilder
* Fix test cases
---
.../test/integration/engine/BaseIT.java | 4 +-
.../test/integration/engine/ddl/BaseDDLIT.java | 7 +-
.../test/integration/engine/ddl/GeneralDDLIT.java | 6 +-
.../integration/engine/dql/AdditionalDQLIT.java | 26 +++--
.../test/integration/engine/dql/BaseDQLIT.java | 4 +-
.../test/integration/env/EnvironmentPath.java | 10 +-
...{DataSourceUtil.java => DataSourceBuilder.java} | 72 +++++++------
.../integration/env/schema/SchemaEnvironment.java | 10 +-
.../env/schema/SchemaEnvironmentManager.java | 39 ++++---
.../cases/ddl/dataset/create_temporary_table.xml | 23 ----
.../integrate/cases/ddl/dataset/empty_temp_log.xml | 23 ----
.../cases/ddl/ddl-integrate-test-cases.xml | 119 ++++++---------------
.../cases/dml/dml-integrate-test-cases.xml | 29 +----
.../cases/dql/dql-integrate-test-cases.xml | 15 ---
.../test/resources/integrate/env/db/dataset.xml | 14 ---
.../src/test/resources/integrate/env/db/schema.xml | 2 -
.../env/dbtbl_with_replica_query/dataset.xml | 24 -----
.../env/dbtbl_with_replica_query/schema.xml | 2 -
.../integrate/env/replica_query/dataset.xml | 7 --
.../integrate/env/replica_query/schema.xml | 2 -
.../test/resources/integrate/env/shadow/schema.xml | 2 -
.../test/resources/integrate/env/tbl/dataset.xml | 5 -
.../test/resources/integrate/env/tbl/schema.xml | 2 -
23 files changed, 120 insertions(+), 327 deletions(-)
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/BaseIT.java b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/BaseIT.java
index 2801397..aa9fd20 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/BaseIT.java
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/BaseIT.java
@@ -25,7 +25,7 @@ import org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataS
import org.apache.shardingsphere.infra.database.type.DatabaseType;
import org.apache.shardingsphere.test.integration.env.EnvironmentPath;
import org.apache.shardingsphere.test.integration.env.IntegrateTestEnvironment;
-import org.apache.shardingsphere.test.integration.env.datasource.DataSourceUtil;
+import org.apache.shardingsphere.test.integration.env.datasource.DataSourceBuilder;
import org.apache.shardingsphere.test.integration.env.datasource.ProxyDataSourceUtil;
import org.apache.shardingsphere.test.integration.env.schema.SchemaEnvironmentManager;
import org.junit.After;
@@ -77,7 +77,7 @@ public abstract class BaseIT {
Collection<String> dataSourceNames = SchemaEnvironmentManager.getDataSourceNames(ruleType);
Map<String, DataSource> result = new HashMap<>(dataSourceNames.size(), 1);
for (String each : dataSourceNames) {
- result.put(each, DataSourceUtil.createDataSource(databaseType, each));
+ result.put(each, DataSourceBuilder.build(each, databaseType));
}
return result;
}
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/ddl/BaseDDLIT.java b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/ddl/BaseDDLIT.java
index 94b794d..ba6cb95 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/ddl/BaseDDLIT.java
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/ddl/BaseDDLIT.java
@@ -51,12 +51,9 @@ import static org.junit.Assert.assertTrue;
@Slf4j
public abstract class BaseDDLIT extends SingleIT {
- private final DatabaseType databaseType;
-
protected BaseDDLIT(final String parentPath, final DDLIntegrateTestCaseAssertion assertion, final String ruleType,
final DatabaseType databaseType, final SQLCaseType caseType, final String sql) throws IOException, JAXBException, SQLException, ParseException {
super(parentPath, assertion, ruleType, databaseType, caseType, sql);
- this.databaseType = databaseType;
}
@BeforeClass
@@ -128,9 +125,9 @@ public abstract class BaseDDLIT extends SingleIT {
private void assertColumnMetaData(final List<DataSetColumn> actual, final DataSetColumn expect) {
for (DataSetColumn each : actual) {
if (expect.getName().equals(each.getName())) {
- if ("MySQL".equals(databaseType.getName()) && "integer".equals(expect.getType())) {
+ if ("MySQL".equals(getDatabaseType().getName()) && "integer".equals(expect.getType())) {
assertThat(each.getType(), is("int"));
- } else if ("PostgreSQL".equals(databaseType.getName()) && "integer".equals(expect.getType())) {
+ } else if ("PostgreSQL".equals(getDatabaseType().getName()) && "integer".equals(expect.getType())) {
assertThat(each.getType(), is("int4"));
} else {
assertThat(each.getType(), is(expect.getType()));
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/ddl/GeneralDDLIT.java b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/ddl/GeneralDDLIT.java
index 700e37e..e6d74e7 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/ddl/GeneralDDLIT.java
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/ddl/GeneralDDLIT.java
@@ -48,15 +48,15 @@ public final class GeneralDDLIT extends BaseDDLIT {
@Test
public void assertExecuteUpdate() throws SQLException {
- assertExecuteByType(true);
+ assertExecute(true);
}
@Test
public void assertExecute() throws SQLException {
- assertExecuteByType(false);
+ assertExecute(false);
}
- private void assertExecuteByType(final boolean isExecuteUpdate) throws SQLException {
+ private void assertExecute(final boolean isExecuteUpdate) throws SQLException {
try (Connection connection = getDataSource().getConnection()) {
dropTableIfExisted(connection);
if (!Strings.isNullOrEmpty(((DDLIntegrateTestCaseAssertion) getAssertion()).getInitSQL())) {
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/dql/AdditionalDQLIT.java b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/dql/AdditionalDQLIT.java
index 54442ed..f5b3185 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/dql/AdditionalDQLIT.java
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/dql/AdditionalDQLIT.java
@@ -56,7 +56,7 @@ public final class AdditionalDQLIT extends BaseDQLIT {
}
@Test
- public void assertExecuteQueryWithResultSetTypeAndResultSetConcurrency() throws JAXBException, IOException, SQLException, ParseException {
+ public void assertExecuteQueryWithResultSetTypeAndResultSetConcurrency() throws SQLException, ParseException {
try (Connection connection = getDataSource().getConnection()) {
if (SQLCaseType.Literal == getCaseType()) {
assertExecuteQueryForStatementWithResultSetTypeAndResultSetConcurrency(connection);
@@ -66,7 +66,7 @@ public final class AdditionalDQLIT extends BaseDQLIT {
}
}
- private void assertExecuteQueryForStatementWithResultSetTypeAndResultSetConcurrency(final Connection connection) throws SQLException, JAXBException, IOException, ParseException {
+ private void assertExecuteQueryForStatementWithResultSetTypeAndResultSetConcurrency(final Connection connection) throws SQLException, ParseException {
try (
Statement statement = connection.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
ResultSet resultSet = statement.executeQuery(String.format(getSql(), assertion.getSQLValues().toArray()))) {
@@ -74,7 +74,7 @@ public final class AdditionalDQLIT extends BaseDQLIT {
}
}
- private void assertExecuteQueryForPreparedStatementWithResultSetTypeAndResultSetConcurrency(final Connection connection) throws SQLException, ParseException, JAXBException, IOException {
+ private void assertExecuteQueryForPreparedStatementWithResultSetTypeAndResultSetConcurrency(final Connection connection) throws SQLException, ParseException {
try (PreparedStatement preparedStatement = connection.prepareStatement(getSql(), ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY)) {
for (SQLValue each : assertion.getSQLValues()) {
preparedStatement.setObject(each.getIndex(), each.getValue());
@@ -86,7 +86,7 @@ public final class AdditionalDQLIT extends BaseDQLIT {
}
@Test
- public void assertExecuteQueryWithResultSetTypeAndResultSetConcurrencyAndResultSetHoldability() throws JAXBException, IOException, SQLException, ParseException {
+ public void assertExecuteQueryWithResultSetTypeAndResultSetConcurrencyAndResultSetHoldability() throws SQLException, ParseException {
try (Connection connection = getDataSource().getConnection()) {
if (SQLCaseType.Literal == getCaseType()) {
assertExecuteQueryForStatementWithResultSetTypeAndResultSetConcurrencyAndResultSetHoldability(connection);
@@ -97,7 +97,7 @@ public final class AdditionalDQLIT extends BaseDQLIT {
}
private void assertExecuteQueryForStatementWithResultSetTypeAndResultSetConcurrencyAndResultSetHoldability(final Connection connection)
- throws SQLException, JAXBException, IOException, ParseException {
+ throws SQLException, ParseException {
try (
Statement statement = connection.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, ResultSet.HOLD_CURSORS_OVER_COMMIT);
ResultSet resultSet = statement.executeQuery(String.format(getSql(), assertion.getSQLValues().toArray()))) {
@@ -106,7 +106,7 @@ public final class AdditionalDQLIT extends BaseDQLIT {
}
private void assertExecuteQueryForPreparedStatementWithResultSetTypeAndResultSetConcurrencyAndResultSetHoldability(final Connection connection)
- throws SQLException, ParseException, JAXBException, IOException {
+ throws SQLException, ParseException {
try (PreparedStatement preparedStatement = connection.prepareStatement(getSql(), ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, ResultSet.HOLD_CURSORS_OVER_COMMIT)) {
for (SQLValue each : assertion.getSQLValues()) {
preparedStatement.setObject(each.getIndex(), each.getValue());
@@ -118,7 +118,7 @@ public final class AdditionalDQLIT extends BaseDQLIT {
}
@Test
- public void assertExecuteWithResultSetTypeAndResultSetConcurrency() throws JAXBException, IOException, SQLException, ParseException {
+ public void assertExecuteWithResultSetTypeAndResultSetConcurrency() throws SQLException, ParseException {
try (Connection connection = getDataSource().getConnection()) {
if (SQLCaseType.Literal == getCaseType()) {
assertExecuteForStatementWithResultSetTypeAndResultSetConcurrency(connection);
@@ -128,7 +128,7 @@ public final class AdditionalDQLIT extends BaseDQLIT {
}
}
- private void assertExecuteForStatementWithResultSetTypeAndResultSetConcurrency(final Connection connection) throws SQLException, JAXBException, IOException, ParseException {
+ private void assertExecuteForStatementWithResultSetTypeAndResultSetConcurrency(final Connection connection) throws SQLException, ParseException {
try (Statement statement = connection.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY)) {
assertTrue("Not a DQL statement.", statement.execute(String.format(getSql(), assertion.getSQLValues().toArray())));
try (ResultSet resultSet = statement.getResultSet()) {
@@ -137,7 +137,7 @@ public final class AdditionalDQLIT extends BaseDQLIT {
}
}
- private void assertExecuteForPreparedStatementWithResultSetTypeAndResultSetConcurrency(final Connection connection) throws SQLException, ParseException, JAXBException, IOException {
+ private void assertExecuteForPreparedStatementWithResultSetTypeAndResultSetConcurrency(final Connection connection) throws SQLException, ParseException {
try (PreparedStatement preparedStatement = connection.prepareStatement(getSql(), ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY)) {
for (SQLValue each : assertion.getSQLValues()) {
preparedStatement.setObject(each.getIndex(), each.getValue());
@@ -150,7 +150,7 @@ public final class AdditionalDQLIT extends BaseDQLIT {
}
@Test
- public void assertExecuteWithResultSetTypeAndResultSetConcurrencyAndResultSetHoldability() throws JAXBException, IOException, SQLException, ParseException {
+ public void assertExecuteWithResultSetTypeAndResultSetConcurrencyAndResultSetHoldability() throws SQLException, ParseException {
try (Connection connection = getDataSource().getConnection()) {
if (SQLCaseType.Literal == getCaseType()) {
assertExecuteForStatementWithResultSetTypeAndResultSetConcurrencyAndResultSetHoldability(connection);
@@ -160,8 +160,7 @@ public final class AdditionalDQLIT extends BaseDQLIT {
}
}
- private void assertExecuteForStatementWithResultSetTypeAndResultSetConcurrencyAndResultSetHoldability(final Connection connection)
- throws SQLException, JAXBException, IOException, ParseException {
+ private void assertExecuteForStatementWithResultSetTypeAndResultSetConcurrencyAndResultSetHoldability(final Connection connection) throws SQLException, ParseException {
try (Statement statement = connection.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, ResultSet.HOLD_CURSORS_OVER_COMMIT)) {
assertTrue("Not a DQL statement.", statement.execute(String.format(getSql(), assertion.getSQLValues().toArray())));
try (ResultSet resultSet = statement.getResultSet()) {
@@ -170,8 +169,7 @@ public final class AdditionalDQLIT extends BaseDQLIT {
}
}
- private void assertExecuteForPreparedStatementWithResultSetTypeAndResultSetConcurrencyAndResultSetHoldability(final Connection connection)
- throws SQLException, ParseException, JAXBException, IOException {
+ private void assertExecuteForPreparedStatementWithResultSetTypeAndResultSetConcurrencyAndResultSetHoldability(final Connection connection) throws SQLException, ParseException {
try (PreparedStatement preparedStatement = connection.prepareStatement(getSql(), ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, ResultSet.HOLD_CURSORS_OVER_COMMIT)) {
for (SQLValue each : assertion.getSQLValues()) {
preparedStatement.setObject(each.getIndex(), each.getValue());
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/dql/BaseDQLIT.java b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/dql/BaseDQLIT.java
index bbf996040..a269b84 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/dql/BaseDQLIT.java
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/dql/BaseDQLIT.java
@@ -28,7 +28,7 @@ import org.apache.shardingsphere.test.integration.engine.SingleIT;
import org.apache.shardingsphere.test.integration.env.EnvironmentPath;
import org.apache.shardingsphere.test.integration.env.IntegrateTestEnvironment;
import org.apache.shardingsphere.test.integration.env.dataset.DataSetEnvironmentManager;
-import org.apache.shardingsphere.test.integration.env.datasource.DataSourceUtil;
+import org.apache.shardingsphere.test.integration.env.datasource.DataSourceBuilder;
import org.apache.shardingsphere.test.integration.env.schema.SchemaEnvironmentManager;
import org.junit.AfterClass;
import org.junit.BeforeClass;
@@ -83,7 +83,7 @@ public abstract class BaseDQLIT extends SingleIT {
Collection<String> dataSourceNames = SchemaEnvironmentManager.getDataSourceNames(ruleType);
Map<String, DataSource> result = new HashMap<>(dataSourceNames.size(), 1);
for (String each : dataSourceNames) {
- result.put(each, DataSourceUtil.createDataSource(databaseType, each));
+ result.put(each, DataSourceBuilder.build(each, databaseType));
}
return result;
}
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/env/EnvironmentPath.java b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/env/EnvironmentPath.java
index a402ae4..7e11441 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/env/EnvironmentPath.java
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/env/EnvironmentPath.java
@@ -30,7 +30,7 @@ import static org.junit.Assert.assertNotNull;
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class EnvironmentPath {
- private static final String DATABASE_ENVIRONMENT_RESOURCES_PATH = "integrate/env/%s/schema.xml";
+ private static final String SCHEMA_ENVIRONMENT_FILE = "integrate/env/%s/schema.xml";
private static final String DATA_INITIALIZE_RESOURCES_PATH = "integrate/env/%s/dataset.xml";
@@ -39,13 +39,13 @@ public final class EnvironmentPath {
private static final String AUTHORITY_RESOURCES_PATH = "integrate/env/%s/authority.xml";
/**
- * Get database environment resource file.
+ * Get schema environment file.
*
* @param ruleType rule type
- * @return database environment resource file
+ * @return schema environment file
*/
- public static String getDatabaseEnvironmentResourceFile(final String ruleType) {
- return getResourceFile(DATABASE_ENVIRONMENT_RESOURCES_PATH, ruleType);
+ public static String getSchemaEnvironmentFile(final String ruleType) {
+ return getResourceFile(SCHEMA_ENVIRONMENT_FILE, ruleType);
}
/**
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/env/datasource/DataSourceUtil.java b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/env/datasource/DataSourceBuilder.java
similarity index 64%
rename from shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/env/datasource/DataSourceUtil.java
rename to shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/env/datasource/DataSourceBuilder.java
index af79f34..5004361 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/env/datasource/DataSourceUtil.java
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/env/datasource/DataSourceBuilder.java
@@ -24,92 +24,94 @@ import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.RequiredArgsConstructor;
import org.apache.commons.dbcp2.BasicDataSource;
-import org.apache.shardingsphere.test.integration.env.IntegrateTestEnvironment;
import org.apache.shardingsphere.infra.database.type.DatabaseType;
+import org.apache.shardingsphere.test.integration.env.IntegrateTestEnvironment;
import javax.sql.DataSource;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
+import java.util.Optional;
/**
- * Data source utility.
+ * Data source builder.
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
-public final class DataSourceUtil {
+public final class DataSourceBuilder {
private static final DataSourcePoolType DATA_SOURCE_POOL_TYPE = DataSourcePoolType.HikariCP;
private static final Map<DataSourceCacheKey, DataSource> CACHE = new HashMap<>();
/**
- * Create data source.
+ * Build data source.
*
+ * @param name data source name
* @param databaseType database type
- * @param dataSourceName data source name
* @return data source
*/
- public static DataSource createDataSource(final DatabaseType databaseType, final String dataSourceName) {
- DataSourceCacheKey dataSourceCacheKey = new DataSourceCacheKey(databaseType, dataSourceName);
- if (CACHE.containsKey(dataSourceCacheKey)) {
- return CACHE.get(dataSourceCacheKey);
+ public static DataSource build(final String name, final DatabaseType databaseType) {
+ DataSourceCacheKey cacheKey = new DataSourceCacheKey(name, databaseType);
+ if (CACHE.containsKey(cacheKey)) {
+ return CACHE.get(cacheKey);
}
- DataSource result;
+ DataSource result = createDataSource(name, databaseType);
+ CACHE.put(cacheKey, result);
+ return result;
+ }
+
+ private static DataSource createDataSource(final String name, final DatabaseType databaseType) {
+ DatabaseEnvironment databaseEnvironment = IntegrateTestEnvironment.getInstance().getDatabaseEnvironments().get(databaseType);
switch (DATA_SOURCE_POOL_TYPE) {
case DBCP:
- result = createDBCP(databaseType, dataSourceName);
- break;
+ return createDBCP(name, databaseType, databaseEnvironment);
case HikariCP:
- result = createHikariCP(databaseType, dataSourceName);
- break;
+ return createHikariCP(name, databaseType, databaseEnvironment);
default:
throw new UnsupportedOperationException(DATA_SOURCE_POOL_TYPE.name());
}
- CACHE.put(dataSourceCacheKey, result);
- return result;
}
-
- private static DataSource createDBCP(final DatabaseType databaseType, final String dataSourceName) {
+
+ private static DataSource createDBCP(final String dataSourceName, final DatabaseType databaseType, final DatabaseEnvironment databaseEnvironment) {
BasicDataSource result = new BasicDataSource();
- DatabaseEnvironment databaseEnvironment = IntegrateTestEnvironment.getInstance().getDatabaseEnvironments().get(databaseType);
result.setDriverClassName(databaseEnvironment.getDriverClassName());
result.setUrl(null == dataSourceName ? databaseEnvironment.getURL() : databaseEnvironment.getURL(dataSourceName));
result.setUsername(databaseEnvironment.getUsername());
result.setPassword(databaseEnvironment.getPassword());
result.setMaxTotal(2);
- if ("Oracle".equals(databaseType.getName())) {
- result.setConnectionInitSqls(Collections.singleton("ALTER SESSION SET CURRENT_SCHEMA = " + dataSourceName));
- }
- if ("MySQL".equals(databaseType.getName())) {
- result.setConnectionInitSqls(Collections.singleton("SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''))"));
- }
+ getConnectionInitSQL(dataSourceName, databaseType).ifPresent(optional -> result.setConnectionInitSqls(Collections.singleton(optional)));
return result;
}
- private static DataSource createHikariCP(final DatabaseType databaseType, final String dataSourceName) {
+ private static DataSource createHikariCP(final String dataSourceName, final DatabaseType databaseType, final DatabaseEnvironment databaseEnvironment) {
HikariConfig result = new HikariConfig();
- DatabaseEnvironment databaseEnvironment = IntegrateTestEnvironment.getInstance().getDatabaseEnvironments().get(databaseType);
result.setDriverClassName(databaseEnvironment.getDriverClassName());
result.setJdbcUrl(null == dataSourceName ? databaseEnvironment.getURL() : databaseEnvironment.getURL(dataSourceName));
result.setUsername(databaseEnvironment.getUsername());
result.setPassword(databaseEnvironment.getPassword());
result.setMaximumPoolSize(2);
result.setTransactionIsolation("TRANSACTION_READ_COMMITTED");
- if ("Oracle".equals(databaseType.getName())) {
- result.setConnectionInitSql("ALTER SESSION SET CURRENT_SCHEMA = " + dataSourceName);
- }
- if ("MySQL".equals(databaseType.getName())) {
- result.setConnectionInitSql("SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''))");
- }
+ getConnectionInitSQL(dataSourceName, databaseType).ifPresent(result::setConnectionInitSql);
return new HikariDataSource(result);
}
+ private static Optional<String> getConnectionInitSQL(final String dataSourceName, final DatabaseType databaseType) {
+ switch (databaseType.getName()) {
+ case "Oracle":
+ return Optional.of(String.format("ALTER SESSION SET CURRENT_SCHEMA = %s", dataSourceName));
+ case "MySQL":
+ return Optional.of("SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''))");
+ default:
+ return Optional.empty();
+ }
+ }
+
@RequiredArgsConstructor
@EqualsAndHashCode
private static class DataSourceCacheKey {
- private final DatabaseType databaseType;
-
private final String dataSourceName;
+
+ private final DatabaseType databaseType;
}
}
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/env/schema/SchemaEnvironment.java b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/env/schema/SchemaEnvironment.java
index afffdcb..5af4221 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/env/schema/SchemaEnvironment.java
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/env/schema/SchemaEnvironment.java
@@ -22,11 +22,11 @@ import lombok.Getter;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
+import java.util.Collection;
import java.util.LinkedList;
-import java.util.List;
/**
- * XML definition for database schema environment.
+ * XML definition of schema environment.
*/
@Getter
@XmlRootElement(name = "schema")
@@ -34,13 +34,13 @@ public final class SchemaEnvironment {
@XmlElementWrapper(name = "databases")
@XmlElement(name = "database")
- private List<String> databases = new LinkedList<>();
+ private final Collection<String> databases = new LinkedList<>();
@XmlElementWrapper(name = "table-create")
@XmlElement(name = "sql")
- private List<String> tableCreateSQLs = new LinkedList<>();
+ private final Collection<String> tableCreateSQLs = new LinkedList<>();
@XmlElementWrapper(name = "table-drop")
@XmlElement(name = "sql")
- private List<String> tableDropSQLs = new LinkedList<>();
+ private final Collection<String> tableDropSQLs = new LinkedList<>();
}
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/env/schema/SchemaEnvironmentManager.java b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/env/schema/SchemaEnvironmentManager.java
index c7799c7..07a41f2 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/env/schema/SchemaEnvironmentManager.java
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/env/schema/SchemaEnvironmentManager.java
@@ -20,10 +20,10 @@ package org.apache.shardingsphere.test.integration.env.schema;
import com.google.common.base.Joiner;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
+import org.apache.shardingsphere.infra.database.type.DatabaseType;
import org.apache.shardingsphere.test.integration.env.EnvironmentPath;
import org.apache.shardingsphere.test.integration.env.IntegrateTestEnvironment;
-import org.apache.shardingsphere.test.integration.env.datasource.DataSourceUtil;
-import org.apache.shardingsphere.infra.database.type.DatabaseType;
+import org.apache.shardingsphere.test.integration.env.datasource.DataSourceBuilder;
import org.h2.tools.RunScript;
import javax.sql.DataSource;
@@ -37,7 +37,6 @@ import java.sql.SQLException;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedList;
-import java.util.List;
/**
* Schema environment manager.
@@ -54,7 +53,7 @@ public final class SchemaEnvironmentManager {
* @throws JAXBException JAXB exception
*/
public static Collection<String> getDataSourceNames(final String ruleType) throws IOException, JAXBException {
- return unmarshal(EnvironmentPath.getDatabaseEnvironmentResourceFile(ruleType)).getDatabases();
+ return unmarshal(EnvironmentPath.getSchemaEnvironmentFile(ruleType)).getDatabases();
}
/**
@@ -66,12 +65,12 @@ public final class SchemaEnvironmentManager {
* @throws SQLException SQL exception
*/
public static void createDatabase(final String ruleType) throws IOException, JAXBException, SQLException {
- SchemaEnvironment databaseInitialization = unmarshal(EnvironmentPath.getDatabaseEnvironmentResourceFile(ruleType));
+ SchemaEnvironment schemaEnvironment = unmarshal(EnvironmentPath.getSchemaEnvironmentFile(ruleType));
for (DatabaseType each : IntegrateTestEnvironment.getInstance().getDatabaseEnvironments().keySet()) {
- DataSource dataSource = DataSourceUtil.createDataSource(each, null);
+ DataSource dataSource = DataSourceBuilder.build(null, each);
try (
Connection connection = dataSource.getConnection();
- StringReader stringReader = new StringReader(Joiner.on(";\n").skipNulls().join(generateCreateDatabaseSQLs(each, databaseInitialization.getDatabases())))) {
+ StringReader stringReader = new StringReader(Joiner.on(";\n").skipNulls().join(generateCreateDatabaseSQLs(each, schemaEnvironment.getDatabases())))) {
RunScript.execute(connection, stringReader);
}
}
@@ -85,13 +84,13 @@ public final class SchemaEnvironmentManager {
* @throws JAXBException JAXB exception
*/
public static void dropDatabase(final String ruleType) throws IOException, JAXBException {
- SchemaEnvironment databaseInitialization = unmarshal(EnvironmentPath.getDatabaseEnvironmentResourceFile(ruleType));
+ SchemaEnvironment schemaEnvironment = unmarshal(EnvironmentPath.getSchemaEnvironmentFile(ruleType));
for (DatabaseType each : IntegrateTestEnvironment.getInstance().getDatabaseEnvironments().keySet()) {
- DataSource dataSource = DataSourceUtil.createDataSource(each, null);
+ DataSource dataSource = DataSourceBuilder.build(null, each);
if ("PostgreSQL".equals(each.getName())) {
try (
Connection connection = dataSource.getConnection();
- StringReader stringReader = new StringReader(Joiner.on(";\n").skipNulls().join(generateTerminateConnectionSQLs(databaseInitialization.getDatabases())))) {
+ StringReader stringReader = new StringReader(Joiner.on(";\n").skipNulls().join(generateTerminateConnectionSQLs(schemaEnvironment.getDatabases())))) {
RunScript.execute(connection, stringReader);
} catch (final SQLException ex) {
// TODO database maybe not exist
@@ -99,7 +98,7 @@ public final class SchemaEnvironmentManager {
}
try (
Connection connection = dataSource.getConnection();
- StringReader stringReader = new StringReader(Joiner.on(";\n").skipNulls().join(generateDropDatabaseSQLs(each, databaseInitialization.getDatabases())))) {
+ StringReader stringReader = new StringReader(Joiner.on(";\n").skipNulls().join(generateDropDatabaseSQLs(each, schemaEnvironment.getDatabases())))) {
RunScript.execute(connection, stringReader);
} catch (final SQLException ex) {
// TODO database maybe not exist
@@ -107,13 +106,13 @@ public final class SchemaEnvironmentManager {
}
}
- private static SchemaEnvironment unmarshal(final String databaseInitializationFilePath) throws IOException, JAXBException {
- try (FileReader reader = new FileReader(databaseInitializationFilePath)) {
+ private static SchemaEnvironment unmarshal(final String schemaEnvironmentConfigFile) throws IOException, JAXBException {
+ try (FileReader reader = new FileReader(schemaEnvironmentConfigFile)) {
return (SchemaEnvironment) JAXBContext.newInstance(SchemaEnvironment.class).createUnmarshaller().unmarshal(reader);
}
}
- private static Collection<String> generateCreateDatabaseSQLs(final DatabaseType databaseType, final List<String> databases) {
+ private static Collection<String> generateCreateDatabaseSQLs(final DatabaseType databaseType, final Collection<String> databases) {
if ("H2".equals(databaseType.getName())) {
return Collections.emptyList();
}
@@ -125,7 +124,7 @@ public final class SchemaEnvironmentManager {
return result;
}
- private static Collection<String> generateTerminateConnectionSQLs(final List<String> databases) {
+ private static Collection<String> generateTerminateConnectionSQLs(final Collection<String> databases) {
String sql = "SELECT pg_terminate_backend (pg_stat_activity.pid) FROM pg_stat_activity WHERE pg_stat_activity.datname = '%s'";
Collection<String> result = new LinkedList<>();
for (String each : databases) {
@@ -134,7 +133,7 @@ public final class SchemaEnvironmentManager {
return result;
}
- private static Collection<String> generateDropDatabaseSQLs(final DatabaseType databaseType, final List<String> databases) {
+ private static Collection<String> generateDropDatabaseSQLs(final DatabaseType databaseType, final Collection<String> databases) {
if ("H2".equals(databaseType.getName())) {
return Collections.emptyList();
}
@@ -156,14 +155,14 @@ public final class SchemaEnvironmentManager {
*/
public static void createTable(final String ruleType) throws JAXBException, IOException, SQLException {
for (DatabaseType each : IntegrateTestEnvironment.getInstance().getDatabaseEnvironments().keySet()) {
- SchemaEnvironment databaseEnvironmentSchema = unmarshal(EnvironmentPath.getDatabaseEnvironmentResourceFile(ruleType));
+ SchemaEnvironment databaseEnvironmentSchema = unmarshal(EnvironmentPath.getSchemaEnvironmentFile(ruleType));
createTable(databaseEnvironmentSchema, each);
}
}
private static void createTable(final SchemaEnvironment databaseEnvironmentSchema, final DatabaseType databaseType) throws SQLException {
for (String each : databaseEnvironmentSchema.getDatabases()) {
- DataSource dataSource = DataSourceUtil.createDataSource(databaseType, each);
+ DataSource dataSource = DataSourceBuilder.build(each, databaseType);
try (Connection connection = dataSource.getConnection();
StringReader stringReader = new StringReader(Joiner.on(";\n").join(databaseEnvironmentSchema.getTableCreateSQLs()))) {
RunScript.execute(connection, stringReader);
@@ -180,14 +179,14 @@ public final class SchemaEnvironmentManager {
*/
public static void dropTable(final String ruleType) throws JAXBException, IOException {
for (DatabaseType each : IntegrateTestEnvironment.getInstance().getDatabaseEnvironments().keySet()) {
- SchemaEnvironment databaseEnvironmentSchema = unmarshal(EnvironmentPath.getDatabaseEnvironmentResourceFile(ruleType));
+ SchemaEnvironment databaseEnvironmentSchema = unmarshal(EnvironmentPath.getSchemaEnvironmentFile(ruleType));
dropTable(databaseEnvironmentSchema, each);
}
}
private static void dropTable(final SchemaEnvironment databaseEnvironmentSchema, final DatabaseType databaseType) {
for (String each : databaseEnvironmentSchema.getDatabases()) {
- DataSource dataSource = DataSourceUtil.createDataSource(databaseType, each);
+ DataSource dataSource = DataSourceBuilder.build(each, databaseType);
try (Connection connection = dataSource.getConnection();
StringReader stringReader = new StringReader(Joiner.on(";\n").join(databaseEnvironmentSchema.getTableDropSQLs()))) {
RunScript.execute(connection, stringReader);
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/cases/ddl/dataset/create_temporary_table.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/cases/ddl/dataset/create_temporary_table.xml
deleted file mode 100644
index 61130f9..0000000
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/cases/ddl/dataset/create_temporary_table.xml
+++ /dev/null
@@ -1,23 +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.
- -->
-
-<dataset>
- <metadata table-name="t_temp_log">
- <column name="id" type="integer" />
- <column name="status" type="varchar" />
- </metadata>
-</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/cases/ddl/dataset/empty_temp_log.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/cases/ddl/dataset/empty_temp_log.xml
deleted file mode 100644
index 61130f9..0000000
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/cases/ddl/dataset/empty_temp_log.xml
+++ /dev/null
@@ -1,23 +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.
- -->
-
-<dataset>
- <metadata table-name="t_temp_log">
- <column name="id" type="integer" />
- <column name="status" type="varchar" />
- </metadata>
-</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/cases/ddl/ddl-integrate-test-cases.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/cases/ddl/ddl-integrate-test-cases.xml
index c91d199..b5bd9a5 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/cases/ddl/ddl-integrate-test-cases.xml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/cases/ddl/ddl-integrate-test-cases.xml
@@ -16,92 +16,35 @@
-->
<integrate-test-cases>
- <!-- FIXME cannot process un-config table t_log -->
- <!--<ddl-test-case sql="CREATE TABLE t_log(id int PRIMARY KEY, status varchar(10))">-->
- <!--<assertion table="t_log" expected-data-file="create_table.xml" />-->
- <!--</ddl-test-case>-->
- <!---->
- <!--<ddl-test-case sql="CREATE TABLE t_log(id int PRIMARY KEY, status boolean)" db-types="PostgreSQL">-->
- <!--<assertion table="t_log" expected-data-file="create_table.xml" />-->
- <!--</ddl-test-case>-->
- <!---->
- <!--<ddl-test-case sql="CREATE TABLE IF NOT EXISTS t_log(id int, status varchar(10))" db-types="MySQL,PostgreSQL">-->
- <!--<assertion table="t_log" expected-data-file="create_table.xml" />-->
- <!--</ddl-test-case>-->
- <!---->
- <!--<ddl-test-case sql="CREATE TEMPORARY TABLE IF NOT EXISTS t_temp_log(id int, status varchar(10))" db-types="MySQL,PostgreSQL">-->
- <!--<assertion table="t_temp_log" expected-data-file="create_temporary_table.xml" />-->
- <!--</ddl-test-case>-->
- <!---->
- <!--<ddl-test-case sql="CREATE GLOBAL TEMPORARY TABLE t_temp_log(id int, status varchar(10))" db-types="Oracle,PostgreSQL">-->
- <!--<assertion table="t_temp_log" expected-data-file="create_temporary_table.xml" />-->
- <!--</ddl-test-case>-->
- <!---->
- <!--<ddl-test-case sql="CREATE LOCAL TEMP TABLE t_temp_log(id int, status varchar(10))" db-types="PostgreSQL">-->
- <!--<assertion table="t_temp_log" expected-data-file="create_temporary_table.xml" />-->
- <!--</ddl-test-case>-->
- <!---->
- <!--<ddl-test-case sql="CREATE UNLOGGED TABLE t_log(id int, status varchar(10))" db-types="PostgreSQL">-->
- <!--<assertion table="t_log" expected-data-file="create_table.xml" />-->
- <!--</ddl-test-case>-->
- <!---->
- <!--<ddl-test-case sql="CREATE INDEX t_log_index ON t_log (id)">-->
- <!--<assertion init-sql="CREATE TABLE t_log(id int, status varchar(10))" table="t_log" expected-data-file="create_index.xml" />-->
- <!--</ddl-test-case>-->
- <!---->
- <!--<ddl-test-case sql="CREATE UNIQUE INDEX t_log_index ON t_log (id)">-->
- <!--<assertion init-sql="CREATE TABLE t_log(id int, status varchar(10))" table="t_log" expected-data-file="create_unique_index.xml" />-->
- <!--</ddl-test-case>-->
- <!---->
- <!--<ddl-test-case sql="ALTER TABLE t_log ADD name varchar(10)">-->
- <!--<assertion init-sql="CREATE TABLE t_log(id int, status varchar(10))" table="t_log" expected-data-file="alter_table.xml" />-->
- <!--</ddl-test-case>-->
- <!---->
- <!--<ddl-test-case sql="ALTER TABLE IF EXISTS ONLY t_log ADD name varchar" db-types="PostgreSQL">-->
- <!--<assertion init-sql="CREATE TABLE t_log(id int, status varchar(10))" table="t_log" expected-data-file="alter_table.xml" />-->
- <!--</ddl-test-case>-->
- <!---->
- <!--<ddl-test-case sql="DROP TABLE t_log">-->
- <!--<assertion init-sql="CREATE TABLE t_log(id int, status varchar(10))" table="t_log" expected-data-file="empty_log.xml" />-->
- <!--</ddl-test-case>-->
- <!---->
- <!--<ddl-test-case sql="DROP TABLE IF EXISTS t_log" db-types="MySQL,PostgreSQL,SQLServer">-->
- <!--<assertion init-sql="CREATE TABLE t_log(id int, status varchar(10))" table="t_log" expected-data-file="empty_log.xml" />-->
- <!--</ddl-test-case>-->
- <!---->
- <!--<ddl-test-case sql="DROP TEMPORARY TABLE IF EXISTS t_temp_log" db-types="MySQL">-->
- <!--<assertion init-sql="CREATE TABLE t_temp_log(id int, status varchar(10))" table="t_temp_log" expected-data-file="empty_temp_log.xml" />-->
- <!--</ddl-test-case>-->
- <!---->
- <!--<ddl-test-case sql="DROP TABLE t_log RESTRICT" db-types="MySQL,PostgreSQL">-->
- <!--<assertion init-sql="CREATE TABLE t_log(id int, status varchar(10))" table="t_log" expected-data-file="empty_log.xml" />-->
- <!--</ddl-test-case>-->
- <!---->
- <!--<ddl-test-case sql="DROP TABLE t_log CASCADE" db-types="MySQL,PostgreSQL">-->
- <!--<assertion init-sql="CREATE TABLE t_log(id int, status varchar(10))" table="t_log" expected-data-file="empty_log.xml" />-->
- <!--</ddl-test-case>-->
- <!---->
- <!--<ddl-test-case sql="DROP TABLE t_log CASCADE CONSTRAINTS PURGE" db-types="Oracle">-->
- <!--<assertion init-sql="CREATE TABLE t_log(id int, status varchar(10))" table="t_log" expected-data-file="empty_log.xml" />-->
- <!--</ddl-test-case>-->
- <!---->
- <!--<ddl-test-case sql="DROP INDEX t_log_index ON t_log" db-types="MySQL,SQLServer">-->
- <!--<assertion init-sql="CREATE TABLE t_log(id int, status varchar(10));CREATE INDEX t_log_index ON t_log(status)" table="t_log" expected-data-file="empty_log.xml" />-->
- <!--</ddl-test-case>-->
- <!---->
- <!--<ddl-test-case sql="DROP INDEX order_index" db-types="PostgreSQL,Oracle">-->
- <!--<assertion init-sql="CREATE TABLE t_log(id int, status varchar(10));CREATE INDEX t_log_index ON t_log(status)" table="t_log" expected-data-file="empty_log.xml" />-->
- <!--</ddl-test-case>-->
- <!---->
- <!--<ddl-test-case sql="DROP INDEX IF EXISTS order_index" db-types="PostgreSQL">-->
- <!--<assertion init-sql="CREATE TABLE t_log(id int, status varchar(10))" table="t_log" expected-data-file="empty_log.xml" />-->
- <!--</ddl-test-case>-->
- <!---->
- <!--<ddl-test-case sql="TRUNCATE TABLE t_log>-->
- <!--<assertion init-sql="CREATE TABLE t_log(id int, status varchar(10))" table="t_log" expected-data-file="empty_log.xml" />-->
- <!--</ddl-test-case>-->
- <!---->
- <!--<ddl-test-case sql="TRUNCATE TABLE ONLY t_log" db-types="PostgreSQL">-->
- <!--<assertion init-sql="CREATE TABLE t_log(id int, status varchar(10))" table="t_log" expected-data-file="empty_log.xml" />-->
- <!--</ddl-test-case>-->
+<!-- <ddl-test-case sql="CREATE TABLE t_log(id int PRIMARY KEY, status varchar(10))">-->
+<!-- <assertion table="t_log" expected-data-file="create_table.xml" />-->
+<!-- </ddl-test-case>-->
+<!-- -->
+<!-- <ddl-test-case sql="CREATE INDEX t_log_index ON t_log (id)">-->
+<!-- <assertion init-sql="CREATE TABLE t_log(id int, status varchar(10))" table="t_log" expected-data-file="create_index.xml" />-->
+<!-- </ddl-test-case>-->
+<!-- -->
+<!-- <ddl-test-case sql="CREATE UNIQUE INDEX t_log_index ON t_log (id)">-->
+<!-- <assertion init-sql="CREATE TABLE t_log(id int, status varchar(10))" table="t_log" expected-data-file="create_unique_index.xml" />-->
+<!-- </ddl-test-case>-->
+<!-- -->
+<!-- <ddl-test-case sql="ALTER TABLE t_log ADD name varchar(10)">-->
+<!-- <assertion init-sql="CREATE TABLE t_log(id int, status varchar(10))" table="t_log" expected-data-file="alter_table.xml" />-->
+<!-- </ddl-test-case>-->
+<!-- -->
+<!-- <ddl-test-case sql="DROP TABLE t_log">-->
+<!-- <assertion init-sql="CREATE TABLE t_log(id int, status varchar(10))" table="t_log" expected-data-file="empty_log.xml" />-->
+<!-- </ddl-test-case>-->
+<!-- -->
+<!-- <ddl-test-case sql="DROP INDEX t_log_index ON t_log" db-types="MySQL,SQLServer">-->
+<!-- <assertion init-sql="CREATE TABLE t_log(id int, status varchar(10));CREATE INDEX t_log_index ON t_log(status)" table="t_log" expected-data-file="empty_log.xml" />-->
+<!-- </ddl-test-case>-->
+<!-- -->
+<!-- <ddl-test-case sql="DROP INDEX order_index" db-types="PostgreSQL,Oracle">-->
+<!-- <assertion init-sql="CREATE TABLE t_log(id int, status varchar(10));CREATE INDEX t_log_index ON t_log(status)" table="t_log" expected-data-file="empty_log.xml" />-->
+<!-- </ddl-test-case>-->
+<!-- -->
+<!-- <ddl-test-case sql="TRUNCATE TABLE t_log">-->
+<!-- <assertion init-sql="CREATE TABLE t_log(id int, status varchar(10))" table="t_log" expected-data-file="empty_log.xml" />-->
+<!-- </ddl-test-case>-->
</integrate-test-cases>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/cases/dml/dml-integrate-test-cases.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/cases/dml/dml-integrate-test-cases.xml
index d78ab75..915aa9c 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/cases/dml/dml-integrate-test-cases.xml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/cases/dml/dml-integrate-test-cases.xml
@@ -25,14 +25,6 @@
<assertion parameters="1:int, 1:int, 1:int" expected-data-file="insert_with_now_function.xml" />
</dml-test-case>
- <dml-test-case sql="INSERT INTO t_order (order_id, user_id, status) VALUES (1, 1, 'insert')">
- <assertion expected-data-file="insert_for_order_1.xml" />
- </dml-test-case>
-
- <dml-test-case sql="INSERT INTO `t_order` (`order_id`, `user_id`, `status`) VALUES (1, 1, 'insert')" db-types="MySQL">
- <assertion expected-data-file="insert_for_order_1.xml" />
- </dml-test-case>
-
<dml-test-case sql="INSERT INTO t_order (order_id, user_id, status) VALUES (1, 1, 'insert'), (2, 2, 'insert2')" db-types="MySQL">
<assertion expected-data-file="insert_multiple_values_for_order_1_2.xml" />
</dml-test-case>
@@ -63,11 +55,6 @@
<!--<assertion parameters="2:int, 2:int, insert:String" expected-data-file="insert_for_order_2.xml" />-->
<!--</dml-test-case>-->
- <dml-test-case sql="INSERT INTO t_order (order_id, user_id, status) VALUES (?, ?, 'insert')" >
- <assertion parameters="1:int, 1:int" expected-data-file="insert_for_order_1.xml" />
- <assertion parameters="2:int, 2:int" expected-data-file="insert_for_order_2.xml" />
- </dml-test-case>
-
<dml-test-case sql="INSERT INTO t_order SET order_id = ?, user_id = ?, status = 'insert'" db-types="MySQL">
<assertion parameters="1:int, 1:int" expected-data-file="insert_for_order_1.xml" />
<assertion parameters="2:int, 2:int" expected-data-file="insert_for_order_2.xml" />
@@ -133,18 +120,10 @@
<assertion expected-data-file="update_without_condition.xml" />
</dml-test-case>
- <dml-test-case sql="UPDATE LOW_PRIORITY IGNORE t_order SET status = ? WHERE order_id = ? AND user_id = ?" db-types="MySQL">
- <assertion parameters="update:String, 1000:int, 10:int" expected-data-file="update.xml" />
- </dml-test-case>
-
- <dml-test-case sql="UPDATE `t_order` SET `status` = ? WHERE `order_id` = ? AND user_id = ?" db-types="MySQL">
- <assertion parameters="update:String, 1000:int, 10:int" expected-data-file="update.xml" />
- </dml-test-case>
-
<dml-test-case sql="UPDATE /*+ index(field1) */ ONLY t_order SET status=? WHERE order_id = ? AND user_id = ? RETURN * LOG ERRORS INTO TABLE_LOG" db-types="Oracle">
<assertion parameters="update:String, 1000:int, 10:int" expected-data-file="update.xml" />
</dml-test-case>
-
+
<dml-test-case sql="UPDATE t_order SET status = 'update' WHERE order_id = 1000 AND user_id = 10">
<assertion expected-data-file="update.xml" />
</dml-test-case>
@@ -165,10 +144,6 @@
<assertion parameters="init:String" expected-data-file="delete_without_sharding_value.xml" />
</dml-test-case>
- <dml-test-case sql="DELETE FROM `t_order` WHERE `status`='init'" db-types="MySQL">
- <assertion expected-data-file="delete_without_sharding_value.xml" />
- </dml-test-case>
-
<dml-test-case sql="DELETE /*+ index(status) */ ONLY t_order WHERE status=1 RETURN * LOG ERRORS INTO TABLE_LOG" db-types="Oracle">
<assertion expected-data-file="delete_with_special_comments_return_without_sharding_value.xml" />
</dml-test-case>
@@ -176,7 +151,7 @@
<dml-test-case sql="DELETE /*+ index(status) */ ONLY (t_order) WHERE status=1 RETURNING *" db-types="Oracle">
<assertion expected-data-file="delete_with_special_comments_returning_without_sharding_value.xml" />
</dml-test-case>
-
+
<!-- Can't support delete multiple tables-->
<!--<dml-test-case sql="DELETE o FROM t_order AS o WHERE status=?" db-types="MySQL,Oracle,SQLServer">-->
<!--<assertion parameters="init:String" expected-data-file="delete_with_alias.xml" />-->
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/cases/dql/dql-integrate-test-cases.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/cases/dql/dql-integrate-test-cases.xml
index 5d79844..52ea4e5 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/cases/dql/dql-integrate-test-cases.xml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/cases/dql/dql-integrate-test-cases.xml
@@ -95,21 +95,6 @@
<assertion parameters="10:int, 11:int, 1009:int, 1108:int, none:String" expected-data-file="empty_order_item.xml" />
</dql-test-case>
- <dql-test-case sql="SELECT i.* FROM t_order o JOIN t_order_item i ON o.user_id = i.user_id AND o.order_id = i.order_id JOIN `key_word` c ON o.status = c.status WHERE o.user_id IN (?, ?) AND o.order_id BETWEEN ? AND ? AND o.status = ? ORDER BY i.item_id" db-types="MySQL">
- <assertion parameters="10:int, 11:int, 1001:int, 1100:int, init:String" expected-data-file="select_sharding_route_with_broadcast_table.xml" />
- <assertion parameters="10:int, 11:int, 1009:int, 1108:int, none:String" expected-data-file="empty_order_item.xml" />
- </dql-test-case>
-
- <dql-test-case sql="SELECT i.* FROM t_order o JOIN t_order_item i ON o.user_id = i.user_id AND o.order_id = i.order_id JOIN "key_word" c ON o.status = c.status WHERE o.user_id IN (?, ?) AND o.order_id BETWEEN ? AND ? AND c.status = ? ORDER BY i.item_id" db-types="PostgreSQL,Oracle">
- <assertion parameters="10:int, 11:int, 1001:int, 1100:int, init:String" expected-data-file="select_sharding_route_with_broadcast_table.xml" />
- <assertion parameters="10:int, 11:int, 1009:int, 1108:int, none:String" expected-data-file="empty_order_item.xml" />
- </dql-test-case>
-
- <dql-test-case sql="SELECT i.* FROM t_order o JOIN t_order_item i ON o.user_id = i.user_id AND o.order_id = i.order_id JOIN [key_word] c ON o.status = c.status WHERE o.user_id IN (?, ?) AND o.order_id BETWEEN ? AND ? AND c.status = ? ORDER BY i.item_id" db-types="SQLServer">
- <assertion parameters="10:int, 11:int, 1001:int, 1100:int, init:String" expected-data-file="select_sharding_route_with_broadcast_table.xml" />
- <assertion parameters="10:int, 11:int, 1009:int, 1108:int, none:String" expected-data-file="empty_order_item.xml" />
- </dql-test-case>
-
<dql-test-case sql="SELECT length.item_id password FROM t_order_item length where length.item_id = ? " db-types="MySQL,H2,SQLServer,Oracle">
<assertion parameters="100001:int" expected-data-file="select_alias_as_keyword.xml" />
</dql-test-case>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env/db/dataset.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env/db/dataset.xml
index 5c65950..65b57f0 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env/db/dataset.xml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env/db/dataset.xml
@@ -32,10 +32,6 @@
<column name="id" type="numeric" />
<column name="status" type="varchar" />
</metadata>
- <metadata data-nodes="db_${0..9}.key_word">
- <column name="id" type="numeric" />
- <column name="status" type="varchar" />
- </metadata>
<row data-node="db_0.t_order" values="1000, 10, init" />
<row data-node="db_0.t_order" values="1001, 10, init" />
<row data-node="db_0.t_order" values="2000, 20, init" />
@@ -166,14 +162,4 @@
<row data-node="db_7.t_broadcast_table" values="1, init" />
<row data-node="db_8.t_broadcast_table" values="1, init" />
<row data-node="db_9.t_broadcast_table" values="1, init" />
- <row data-node="db_0.key_word" values="1, init" />
- <row data-node="db_1.key_word" values="1, init" />
- <row data-node="db_2.key_word" values="1, init" />
- <row data-node="db_3.key_word" values="1, init" />
- <row data-node="db_4.key_word" values="1, init" />
- <row data-node="db_5.key_word" values="1, init" />
- <row data-node="db_6.key_word" values="1, init" />
- <row data-node="db_7.key_word" values="1, init" />
- <row data-node="db_8.key_word" values="1, init" />
- <row data-node="db_9.key_word" values="1, init" />
</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env/db/schema.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env/db/schema.xml
index 5c26669..18de2d2 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env/db/schema.xml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env/db/schema.xml
@@ -34,12 +34,10 @@
<sql>CREATE INDEX order_index_t_order ON t_order (order_id)</sql>
<sql>CREATE TABLE t_order_item (item_id INT NOT NULL, order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, creation_date DATE, PRIMARY KEY (item_id))</sql>
<sql>CREATE TABLE t_broadcast_table (id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (id))</sql>
- <sql>CREATE TABLE key_word (id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (id))</sql>
</table-create>
<table-drop>
<sql>DROP TABLE t_order</sql>
<sql>DROP TABLE t_order_item</sql>
<sql>DROP TABLE t_broadcast_table</sql>
- <sql>DROP TABLE key_word</sql>
</table-drop>
</schema>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env/dbtbl_with_replica_query/dataset.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env/dbtbl_with_replica_query/dataset.xml
index 6ca101f..dfdfcea 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env/dbtbl_with_replica_query/dataset.xml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env/dbtbl_with_replica_query/dataset.xml
@@ -36,10 +36,6 @@
<column name="id" type="numeric" />
<column name="status" type="varchar" />
</metadata>
- <metadata data-nodes="primary_ds_${0..9}.key_word,replica_ds_${0..9}.key_word">
- <column name="id" type="numeric" />
- <column name="status" type="varchar" />
- </metadata>
<row data-node="primary_ds_0.t_order_0" values="1000, 10, init" />
<row data-node="primary_ds_0.t_order_1" values="1001, 10, init" />
<row data-node="primary_ds_0.t_order_2" values="1002, 10, init" />
@@ -350,16 +346,6 @@
<row data-node="primary_ds_7.t_broadcast_table" values="1, init" />
<row data-node="primary_ds_8.t_broadcast_table" values="1, init" />
<row data-node="primary_ds_9.t_broadcast_table" values="1, init" />
- <row data-node="primary_ds_0.key_word" values="1, init" />
- <row data-node="primary_ds_1.key_word" values="1, init" />
- <row data-node="primary_ds_2.key_word" values="1, init" />
- <row data-node="primary_ds_3.key_word" values="1, init" />
- <row data-node="primary_ds_4.key_word" values="1, init" />
- <row data-node="primary_ds_5.key_word" values="1, init" />
- <row data-node="primary_ds_6.key_word" values="1, init" />
- <row data-node="primary_ds_7.key_word" values="1, init" />
- <row data-node="primary_ds_8.key_word" values="1, init" />
- <row data-node="primary_ds_9.key_word" values="1, init" />
<row data-node="primary_ds_0.t_global" values="1, global_primary" />
<row data-node="replica_ds_0.t_order_0" values="1000, 10, init_replica" />
<row data-node="replica_ds_0.t_order_1" values="1001, 10, init_replica" />
@@ -671,15 +657,5 @@
<row data-node="replica_ds_7.t_broadcast_table" values="1, init_replica" />
<row data-node="replica_ds_8.t_broadcast_table" values="1, init_replica" />
<row data-node="replica_ds_9.t_broadcast_table" values="1, init_replica" />
- <row data-node="replica_ds_0.key_word" values="1, init_replica" />
- <row data-node="replica_ds_1.key_word" values="1, init_replica" />
- <row data-node="replica_ds_2.key_word" values="1, init_replica" />
- <row data-node="replica_ds_3.key_word" values="1, init_replica" />
- <row data-node="replica_ds_4.key_word" values="1, init_replica" />
- <row data-node="replica_ds_5.key_word" values="1, init_replica" />
- <row data-node="replica_ds_6.key_word" values="1, init_replica" />
- <row data-node="replica_ds_7.key_word" values="1, init_replica" />
- <row data-node="replica_ds_8.key_word" values="1, init_replica" />
- <row data-node="replica_ds_9.key_word" values="1, init_replica" />
<row data-node="replica_ds_0.t_global" values="1, global_replica" />
</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env/dbtbl_with_replica_query/schema.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env/dbtbl_with_replica_query/schema.xml
index 0a35a63..5ea6503 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env/dbtbl_with_replica_query/schema.xml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env/dbtbl_with_replica_query/schema.xml
@@ -72,7 +72,6 @@
<sql>CREATE TABLE t_order_item_9 (item_id INT NOT NULL, order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, creation_date DATE, PRIMARY KEY (item_id))</sql>
<sql>CREATE TABLE t_broadcast_table (id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (id))</sql>
<sql>CREATE TABLE t_global (id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (id))</sql>
- <sql>CREATE TABLE key_word (id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (id))</sql>
</table-create>
<table-drop>
<sql>DROP TABLE t_order_0</sql>
@@ -97,6 +96,5 @@
<sql>DROP TABLE t_order_item_9</sql>
<sql>DROP TABLE t_broadcast_table</sql>
<sql>DROP TABLE t_global</sql>
- <sql>DROP TABLE key_word</sql>
</table-drop>
</schema>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env/replica_query/dataset.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env/replica_query/dataset.xml
index 6390fad..e5646e5 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env/replica_query/dataset.xml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env/replica_query/dataset.xml
@@ -36,10 +36,6 @@
<column name="id" type="numeric" />
<column name="status" type="varchar" />
</metadata>
- <metadata data-nodes="primary_ds.key_word,replica_${0..1}.key_word">
- <column name="id" type="numeric" />
- <column name="status" type="varchar" />
- </metadata>
<row data-node="primary_ds.t_order" values="1000, 10, init" />
<row data-node="primary_ds.t_order" values="1001, 10, init" />
<row data-node="primary_ds.t_order" values="1100, 11, init" />
@@ -161,7 +157,6 @@
<row data-node="primary_ds.t_order_item" values="290101, 2901, 29, init, 2017-08-08" />
<row data-node="primary_ds.t_order_item" values="290102, 2901, 29, init, 2017-08-08" />
<row data-node="primary_ds.t_broadcast_table" values="1, init" />
- <row data-node="primary_ds.key_word" values="1, init" />
<row data-node="primary_ds.t_global" values="1, global_primary" />
<row data-node="replica_0.t_order" values="1000, 10, init_replica" />
<row data-node="replica_0.t_order" values="1001, 10, init_replica" />
@@ -284,7 +279,6 @@
<row data-node="replica_0.t_order_item" values="290101, 2901, 29, init_replica, 2017-08-08" />
<row data-node="replica_0.t_order_item" values="290102, 2901, 29, init_replica, 2017-08-08" />
<row data-node="replica_0.t_broadcast_table" values="1, init_replica" />
- <row data-node="replica_0.key_word" values="1, init_replica" />
<row data-node="replica_0.t_global" values="1, global_replica_0" />
<row data-node="replica_1.t_order" values="1000, 10, init_replica" />
<row data-node="replica_1.t_order" values="1001, 10, init_replica" />
@@ -407,6 +401,5 @@
<row data-node="replica_1.t_order_item" values="290101, 2901, 29, init_replica, 2017-08-08" />
<row data-node="replica_1.t_order_item" values="290102, 2901, 29, init_replica, 2017-08-08" />
<row data-node="replica_1.t_broadcast_table" values="1, init_replica" />
- <row data-node="replica_1.key_word" values="1, init_replica" />
<row data-node="replica_1.t_global" values="1, global_replica_1" />
</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env/replica_query/schema.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env/replica_query/schema.xml
index ddd4edd..cf2df59 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env/replica_query/schema.xml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env/replica_query/schema.xml
@@ -28,13 +28,11 @@
<sql>CREATE TABLE t_order_item (item_id INT NOT NULL, order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, creation_date DATE, PRIMARY KEY (item_id))</sql>
<sql>CREATE TABLE t_broadcast_table (id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (id))</sql>
<sql>CREATE TABLE t_global (id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (id))</sql>
- <sql>CREATE TABLE key_word (id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (id))</sql>
</table-create>
<table-drop>
<sql>DROP TABLE t_order</sql>
<sql>DROP TABLE t_order_item</sql>
<sql>DROP TABLE t_broadcast_table</sql>
<sql>DROP TABLE t_global</sql>
- <sql>DROP TABLE key_word</sql>
</table-drop>
</schema>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env/shadow/schema.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env/shadow/schema.xml
index 3ea3787..6ce5867 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env/shadow/schema.xml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env/shadow/schema.xml
@@ -26,12 +26,10 @@
<sql>CREATE INDEX order_index_t_order ON t_order (order_id)</sql>
<sql>CREATE TABLE t_order_item (item_id INT NOT NULL, order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, creation_date DATE, PRIMARY KEY (item_id))</sql>
<sql>CREATE TABLE t_broadcast_table (id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (id))</sql>
- <sql>CREATE TABLE key_word (id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (id))</sql>
</table-create>
<table-drop>
<sql>DROP TABLE t_order</sql>
<sql>DROP TABLE t_order_item</sql>
<sql>DROP TABLE t_broadcast_table</sql>
- <sql>DROP TABLE key_word</sql>
</table-drop>
</schema>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env/tbl/dataset.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env/tbl/dataset.xml
index 0ad8438..071981c 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env/tbl/dataset.xml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env/tbl/dataset.xml
@@ -32,10 +32,6 @@
<column name="id" type="numeric" />
<column name="status" type="varchar" />
</metadata>
- <metadata data-nodes="tbl.key_word">
- <column name="id" type="numeric" />
- <column name="status" type="varchar" />
- </metadata>
<row data-node="tbl.t_order_0" values="1000, 10, init" />
<row data-node="tbl.t_order_1" values="1001, 10, init" />
<row data-node="tbl.t_order_2" values="1002, 10, init" />
@@ -97,5 +93,4 @@
<row data-node="tbl.t_order_item_9" values="110900, 1109, 11, init, 2017-08-19" />
<row data-node="tbl.t_order_item_9" values="110901, 1109, 11, init, 2017-08-19" />
<row data-node="tbl.t_broadcast_table" values="1, init" />
- <row data-node="tbl.key_word" values="1, init" />
</dataset>
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env/tbl/schema.xml b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env/tbl/schema.xml
index ef1cc08..66b1cd4 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env/tbl/schema.xml
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env/tbl/schema.xml
@@ -52,7 +52,6 @@
<sql>CREATE TABLE t_order_item_8 (item_id INT NOT NULL, order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, creation_date DATE, PRIMARY KEY (item_id))</sql>
<sql>CREATE TABLE t_order_item_9 (item_id INT NOT NULL, order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, creation_date DATE, PRIMARY KEY (item_id))</sql>
<sql>CREATE TABLE t_broadcast_table (id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (id))</sql>
- <sql>CREATE TABLE key_word (id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (id))</sql>
</table-create>
<table-drop>
<sql>DROP TABLE t_order_0</sql>
@@ -76,6 +75,5 @@
<sql>DROP TABLE t_order_item_8</sql>
<sql>DROP TABLE t_order_item_9</sql>
<sql>DROP TABLE t_broadcast_table</sql>
- <sql>DROP TABLE key_word</sql>
</table-drop>
</schema>