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 27da85e9e04 Merge PipelineE2EEnvironment and E2ETestEnvironment 
(#36732)
27da85e9e04 is described below

commit 27da85e9e04e1bd9bee335d0242fa1f1a1529159
Author: Liang Zhang <[email protected]>
AuthorDate: Sun Sep 28 12:46:11 2025 +0800

    Merge PipelineE2EEnvironment and E2ETestEnvironment (#36732)
---
 .../pipeline/cases/PipelineContainerComposer.java  |  4 +-
 .../pipeline/env/PipelineE2EEnvironment.java       | 45 ----------------------
 .../operation/pipeline/env/PipelineProxyType.java  | 23 -----------
 .../docker/PipelineDockerContainerComposer.java    |  8 ++--
 .../src/test/resources/env/e2e-env.properties      |  2 -
 5 files changed, 5 insertions(+), 77 deletions(-)

diff --git 
a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/operation/pipeline/cases/PipelineContainerComposer.java
 
b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/operation/pipeline/cases/PipelineContainerComposer.java
index a562966c06f..1fc54fca819 100644
--- 
a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/operation/pipeline/cases/PipelineContainerComposer.java
+++ 
b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/operation/pipeline/cases/PipelineContainerComposer.java
@@ -49,8 +49,6 @@ import 
org.apache.shardingsphere.test.e2e.env.container.util.StorageContainerUti
 import org.apache.shardingsphere.test.e2e.env.runtime.E2ETestEnvironment;
 import org.apache.shardingsphere.test.e2e.env.runtime.type.RunEnvironment.Type;
 import 
org.apache.shardingsphere.test.e2e.operation.pipeline.command.ExtraSQLCommand;
-import 
org.apache.shardingsphere.test.e2e.operation.pipeline.env.PipelineE2EEnvironment;
-import 
org.apache.shardingsphere.test.e2e.operation.pipeline.env.PipelineProxyType;
 import 
org.apache.shardingsphere.test.e2e.operation.pipeline.framework.container.compose.PipelineBaseContainerComposer;
 import 
org.apache.shardingsphere.test.e2e.operation.pipeline.framework.container.compose.docker.PipelineDockerContainerComposer;
 import 
org.apache.shardingsphere.test.e2e.operation.pipeline.framework.container.compose.natived.PipelineNativeContainerComposer;
@@ -255,7 +253,7 @@ public final class PipelineContainerComposer implements 
AutoCloseable {
         String registerStorageUnitTemplate = "REGISTER STORAGE UNIT ${ds} ( 
URL='${url}', USER='${user}', PASSWORD='${password}')".replace("${ds}", 
storageUnitName)
                 .replace("${user}", username)
                 .replace("${password}", getPassword())
-                .replace("${url}", getActualJdbcUrlTemplate(storageUnitName, 
PipelineE2EEnvironment.getInstance().getProxyType() == PipelineProxyType.NONE));
+                .replace("${url}", getActualJdbcUrlTemplate(storageUnitName, 
Type.DOCKER == E2ETestEnvironment.getInstance().getRunEnvironment().getType()));
         proxyExecuteWithLog(registerStorageUnitTemplate, 0);
         int timeout = databaseType instanceof OpenGaussDatabaseType ? 60 : 10;
         Awaitility.await().ignoreExceptions().atMost(timeout, 
TimeUnit.SECONDS).pollInterval(3L, TimeUnit.SECONDS).until(() -> 
showStorageUnitsName().contains(storageUnitName));
diff --git 
a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/operation/pipeline/env/PipelineE2EEnvironment.java
 
b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/operation/pipeline/env/PipelineE2EEnvironment.java
deleted file mode 100644
index dfa40998ecc..00000000000
--- 
a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/operation/pipeline/env/PipelineE2EEnvironment.java
+++ /dev/null
@@ -1,45 +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.
- */
-
-package org.apache.shardingsphere.test.e2e.operation.pipeline.env;
-
-import lombok.Getter;
-import 
org.apache.shardingsphere.test.e2e.env.runtime.EnvironmentPropertiesLoader;
-
-import java.util.Properties;
-
-@Getter
-public final class PipelineE2EEnvironment {
-    
-    private static final PipelineE2EEnvironment INSTANCE = new 
PipelineE2EEnvironment();
-    
-    private final PipelineProxyType proxyType;
-    
-    private PipelineE2EEnvironment() {
-        Properties props = EnvironmentPropertiesLoader.loadProperties();
-        proxyType = 
PipelineProxyType.valueOf(props.getProperty("e2e.pipeline.proxy.type", 
PipelineProxyType.NONE.name()).toUpperCase());
-    }
-    
-    /**
-     * Get instance.
-     *
-     * @return singleton instance
-     */
-    public static PipelineE2EEnvironment getInstance() {
-        return INSTANCE;
-    }
-}
diff --git 
a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/operation/pipeline/env/PipelineProxyType.java
 
b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/operation/pipeline/env/PipelineProxyType.java
deleted file mode 100644
index e8d6e08c221..00000000000
--- 
a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/operation/pipeline/env/PipelineProxyType.java
+++ /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.
- */
-
-package org.apache.shardingsphere.test.e2e.operation.pipeline.env;
-
-public enum PipelineProxyType {
-    
-    NONE, INTERNAL
-}
diff --git 
a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/operation/pipeline/framework/container/compose/docker/PipelineDockerContainerComposer.java
 
b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/operation/pipeline/framework/container/compose/docker/PipelineDockerContainerComposer.java
index 5ea59d3b844..3d711d97870 100644
--- 
a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/operation/pipeline/framework/container/compose/docker/PipelineDockerContainerComposer.java
+++ 
b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/operation/pipeline/framework/container/compose/docker/PipelineDockerContainerComposer.java
@@ -29,8 +29,8 @@ import 
org.apache.shardingsphere.test.e2e.env.container.governance.GovernanceCon
 import 
org.apache.shardingsphere.test.e2e.env.container.governance.option.GovernanceContainerOption;
 import 
org.apache.shardingsphere.test.e2e.env.container.storage.option.StorageContainerOption;
 import 
org.apache.shardingsphere.test.e2e.env.container.storage.type.DockerStorageContainer;
-import 
org.apache.shardingsphere.test.e2e.operation.pipeline.env.PipelineE2EEnvironment;
-import 
org.apache.shardingsphere.test.e2e.operation.pipeline.env.PipelineProxyType;
+import org.apache.shardingsphere.test.e2e.env.runtime.E2ETestEnvironment;
+import org.apache.shardingsphere.test.e2e.env.runtime.type.RunEnvironment.Type;
 import 
org.apache.shardingsphere.test.e2e.operation.pipeline.framework.container.compose.PipelineBaseContainerComposer;
 import 
org.apache.shardingsphere.test.e2e.operation.pipeline.framework.container.config.proxy.PipelineProxyContainerConfigurationFactory;
 import 
org.apache.shardingsphere.test.e2e.operation.pipeline.util.ProxyDatabaseTypeUtils;
@@ -64,7 +64,7 @@ public final class PipelineDockerContainerComposer extends 
PipelineBaseContainer
         }
         AdaptorContainerConfiguration containerConfig = 
