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 2021/02/04 11:25:41 UTC
[shardingsphere] branch master updated: Use embedded MySQL as
default test cases (#9327)
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 c77cd07 Use embedded MySQL as default test cases (#9327)
c77cd07 is described below
commit c77cd071f9863ac518dff3cfdf0513bac33105c9
Author: Liang Zhang <te...@163.com>
AuthorDate: Thu Feb 4 19:25:09 2021 +0800
Use embedded MySQL as default test cases (#9327)
* Remove useless codes
* Refactor IntegrationTestEnvironment
* Use embedded MySQL as default test cases
---
.../integration/env/IntegrationTestEnvironment.java | 2 +-
.../env/props/DatabaseScenarioProperties.java | 20 --------------------
.../src/test/resources/env/engine-env.properties | 4 ++--
3 files changed, 3 insertions(+), 23 deletions(-)
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/env/IntegrationTestEnvironment.java b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/env/IntegrationTestEnvironment.java
index e44268a..db1835d 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/env/IntegrationTestEnvironment.java
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/env/IntegrationTestEnvironment.java
@@ -106,7 +106,7 @@ public final class IntegrationTestEnvironment {
}
private Collection<DatabaseType> getDatabaseTypes(final Properties engineEnvProps) {
- return Arrays.stream(engineEnvProps.getProperty("it.databases", "H2").split(",")).map(each -> DatabaseTypeRegistry.getActualDatabaseType(each.trim())).collect(Collectors.toList());
+ return Arrays.stream(engineEnvProps.getProperty("it.databases").split(",")).map(each -> DatabaseTypeRegistry.getActualDatabaseType(each.trim())).collect(Collectors.toList());
}
private Map<DatabaseType, Map<String, DataSourceEnvironment>> createDataSourceEnvironments(final Collection<DatabaseType> databaseTypes,
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/env/props/DatabaseScenarioProperties.java b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/env/props/DatabaseScenarioProperties.java
index 0da0833..57fbfc2 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/env/props/DatabaseScenarioProperties.java
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/env/props/DatabaseScenarioProperties.java
@@ -107,24 +107,4 @@ public final class DatabaseScenarioProperties {
public String getProxyPassword() {
return props.getProperty(String.format("it.%s.proxy.password", scenario));
}
-
- /**
- * Get database distribution URL.
- *
- * @param databaseType database type
- * @return database distribution URL
- */
- public String getDatabaseDistributionUrl(final DatabaseType databaseType) {
- return props.getProperty(String.format("it.%s.%s.distribution.url", scenario, databaseType.getName().toLowerCase()));
- }
-
- /**
- * Get database distribution version.
- *
- * @param databaseType database type
- * @return database distribution version
- */
- public String getDatabaseDistributionVersion(final DatabaseType databaseType) {
- return props.getProperty(String.format("it.%s.%s.distribution.version", scenario, databaseType.getName().toLowerCase()));
- }
}
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/engine-env.properties b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/engine-env.properties
index 68174f1..ef2330f 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/engine-env.properties
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/engine-env.properties
@@ -23,7 +23,7 @@ it.adapters=jdbc
#it.scenarios=db,tbl,dbtbl_with_replica_query,replica_query,shadow
it.scenarios=db,tbl,dbtbl_with_replica_query,replica_query
-#it.databases=H2,MySQL,Oracle,SQLServer,PostgreSQL
-it.databases=H2
+#it.databases=MySQL,Oracle,SQLServer,PostgreSQL
+it.databases=MySQL
it.run.additional.cases=false