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

zhangliang 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 ee77ead4c66 Refactor E2ETestEnvironment (#36657)
ee77ead4c66 is described below

commit ee77ead4c6692150d037f5e01a9a7821b498ed44
Author: Liang Zhang <[email protected]>
AuthorDate: Sun Sep 21 23:14:42 2025 +0800

    Refactor E2ETestEnvironment (#36657)
    
    * Refactor E2ETestEnvironment
    
    * Refactor E2ETestEnvironment
---
 .../shardingsphere/test/e2e/env/runtime/E2ETestEnvironment.java  | 9 +++++----
 test/e2e/sql/src/test/resources/env/it-env.properties            | 6 +++---
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git 
a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/runtime/E2ETestEnvironment.java
 
b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/runtime/E2ETestEnvironment.java
index 15deb0beabe..1ba23fccdc6 100644
--- 
a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/runtime/E2ETestEnvironment.java
+++ 
b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/runtime/E2ETestEnvironment.java
@@ -30,6 +30,7 @@ import java.io.InputStream;
 import java.util.Collection;
 import java.util.Properties;
 import java.util.TimeZone;
+import java.util.stream.Collectors;
 
 /**
  * E2E test environment.
@@ -39,21 +40,21 @@ public final class E2ETestEnvironment {
     
     private static final E2ETestEnvironment INSTANCE = new 
E2ETestEnvironment();
     
+    private final Collection<String> scenarios;
+    
     private final RunEnvironment runEnvironment;
     
     private final ClusterEnvironment clusterEnvironment;
     
     private final NativeStorageEnvironment nativeStorageEnvironment;
     
-    private final Collection<String> scenarios;
-    
     private E2ETestEnvironment() {
         Properties props = loadProperties();
         
TimeZone.setDefault(TimeZone.getTimeZone(props.getProperty("it.timezone", 
"UTC")));
+        scenarios = getScenarios(props);
         runEnvironment = new RunEnvironment(props);
         clusterEnvironment = new ClusterEnvironment(props);
         nativeStorageEnvironment = new NativeStorageEnvironment(props);
-        scenarios = getScenarios(props);
     }
     
     @SneakyThrows(IOException.class)
@@ -69,7 +70,7 @@ public final class E2ETestEnvironment {
     }
     
     private Collection<String> getScenarios(final Properties props) {
-        Collection<String> result = 
Splitter.on(",").trimResults().splitToList(props.getProperty("it.scenarios", 
""));
+        Collection<String> result = 
Splitter.on(",").trimResults().splitToList(props.getProperty("it.scenarios", 
"")).stream().filter(each -> !each.isEmpty()).collect(Collectors.toList());
         for (String each : result) {
             new ScenarioCommonPath(each).checkFolderExist();
         }
diff --git a/test/e2e/sql/src/test/resources/env/it-env.properties 
b/test/e2e/sql/src/test/resources/env/it-env.properties
index f50264849e2..582ff7d9bb1 100644
--- a/test/e2e/sql/src/test/resources/env/it-env.properties
+++ b/test/e2e/sql/src/test/resources/env/it-env.properties
@@ -15,14 +15,14 @@
 # limitations under the License.
 #
 
+#it.scenarios=db,tbl,readwrite_splitting,encrypt,shadow,dbtbl_with_readwrite_splitting,dbtbl_with_readwrite_splitting_and_encrypt,distsql_rdl,empty_rules,sharding_and_encrypt,encrypt_and_readwrite_splitting,encrypt_shadow,readwrite_splitting_and_shadow,sharding_and_shadow,sharding_encrypt_shadow,mask,mask_encrypt,mask_sharding,mask_encrypt_sharding,db_tbl_sql_federation
+it.scenarios=db,tbl,readwrite_splitting,encrypt,shadow,dbtbl_with_readwrite_splitting,dbtbl_with_readwrite_splitting_and_encrypt,distsql_rdl,empty_rules,sharding_and_encrypt,encrypt_and_readwrite_splitting,encrypt_shadow,readwrite_splitting_and_shadow,sharding_and_shadow,sharding_encrypt_shadow,mask,mask_encrypt,mask_sharding,mask_encrypt_sharding,db_tbl_sql_federation
+
 #it.run.modes=Standalone,Cluster
 it.run.modes=
 it.run.additional.cases=false
 it.run.smoke.cases=false
 
-#it.scenarios=db,tbl,readwrite_splitting,encrypt,shadow,dbtbl_with_readwrite_splitting,dbtbl_with_readwrite_splitting_and_encrypt,distsql_rdl,empty_rules,sharding_and_encrypt,encrypt_and_readwrite_splitting,encrypt_shadow,readwrite_splitting_and_shadow,sharding_and_shadow,sharding_encrypt_shadow,mask,mask_encrypt,mask_sharding,mask_encrypt_sharding,db_tbl_sql_federation
-it.scenarios=db,tbl,readwrite_splitting,encrypt,shadow,dbtbl_with_readwrite_splitting,dbtbl_with_readwrite_splitting_and_encrypt,distsql_rdl,empty_rules,sharding_and_encrypt,encrypt_and_readwrite_splitting,encrypt_shadow,readwrite_splitting_and_shadow,sharding_and_shadow,sharding_encrypt_shadow,mask,mask_encrypt,mask_sharding,mask_encrypt_sharding,db_tbl_sql_federation
-
 # it.cluster.env.type=DOCKER,NATIVE
 it.cluster.env.type=DOCKER
 

Reply via email to