PipelineProxyContainerConfigurationFactory.newInstance(databaseType);
         DatabaseType proxyDatabaseType = 
ProxyDatabaseTypeUtils.getProxyDatabaseType(databaseType);
-        if (PipelineProxyType.INTERNAL == 
PipelineE2EEnvironment.getInstance().getProxyType()) {
+        if (Type.DOCKER == 
E2ETestEnvironment.getInstance().getRunEnvironment().getType()) {
             ShardingSphereProxyEmbeddedContainer proxyContainer = new 
ShardingSphereProxyEmbeddedContainer(proxyDatabaseType, containerConfig);
             for (DockerStorageContainer each : storageContainers) {
                 proxyContainer.dependsOn(governanceContainer, each);
@@ -83,7 +83,7 @@ public final class PipelineDockerContainerComposer extends 
PipelineBaseContainer
     public String getProxyJdbcUrl(final String databaseName) {
         String host;
         int port;
-        if (PipelineProxyType.INTERNAL == 
PipelineE2EEnvironment.getInstance().getProxyType()) {
+        if (Type.NATIVE == 
E2ETestEnvironment.getInstance().getRunEnvironment().getType()) {
             host = "127.0.0.1";
             port = 3307;
         } else {
diff --git 
a/test/e2e/operation/pipeline/src/test/resources/env/e2e-env.properties 
b/test/e2e/operation/pipeline/src/test/resources/env/e2e-env.properties
index 94fc8734002..43854a468d9 100644
--- a/test/e2e/operation/pipeline/src/test/resources/env/e2e-env.properties
+++ b/test/e2e/operation/pipeline/src/test/resources/env/e2e-env.properties
@@ -17,8 +17,6 @@
 #e2e.run.type=DOCKER,NATIVE
 e2e.run.type=
 
-#e2e.pipeline.proxy.type=INTERNAL
-
 #e2e.docker.database.mysql.image=mysql:5.7,mysql:8.0
 e2e.docker.database.mysql.image=
 
#e2e.docker.database.postgresql.image=postgres:10-alpine,postgres:11-alpine,postgres:12-alpine,postgres:13-alpine,postgres:14-alpine

Reply via email to