You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by du...@apache.org on 2021/01/03 13:07:06 UTC

[shardingsphere] branch master updated: Add it property keys to same prefix (#8868)

This is an automated email from the ASF dual-hosted git repository.

duanzhengqiang 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 8ee6792  Add it property keys to same prefix (#8868)
8ee6792 is described below

commit 8ee679240b695d2801c22e2419acba4884fa0fe9
Author: Liang Zhang <te...@163.com>
AuthorDate: Sun Jan 3 21:04:52 2021 +0800

    Add it property keys to same prefix (#8868)
---
 .../test-engine/integration-test-engine.cn.md      | 40 ++++++++++----------
 .../test-engine/integration-test-engine.en.md      | 40 ++++++++++----------
 .../integration/env/IntegrateTestEnvironment.java  | 24 ++++++------
 .../test/resources/integrate/env-native.properties | 44 +++++++++++-----------
 .../test/resources/integrate/env-proxy.properties  | 30 +++++++--------
 5 files changed, 89 insertions(+), 89 deletions(-)

diff --git a/docs/document/content/features/test-engine/integration-test-engine.cn.md b/docs/document/content/features/test-engine/integration-test-engine.cn.md
index feaa069..df2800d 100644
--- a/docs/document/content/features/test-engine/integration-test-engine.cn.md
+++ b/docs/document/content/features/test-engine/integration-test-engine.cn.md
@@ -30,37 +30,37 @@ Junit 中的 `Parameterized` 会聚合起所有的测试数据,并将测试数
 
 ```properties
 # 测试主键,并发,column index等的开关
-run.additional.cases=false
+it.run.additional.cases=false
 
-# 分片策略,可指定多种策略
-sharding.rule.type=db,tbl,dbtbl_with_replica_query,replica_query
+# 测试场景,可指定多种规则
+it.scenarios=db,tbl,dbtbl_with_replica_query,replica_query
 
 # 要测试的数据库,可以指定多种数据库(H2,MySQL,Oracle,SQLServer,PostgreSQL)
-databases=MySQL,PostgreSQL
+it.databases=MySQL,PostgreSQL
 
 # MySQL配置
-mysql.host=127.0.0.1
-mysql.port=13306
-mysql.username=root
-mysql.password=root
+it.mysql.host=127.0.0.1
+it.mysql.port=13306
+it.mysql.username=root
+it.mysql.password=root
 
 ## PostgreSQL配置
-postgresql.host=db.psql
-postgresql.port=5432
-postgresql.username=postgres
-postgresql.password=postgres
+it.postgresql.host=db.psql
+it.postgresql.port=5432
+it.postgresql.username=postgres
+it.postgresql.password=postgres
 
 ## SQLServer配置
-sqlserver.host=db.mssql
-sqlserver.port=1433
-sqlserver.username=sa
-sqlserver.password=Jdbc1234
+it.sqlserver.host=db.mssql
+it.sqlserver.port=1433
+it.sqlserver.username=sa
+it.sqlserver.password=Jdbc1234
 
 ## Oracle配置
-oracle.host=db.oracle
-oracle.port=1521
-oracle.username=jdbc
-oracle.password=jdbc
+it.oracle.host=db.oracle
+it.oracle.port=1521
+it.oracle.username=jdbc
+it.oracle.password=jdbc
 ```
 
 其次,修改文件 `/shardingsphere-test-suite/src/test/resources/integrate/env/SQL-TYPE/dataset.xml` 
diff --git a/docs/document/content/features/test-engine/integration-test-engine.en.md b/docs/document/content/features/test-engine/integration-test-engine.en.md
index f278de8..5abc61b 100644
--- a/docs/document/content/features/test-engine/integration-test-engine.en.md
+++ b/docs/document/content/features/test-engine/integration-test-engine.en.md
@@ -29,37 +29,37 @@ Firstly, setup configuration file `/shardingsphere-test-suite/src/test/resources
 
 ```properties
 # the switch for PK, concurrent, column index testing and so on
-run.additional.cases=false
+it.run.additional.cases=false
 
-# sharding rule, could define multiple rules
-sharding.rule.type=db,tbl,dbtbl_with_replica_query_,replica_query_
+# test scenarios, could define multiple rules
+it.scenarios=db,tbl,dbtbl_with_replica_query_,replica_query_
 
 # database type, could define multiple databases(H2,MySQL,Oracle,SQLServer,PostgreSQL)
-databases=MySQL,PostgreSQL
+it.databases=MySQL,PostgreSQL
 
 # MySQL configuration
-mysql.host=127.0.0.1
-mysql.port=13306
-mysql.username=root
-mysql.password=root
+it.mysql.host=127.0.0.1
+it.mysql.port=13306
+it.mysql.username=root
+it.mysql.password=root
 
 ## PostgreSQL configuration
-postgresql.host=db.psql
-postgresql.port=5432
-postgresql.username=postgres
-postgresql.password=postgres
+it.postgresql.host=db.psql
+it.postgresql.port=5432
+it.postgresql.username=postgres
+it.postgresql.password=postgres
 
 ## SQLServer configuration
-sqlserver.host=db.mssql
-sqlserver.port=1433
-sqlserver.username=sa
-sqlserver.password=Jdbc1234
+it.sqlserver.host=db.mssql
+it.sqlserver.port=1433
+it.sqlserver.username=sa
+it.sqlserver.password=Jdbc1234
 
 ## Oracle configuration
-oracle.host=db.oracle
-oracle.port=1521
-oracle.username=jdbc
-oracle.password=jdbc
+it.oracle.host=db.oracle
+it.oracle.port=1521
+it.oracle.username=jdbc
+it.oracle.password=jdbc
 ```
 
 Secondly, setup configuration file `/shardingsphere-test-suite/src/test/resources/integrate/env/SQL-TYPE/dataset.xml`. 
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/env/IntegrateTestEnvironment.java b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/env/IntegrateTestEnvironment.java
index c23d4b5..fd90a58 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/env/IntegrateTestEnvironment.java
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/test/integration/env/IntegrateTestEnvironment.java
@@ -52,9 +52,9 @@ public final class IntegrateTestEnvironment {
     private IntegrateTestEnvironment() {
         activeProfile = loadProperties("integrate/profile.properties").getProperty("mode");
         Properties envProps = IntegrateTestEnvironmentType.valueFromProfileName(activeProfile).loadProperties();
-        adapters = Splitter.on(",").trimResults().splitToList(envProps.getProperty("adapters"));
-        runAdditionalTestCases = Boolean.parseBoolean(envProps.getProperty("run.additional.cases"));
-        scenarios = Splitter.on(",").trimResults().splitToList(envProps.getProperty("scenarios"));
+        adapters = Splitter.on(",").trimResults().splitToList(envProps.getProperty("it.adapters"));
+        runAdditionalTestCases = Boolean.parseBoolean(envProps.getProperty("it.run.additional.cases"));
+        scenarios = Splitter.on(",").trimResults().splitToList(envProps.getProperty("it.scenarios"));
         databaseEnvironments = createDatabaseEnvironments(envProps);
     }
     
@@ -70,7 +70,7 @@ public final class IntegrateTestEnvironment {
     
     private Map<DatabaseType, DatabaseEnvironment> createDatabaseEnvironments(final Properties envProps) {
         Collection<DatabaseType> databaseTypes = Arrays.stream(
-                envProps.getProperty("databases", "H2").split(",")).map(each -> DatabaseTypeRegistry.getActualDatabaseType(each.trim())).collect(Collectors.toList());
+                envProps.getProperty("it.databases", "H2").split(",")).map(each -> DatabaseTypeRegistry.getActualDatabaseType(each.trim())).collect(Collectors.toList());
         Map<DatabaseType, DatabaseEnvironment> result = new LinkedHashMap<>(databaseTypes.size(), 1);
         for (DatabaseType each : databaseTypes) {
             result.put(each, createDatabaseEnvironment(each, envProps));
@@ -83,17 +83,17 @@ public final class IntegrateTestEnvironment {
             case "H2":
                 return new DatabaseEnvironment(databaseType, "", 0, "sa", "");
             case "MySQL":
-                return new DatabaseEnvironment(databaseType, envProps.getProperty("mysql.host", "127.0.0.1"), Integer.parseInt(envProps.getProperty("mysql.port", "3306")),
-                        envProps.getProperty("mysql.username", "root"), envProps.getProperty("mysql.password", ""));
+                return new DatabaseEnvironment(databaseType, envProps.getProperty("it.mysql.host", "127.0.0.1"), Integer.parseInt(envProps.getProperty("it.mysql.port", "3306")),
+                        envProps.getProperty("it.mysql.username", "root"), envProps.getProperty("it.mysql.password", ""));
             case "PostgreSQL":
-                return new DatabaseEnvironment(databaseType, envProps.getProperty("postgresql.host", "127.0.0.1"), Integer.parseInt(envProps.getProperty("postgresql.port", "5432")),
-                        envProps.getProperty("postgresql.username", "postgres"), envProps.getProperty("postgresql.password", ""));
+                return new DatabaseEnvironment(databaseType, envProps.getProperty("it.postgresql.host", "127.0.0.1"), Integer.parseInt(envProps.getProperty("it.postgresql.port", "5432")),
+                        envProps.getProperty("it.postgresql.username", "postgres"), envProps.getProperty("it.postgresql.password", ""));
             case "SQLServer":
-                return new DatabaseEnvironment(databaseType, envProps.getProperty("sqlserver.host", "127.0.0.1"), Integer.parseInt(envProps.getProperty("sqlserver.port", "1433")),
-                        envProps.getProperty("sqlserver.username", "sa"), envProps.getProperty("sqlserver.password", "Jdbc1234"));
+                return new DatabaseEnvironment(databaseType, envProps.getProperty("it.sqlserver.host", "127.0.0.1"), Integer.parseInt(envProps.getProperty("it.sqlserver.port", "1433")),
+                        envProps.getProperty("it.sqlserver.username", "sa"), envProps.getProperty("it.sqlserver.password", "Jdbc1234"));
             case "Oracle":
-                return new DatabaseEnvironment(databaseType, envProps.getProperty("oracle.host", "127.0.0.1"), Integer.parseInt(envProps.getProperty("oracle.port", "1521")),
-                        envProps.getProperty("oracle.username", "jdbc"), envProps.getProperty("oracle.password", "jdbc"));
+                return new DatabaseEnvironment(databaseType, envProps.getProperty("it.oracle.host", "127.0.0.1"), Integer.parseInt(envProps.getProperty("it.oracle.port", "1521")),
+                        envProps.getProperty("it.oracle.username", "jdbc"), envProps.getProperty("it.oracle.password", "jdbc"));
             default:
                 throw new UnsupportedOperationException(databaseType.getName());
         }
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env-native.properties b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env-native.properties
index f01123a..3d22d9f 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env-native.properties
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env-native.properties
@@ -15,31 +15,31 @@
 # limitations under the License.
 #
 
-adapters=jdbc
+it.adapters=jdbc
 
-run.additional.cases=false
-#scenarios=db,tbl,dbtbl_with_replica_query,replica_query,shadow
-scenarios=db,tbl,dbtbl_with_replica_query,replica_query
+it.run.additional.cases=false
+#it.scenarios=db,tbl,dbtbl_with_replica_query,replica_query,shadow
+it.scenarios=db,tbl,dbtbl_with_replica_query,replica_query
 
-#databases=H2,MySQL,Oracle,SQLServer,PostgreSQL
-databases=H2
+#it.databases=H2,MySQL,Oracle,SQLServer,PostgreSQL
+it.databases=H2
 
-mysql.host=db.mysql
-mysql.port=3306
-mysql.username=root
-mysql.password=
+it.mysql.host=db.mysql
+it.mysql.port=3306
+it.mysql.username=root
+it.mysql.password=
 
-postgresql.host=db.psql
-postgresql.port=5432
-postgresql.username=postgres
-postgresql.password=postgres
+it.postgresql.host=db.psql
+it.postgresql.port=5432
+it.postgresql.username=postgres
+it.postgresql.password=postgres
 
-sqlserver.host=db.mssql
-sqlserver.port=1433
-sqlserver.username=sa
-sqlserver.password=Jdbc1234
+it.sqlserver.host=db.mssql
+it.sqlserver.port=1433
+it.sqlserver.username=sa
+it.sqlserver.password=Jdbc1234
 
-oracle.host=db.oracle
-oracle.port=1521
-oracle.username=jdbc
-oracle.password=jdbc
+it.oracle.host=db.oracle
+it.oracle.port=1521
+it.oracle.username=jdbc
+it.oracle.password=jdbc
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env-proxy.properties b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env-proxy.properties
index ebb2e80..bd2f3d7 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env-proxy.properties
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-test-suite/src/test/resources/integrate/env-proxy.properties
@@ -15,22 +15,22 @@
 # limitations under the License.
 #
 
-adapters=proxy
-#adapters=jdbc,proxy
+it.adapters=proxy
+#it.adapters=jdbc,proxy
 
-run.additional.cases=false
-#scenarios=db,tbl,dbtbl_with_masterslave,masterslave,shadow
-scenarios=db
+it.run.additional.cases=false
+#it.scenarios=db,tbl,dbtbl_with_masterslave,masterslave,shadow
+it.scenarios=db
 
-#databases=H2,MySQL,Oracle,SQLServer,PostgreSQL
-databases=MySQL
+#it.databases=H2,MySQL,Oracle,SQLServer,PostgreSQL
+it.databases=MySQL
 
-mysql.host=127.0.0.1
-mysql.port=33060
-mysql.username=root
-mysql.password=
+it.mysql.host=127.0.0.1
+it.mysql.port=33060
+it.mysql.username=root
+it.mysql.password=
 
-postgresql.host=127.0.0.1
-postgresql.port=57320
-postgresql.username=postgres
-postgresql.password=postgres
+it.postgresql.host=127.0.0.1
+it.postgresql.port=57320
+it.postgresql.username=postgres
+it.postgresql.password=postgres