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 2022/07/27 05:12:20 UTC

[shardingsphere] branch master updated: Refactor : update the IT document by current situation (#19547) (#19593)

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 80cd538b2e8 Refactor : update the IT document by current situation (#19547) (#19593)
80cd538b2e8 is described below

commit 80cd538b2e8a0bb46180d2544e19d2005ef1fa4e
Author: 孙念君 Nianjun Sun <su...@sphere-ex.com>
AuthorDate: Wed Jul 27 13:12:14 2022 +0800

    Refactor : update the IT document by current situation (#19547) (#19593)
    
    * Refactor : update the IT document by current situation (#19547)
    
    * Fix : fix a spelling error
    
    * Fix : fix a spelling error
---
 .../content/test-manual/integration-test/_index.cn.md    | 16 ++++++++--------
 .../content/test-manual/integration-test/_index.en.md    |  3 +++
 2 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/docs/document/content/test-manual/integration-test/_index.cn.md b/docs/document/content/test-manual/integration-test/_index.cn.md
index 5ac4f6206f0..35246036c8e 100644
--- a/docs/document/content/test-manual/integration-test/_index.cn.md
+++ b/docs/document/content/test-manual/integration-test/_index.cn.md
@@ -20,12 +20,11 @@ weight = 1
 
 环境准备方式分为 Native 和 Docker,未来还将增加 Embed 类型的支持。
 
-  - Native 环境用于测试用例直接运行在开发者提供的测试环境中,适于调试场景;
-  - Docker 环境由 Maven 运行 Docker-Compose 插件直接搭建,适用于云编译环境和测试 ShardingSphere-Proxy 的场景,如:GitHub Action;
+  - Native 环境用于测试用例直接运行在开发者提供的测试环境中,适用于调试场景。
+  - Docker 环境由 Testcontainer 创建,适用于云编译环境和测试 ShardingSphere-Proxy 的场景,如:GitHub Action。
   - Embed 环境由测试框架自动搭建嵌入式 MySQL,适用于 ShardingSphere-JDBC 的本地环境测试。
 
-当前默认采用 Native 环境,使用 ShardingSphere-JDBC + H2 数据库运行测试用例。
-通过 Maven 的 `-Pit.env.docker` 参数可以指定 Docker 环境的运行方式。
+当前默认采用 Docker 环境,使用 Testcontainer 创建运行时环境并执行测试用例。
 未来将采用 Embed 环境的 ShardingSphere-JDBC + MySQL,替换 Native 执行测试用例的默认环境类型。 
 
 数据库类型目前支持 MySQL、PostgreSQL、SQLServer 和 Oracle,并且可以支持使用 ShardingSphere-JDBC 或是使用 ShardingSphere-Proxy 执行测试用例。
@@ -98,7 +97,7 @@ SQL 用例在 `resources/cases/${SQL-TYPE}/${SQL-TYPE}-integration-test-cases.xm
 
 #### Native 环境配置
 
-目录:`src/test/resources/env/${SCENARIO-TYPE}`
+目录:`src/test/resources/env/scenario/${SCENARIO-TYPE}`
 
   - `scenario-env.properties`: 数据源配置;
   - `rules.yaml`: 规则配置;
@@ -109,12 +108,11 @@ SQL 用例在 `resources/cases/${SQL-TYPE}/${SQL-TYPE}-integration-test-cases.xm
 
 #### Docker 环境配置
 
-目录:`src/test/resources/docker/${SCENARIO-TYPE}`
+目录:`src/test/resources/env/${SCENARIO-TYPE}`
 
-  - `docker-compose.yml`: Docker-Compose 配置文件,用于 Docker 环境启动;
   - `proxy/conf/config-${SCENARIO-TYPE}.yaml`: 规则配置。
 
-**Docker 环境配置为 ShardingSphere-Proxy 提供了远程调试端口,可以在 `docker-compose.yml` 文件的 `shardingsphere-proxy` 中找到第 2 个暴露的端口用于远程调试。**
+**Docker 环境配置为 ShardingSphere-Proxy 提供了远程调试端口,可以在 `shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-fixture/src/test/assembly/bin/start.sh` 文件的 `JAVA_OPTS` 中找到第 2 个暴露的端口用于远程调试。**
 
 ### 运行测试引擎
 
@@ -125,6 +123,8 @@ SQL 用例在 `resources/cases/${SQL-TYPE}/${SQL-TYPE}-integration-test-cases.xm
 所有的属性值都可以通过 Maven 命令行 `-D` 的方式动态注入。
 
 ```properties
+# 运行模式,多个值可用逗号分隔。可选值:Standalone, Cluster
+it.run.modes=Cluster
 
 # 场景类型,多个值可用逗号分隔。可选值:db, tbl, dbtbl_with_replica_query, replica_query
 it.scenarios=db,tbl,dbtbl_with_replica_query,replica_query
diff --git a/docs/document/content/test-manual/integration-test/_index.en.md b/docs/document/content/test-manual/integration-test/_index.en.md
index f78bc34b382..fb15ad064ea 100644
--- a/docs/document/content/test-manual/integration-test/_index.en.md
+++ b/docs/document/content/test-manual/integration-test/_index.en.md
@@ -32,6 +32,9 @@ Integration test depends on existed database environment, developer need to setu
 Firstly, setup configuration file `/shardingsphere-integration-test-suite/src/test/resources/env-native.properties`, for example: 
 
 ```properties
+# running mode,could define multiple mode(Standalone,Cluster)
+it.run.modes=Cluster
+
 # the switch for PK, concurrent, column index testing and so on
 it.run.additional.cases=false