You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2025/09/19 13:03:20 UTC

(shardingsphere) branch master updated: Merge ShardingSphereProxyStandaloneContainer and ShardingSphereProxyClusterContainer to ShardingSphereProxyDockerContainer (#36639)

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 52fb98a26ab Merge ShardingSphereProxyStandaloneContainer and ShardingSphereProxyClusterContainer to ShardingSphereProxyDockerContainer (#36639)
52fb98a26ab is described below

commit 52fb98a26ab1b7d5fd987640f3a70c7c0aeb13d4
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Fri Sep 19 21:03:12 2025 +0800

    Merge ShardingSphereProxyStandaloneContainer and ShardingSphereProxyClusterContainer to ShardingSphereProxyDockerContainer (#36639)
---
 .../agent/engine/env/AgentE2ETestEnvironment.java  |  4 +-
 .../container/adapter/AdapterContainerFactory.java | 18 +++---
 ...ava => ShardingSphereProxyDockerContainer.java} |  8 +--
 .../impl/ShardingSphereProxyEmbeddedContainer.java |  2 +-
 .../ShardingSphereProxyStandaloneContainer.java    | 73 ----------------------
 .../constants/ProxyContainerConstants.java         |  2 -
 .../docker/PipelineDockerContainerComposer.java    |  6 +-
 .../ClusterShowProcessListContainerComposer.java   |  7 +--
 .../TransactionDockerContainerComposer.java        |  4 +-
 .../compose/ContainerComposerRegistry.java         |  6 +-
 .../compose/mode/ClusterContainerComposer.java     |  5 +-
 .../compose/mode/StandaloneContainerComposer.java  |  5 +-
 12 files changed, 27 insertions(+), 113 deletions(-)

diff --git a/test/e2e/agent/engine/src/test/java/org/apache/shardingsphere/test/e2e/agent/engine/env/AgentE2ETestEnvironment.java b/test/e2e/agent/engine/src/test/java/org/apache/shardingsphere/test/e2e/agent/engine/env/AgentE2ETestEnvironment.java
index ca4b44d165e..34bc8c6780a 100644
--- a/test/e2e/agent/engine/src/test/java/org/apache/shardingsphere/test/e2e/agent/engine/env/AgentE2ETestEnvironment.java
+++ b/test/e2e/agent/engine/src/test/java/org/apache/shardingsphere/test/e2e/agent/engine/env/AgentE2ETestEnvironment.java
@@ -35,7 +35,7 @@ import org.apache.shardingsphere.test.e2e.env.container.DockerITContainer;
 import org.apache.shardingsphere.test.e2e.env.container.ITContainers;
 import org.apache.shardingsphere.test.e2e.env.container.adapter.config.AdaptorContainerConfiguration;
 import org.apache.shardingsphere.test.e2e.env.container.adapter.enums.AdapterType;
-import org.apache.shardingsphere.test.e2e.env.container.adapter.impl.ShardingSphereProxyClusterContainer;
+import org.apache.shardingsphere.test.e2e.env.container.adapter.impl.ShardingSphereProxyDockerContainer;
 import org.apache.shardingsphere.test.e2e.env.container.constants.ProxyContainerConstants;
 import org.apache.shardingsphere.test.e2e.env.container.governance.GovernanceContainer;
 import org.apache.shardingsphere.test.e2e.env.container.governance.option.GovernanceContainerOption;
@@ -115,7 +115,7 @@ public final class AgentE2ETestEnvironment {
     
     private void createProxyEnvironment(final DockerITContainer agentPluginContainer) {
         containers = new ITContainers(null);
-        ShardingSphereProxyClusterContainer proxyContainer = new ShardingSphereProxyClusterContainer(databaseType, getAdaptorContainerConfiguration());
+        ShardingSphereProxyDockerContainer proxyContainer = new ShardingSphereProxyDockerContainer(databaseType, getAdaptorContainerConfiguration());
         proxyContainer.withLogConsumer(testConfig.isLogEnabled() ? this::collectLogs : null);
         StorageContainer storageContainer = new DockerStorageContainer(imageConfig.getMysqlImage(), DatabaseTypedSPILoader.getService(StorageContainerOption.class, databaseType), null);
         proxyContainer.dependsOn(storageContainer);
diff --git a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/adapter/AdapterContainerFactory.java b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/adapter/AdapterContainerFactory.java
index 63dadd8a42a..56d50f63979 100644
--- a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/adapter/AdapterContainerFactory.java
+++ b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/adapter/AdapterContainerFactory.java
@@ -21,12 +21,10 @@ import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
 import org.apache.shardingsphere.database.connector.core.type.DatabaseType;
 import org.apache.shardingsphere.test.e2e.env.container.adapter.config.AdaptorContainerConfiguration;
-import org.apache.shardingsphere.test.e2e.env.container.adapter.enums.AdapterMode;
 import org.apache.shardingsphere.test.e2e.env.container.adapter.enums.AdapterType;
 import org.apache.shardingsphere.test.e2e.env.container.adapter.impl.ShardingSphereJdbcEmbeddedContainer;
-import org.apache.shardingsphere.test.e2e.env.container.adapter.impl.ShardingSphereProxyClusterContainer;
+import org.apache.shardingsphere.test.e2e.env.container.adapter.impl.ShardingSphereProxyDockerContainer;
 import org.apache.shardingsphere.test.e2e.env.container.adapter.impl.ShardingSphereProxyEmbeddedContainer;
-import org.apache.shardingsphere.test.e2e.env.container.adapter.impl.ShardingSphereProxyStandaloneContainer;
 import org.apache.shardingsphere.test.e2e.env.container.storage.StorageContainer;
 import org.apache.shardingsphere.test.e2e.env.runtime.cluster.ClusterEnvironment;
 import org.apache.shardingsphere.test.e2e.env.runtime.scenario.path.ScenarioCommonPath;
@@ -40,7 +38,6 @@ public final class AdapterContainerFactory {
     /**
      * Create new instance of adapter container.
      *
-     * @param mode adapter mode
      * @param adapter adapter type
      * @param databaseType database type
      * @param scenario scenario
@@ -50,11 +47,11 @@ public final class AdapterContainerFactory {
      * @return created instance
      * @throws RuntimeException runtime exception
      */
-    public static AdapterContainer newInstance(final AdapterMode mode, final AdapterType adapter, final DatabaseType databaseType, final String scenario,
+    public static AdapterContainer newInstance(final AdapterType adapter, final DatabaseType databaseType, final String scenario,
                                                final AdaptorContainerConfiguration containerConfig, final StorageContainer storageContainer, final String envType) {
         switch (adapter) {
             case PROXY:
-                return newProxyInstance(mode, databaseType, containerConfig, envType);
+                return newProxyInstance(databaseType, containerConfig, envType);
             case JDBC:
                 return new ShardingSphereJdbcEmbeddedContainer(storageContainer, new ScenarioCommonPath(scenario).getRuleConfigurationFile(databaseType));
             default:
@@ -62,10 +59,9 @@ public final class AdapterContainerFactory {
         }
     }
     
-    private static AdapterContainer newProxyInstance(final AdapterMode mode, final DatabaseType databaseType, final AdaptorContainerConfiguration containerConfig, final String envType) {
-        if (ClusterEnvironment.Type.NATIVE.name().equalsIgnoreCase(envType)) {
-            return new ShardingSphereProxyEmbeddedContainer(databaseType, containerConfig);
-        }
-        return AdapterMode.CLUSTER == mode ? new ShardingSphereProxyClusterContainer(databaseType, containerConfig) : new ShardingSphereProxyStandaloneContainer(databaseType, containerConfig);
+    private static AdapterContainer newProxyInstance(final DatabaseType databaseType, final AdaptorContainerConfiguration containerConfig, final String envType) {
+        return ClusterEnvironment.Type.NATIVE.name().equalsIgnoreCase(envType)
+                ? new ShardingSphereProxyEmbeddedContainer(databaseType, containerConfig)
+                : new ShardingSphereProxyDockerContainer(databaseType, containerConfig);
     }
 }
diff --git a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/adapter/impl/ShardingSphereProxyClusterContainer.java b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/adapter/impl/ShardingSphereProxyDockerContainer.java
similarity index 91%
rename from test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/adapter/impl/ShardingSphereProxyClusterContainer.java
rename to test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/adapter/impl/ShardingSphereProxyDockerContainer.java
index d43963d7316..3ef46599ad5 100644
--- a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/adapter/impl/ShardingSphereProxyClusterContainer.java
+++ b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/adapter/impl/ShardingSphereProxyDockerContainer.java
@@ -35,9 +35,9 @@ import java.time.temporal.ChronoUnit;
 import java.util.concurrent.atomic.AtomicReference;
 
 /**
- * ShardingSphere proxy container for cluster mode.
+ * ShardingSphere proxy docker container.
  */
-public final class ShardingSphereProxyClusterContainer extends DockerITContainer implements AdapterContainer {
+public final class ShardingSphereProxyDockerContainer extends DockerITContainer implements AdapterContainer {
     
     private final AdaptorContainerConfiguration config;
     
@@ -45,7 +45,7 @@ public final class ShardingSphereProxyClusterContainer extends DockerITContainer
     
     private final AtomicReference<DataSource> targetDataSourceProvider = new AtomicReference<>();
     
-    public ShardingSphereProxyClusterContainer(final DatabaseType databaseType, final AdaptorContainerConfiguration config) {
+    public ShardingSphereProxyDockerContainer(final DatabaseType databaseType, final AdaptorContainerConfiguration config) {
         super(ProxyContainerConstants.PROXY_CONTAINER_NAME_PREFIX, config.getAdapterContainerImage());
         this.config = config;
         dataSourceEnvironment = DatabaseTypedSPILoader.getService(DataSourceEnvironment.class, databaseType);
@@ -79,6 +79,6 @@ public final class ShardingSphereProxyClusterContainer extends DockerITContainer
     
     @Override
     public String getAbbreviation() {
-        return ProxyContainerConstants.PROXY_CONTAINER_ABBREVIATION;
+        return "proxy";
     }
 }
diff --git a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/adapter/impl/ShardingSphereProxyEmbeddedContainer.java b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/adapter/impl/ShardingSphereProxyEmbeddedContainer.java
index 9ad7169e6b9..77687d708b5 100644
--- a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/adapter/impl/ShardingSphereProxyEmbeddedContainer.java
+++ b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/adapter/impl/ShardingSphereProxyEmbeddedContainer.java
@@ -99,7 +99,7 @@ public final class ShardingSphereProxyEmbeddedContainer implements AdapterContai
     
     @Override
     public String getAbbreviation() {
-        return ProxyContainerConstants.PROXY_CONTAINER_ABBREVIATION;
+        return "proxy";
     }
     
     @Override
diff --git a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/adapter/impl/ShardingSphereProxyStandaloneContainer.java b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/adapter/impl/ShardingSphereProxyStandaloneContainer.java
deleted file mode 100644
index 01ea463ddde..00000000000
--- a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/adapter/impl/ShardingSphereProxyStandaloneContainer.java
+++ /dev/null
@@ -1,73 +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.env.container.adapter.impl;
-
-import org.apache.shardingsphere.database.connector.core.spi.DatabaseTypedSPILoader;
-import org.apache.shardingsphere.database.connector.core.type.DatabaseType;
-import org.apache.shardingsphere.test.e2e.env.container.DockerITContainer;
-import org.apache.shardingsphere.test.e2e.env.container.adapter.AdapterContainer;
-import org.apache.shardingsphere.test.e2e.env.container.adapter.config.AdaptorContainerConfiguration;
-import org.apache.shardingsphere.test.e2e.env.container.constants.ProxyContainerConstants;
-import org.apache.shardingsphere.test.e2e.env.container.util.StorageContainerUtils;
-import org.apache.shardingsphere.test.e2e.env.container.util.JdbcConnectCheckingWaitStrategy;
-import org.apache.shardingsphere.test.e2e.env.runtime.datasource.DataSourceEnvironment;
-
-import javax.sql.DataSource;
-import java.sql.DriverManager;
-import java.util.concurrent.atomic.AtomicReference;
-
-/**
- * ShardingSphere proxy container for standalone mode.
- */
-public final class ShardingSphereProxyStandaloneContainer extends DockerITContainer implements AdapterContainer {
-    
-    private final AdaptorContainerConfiguration config;
-    
-    private final DataSourceEnvironment dataSourceEnvironment;
-    
-    private final AtomicReference<DataSource> targetDataSourceProvider = new AtomicReference<>();
-    
-    public ShardingSphereProxyStandaloneContainer(final DatabaseType databaseType, final AdaptorContainerConfiguration config) {
-        super(ProxyContainerConstants.PROXY_CONTAINER_NAME_PREFIX, config.getAdapterContainerImage());
-        this.config = config;
-        dataSourceEnvironment = DatabaseTypedSPILoader.getService(DataSourceEnvironment.class, databaseType);
-    }
-    
-    @Override
-    protected void configure() {
-        withExposedPorts(3307, 3308);
-        mapResources(config.getMountedResources());
-        setWaitStrategy(new JdbcConnectCheckingWaitStrategy(() -> DriverManager.getConnection(
-                dataSourceEnvironment.getURL(getHost(), getMappedPort(3307), config.getProxyDataSourceName()), ProxyContainerConstants.USER, ProxyContainerConstants.PASSWORD)));
-    }
-    
-    @Override
-    public DataSource getTargetDataSource(final String serverLists) {
-        DataSource dataSource = targetDataSourceProvider.get();
-        if (null == dataSource) {
-            targetDataSourceProvider.set(StorageContainerUtils.generateDataSource(
-                    dataSourceEnvironment.getURL(getHost(), getMappedPort(3307), config.getProxyDataSourceName()), ProxyContainerConstants.USER, ProxyContainerConstants.PASSWORD, 2));
-        }
-        return targetDataSourceProvider.get();
-    }
-    
-    @Override
-    public String getAbbreviation() {
-        return ProxyContainerConstants.PROXY_CONTAINER_ABBREVIATION;
-    }
-}
diff --git a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/constants/ProxyContainerConstants.java b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/constants/ProxyContainerConstants.java
index e2484b81f01..46cfa53ff7c 100644
--- a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/constants/ProxyContainerConstants.java
+++ b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/constants/ProxyContainerConstants.java
@@ -39,6 +39,4 @@ public final class ProxyContainerConstants {
     public static final String PROXY_CONTAINER_NAME_PREFIX = "ShardingSphere-Proxy";
     
     public static final String PROXY_CONTAINER_IMAGE = "apache/shardingsphere-proxy-test";
-    
-    public static final String PROXY_CONTAINER_ABBREVIATION = "proxy";
 }
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 899119fc8ac..b19f5d70568 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
@@ -23,7 +23,7 @@ import org.apache.shardingsphere.database.connector.core.type.DatabaseType;
 import org.apache.shardingsphere.infra.exception.ShardingSpherePreconditions;
 import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader;
 import org.apache.shardingsphere.test.e2e.env.container.adapter.config.AdaptorContainerConfiguration;
-import org.apache.shardingsphere.test.e2e.env.container.adapter.impl.ShardingSphereProxyClusterContainer;
+import org.apache.shardingsphere.test.e2e.env.container.adapter.impl.ShardingSphereProxyDockerContainer;
 import org.apache.shardingsphere.test.e2e.env.container.adapter.impl.ShardingSphereProxyEmbeddedContainer;
 import org.apache.shardingsphere.test.e2e.env.container.governance.GovernanceContainer;
 import org.apache.shardingsphere.test.e2e.env.container.governance.option.GovernanceContainerOption;
@@ -48,7 +48,7 @@ public final class PipelineDockerContainerComposer extends PipelineBaseContainer
     
     private final DatabaseType databaseType;
     
-    private ShardingSphereProxyClusterContainer proxyContainer;
+    private ShardingSphereProxyDockerContainer proxyContainer;
     
     @Getter
     private final List<DockerStorageContainer> storageContainers = new LinkedList<>();
@@ -72,7 +72,7 @@ public final class PipelineDockerContainerComposer extends PipelineBaseContainer
             }
             getContainers().registerContainer(proxyContainer);
         } else {
-            ShardingSphereProxyClusterContainer proxyClusterContainer = new ShardingSphereProxyClusterContainer(proxyDatabaseType, containerConfig);
+            ShardingSphereProxyDockerContainer proxyClusterContainer = new ShardingSphereProxyDockerContainer(proxyDatabaseType, containerConfig);
             for (DockerStorageContainer each : storageContainers) {
                 proxyClusterContainer.dependsOn(governanceContainer, each);
             }
diff --git a/test/e2e/operation/showprocesslist/src/test/java/org/apache/shardingsphere/test/e2e/operation/showprocesslist/container/composer/ClusterShowProcessListContainerComposer.java b/test/e2e/operation/showprocesslist/src/test/java/org/apache/shardingsphere/test/e2e/operation/showprocesslist/container/composer/ClusterShowProcessListContainerComposer.java
index a93d9d2aad3..64be9efdc02 100644
--- a/test/e2e/operation/showprocesslist/src/test/java/org/apache/shardingsphere/test/e2e/operation/showprocesslist/container/composer/ClusterShowProcessListContainerComposer.java
+++ b/test/e2e/operation/showprocesslist/src/test/java/org/apache/shardingsphere/test/e2e/operation/showprocesslist/container/composer/ClusterShowProcessListContainerComposer.java
@@ -25,7 +25,6 @@ import org.apache.shardingsphere.test.e2e.env.container.ITContainers;
 import org.apache.shardingsphere.test.e2e.env.container.adapter.AdapterContainer;
 import org.apache.shardingsphere.test.e2e.env.container.adapter.AdapterContainerFactory;
 import org.apache.shardingsphere.test.e2e.env.container.adapter.config.AdaptorContainerConfiguration;
-import org.apache.shardingsphere.test.e2e.env.container.adapter.enums.AdapterMode;
 import org.apache.shardingsphere.test.e2e.env.container.adapter.enums.AdapterType;
 import org.apache.shardingsphere.test.e2e.env.container.constants.ProxyContainerConstants;
 import org.apache.shardingsphere.test.e2e.env.container.governance.GovernanceContainer;
@@ -66,10 +65,8 @@ public final class ClusterShowProcessListContainerComposer implements AutoClosea
                 getMountedResources(testParam.getScenario(), testParam.getDatabaseType(), testParam.getRunMode(), testParam.getGovernanceCenter()), AdapterContainerUtils.getAdapterContainerImage(),
                 "");
         String envType = ShowProcessListEnvironment.getInstance().getItEnvType().name();
-        jdbcContainer = AdapterContainerFactory.newInstance(AdapterMode.valueOf(testParam.getRunMode().toUpperCase()), AdapterType.JDBC, testParam.getDatabaseType(), testParam.getScenario(),
-                containerConfig, storageContainer, envType);
-        proxyContainer = AdapterContainerFactory.newInstance(AdapterMode.valueOf(testParam.getRunMode().toUpperCase()), AdapterType.PROXY, testParam.getDatabaseType(), testParam.getScenario(),
-                containerConfig, storageContainer, envType);
+        jdbcContainer = AdapterContainerFactory.newInstance(AdapterType.JDBC, testParam.getDatabaseType(), testParam.getScenario(), containerConfig, storageContainer, envType);
+        proxyContainer = AdapterContainerFactory.newInstance(AdapterType.PROXY, testParam.getDatabaseType(), testParam.getScenario(), containerConfig, storageContainer, envType);
         if (proxyContainer instanceof DockerITContainer) {
             if (isClusterMode(testParam.getRunMode())) {
                 ((DockerITContainer) proxyContainer).dependsOn(governanceContainer);
diff --git a/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/operation/transaction/framework/container/compose/TransactionDockerContainerComposer.java b/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/operation/transaction/framework/container/compose/TransactionDockerContainerComposer.java
index ba092ef37d0..f663a17a818 100644
--- a/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/operation/transaction/framework/container/compose/TransactionDockerContainerComposer.java
+++ b/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/operation/transaction/framework/container/compose/TransactionDockerContainerComposer.java
@@ -27,7 +27,6 @@ import org.apache.shardingsphere.test.e2e.env.container.DockerITContainer;
 import org.apache.shardingsphere.test.e2e.env.container.adapter.AdapterContainer;
 import org.apache.shardingsphere.test.e2e.env.container.adapter.AdapterContainerFactory;
 import org.apache.shardingsphere.test.e2e.env.container.adapter.config.AdaptorContainerConfiguration;
-import org.apache.shardingsphere.test.e2e.env.container.adapter.enums.AdapterMode;
 import org.apache.shardingsphere.test.e2e.env.container.adapter.enums.AdapterType;
 import org.apache.shardingsphere.test.e2e.env.container.adapter.impl.ShardingSphereJdbcEmbeddedContainer;
 import org.apache.shardingsphere.test.e2e.env.container.adapter.impl.ShardingSphereProxyEmbeddedContainer;
@@ -72,8 +71,7 @@ public final class TransactionDockerContainerComposer extends TransactionBaseCon
         if (AdapterType.PROXY.getValue().equalsIgnoreCase(testParam.getAdapter())) {
             jdbcContainer = null;
             AdaptorContainerConfiguration containerConfig = TransactionProxyContainerConfigurationFactory.newInstance(testParam.getScenario(), databaseType, testParam.getPortBindings());
-            proxyContainer =
-                    AdapterContainerFactory.newInstance(AdapterMode.CLUSTER, AdapterType.PROXY, databaseType, testParam.getScenario(), containerConfig, storageContainer, envType.name());
+            proxyContainer = AdapterContainerFactory.newInstance(AdapterType.PROXY, databaseType, testParam.getScenario(), containerConfig, storageContainer, envType.name());
             if (proxyContainer instanceof DockerITContainer) {
                 ((DockerITContainer) proxyContainer).dependsOn(governanceContainer, storageContainer);
             }
diff --git a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/sql/env/container/compose/ContainerComposerRegistry.java b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/sql/env/container/compose/ContainerComposerRegistry.java
index e1c391bb2b7..bb403e7d80e 100644
--- a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/sql/env/container/compose/ContainerComposerRegistry.java
+++ b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/sql/env/container/compose/ContainerComposerRegistry.java
@@ -56,7 +56,7 @@ public final class ContainerComposerRegistry implements AutoCloseable {
         }
         synchronized (containerComposers) {
             if (!containerComposers.containsKey(key)) {
-                containerComposers.put(key, createContainerComposer(isClusterMode(adapterMode, adapterType), scenario, databaseType, adapterMode, adapterType));
+                containerComposers.put(key, createContainerComposer(isClusterMode(adapterMode, adapterType), scenario, databaseType, adapterType));
             }
             return containerComposers.get(key);
         }
@@ -66,8 +66,8 @@ public final class ContainerComposerRegistry implements AutoCloseable {
         return AdapterMode.CLUSTER == adapterMode && AdapterType.PROXY == adapterType;
     }
     
-    private ContainerComposer createContainerComposer(final boolean clusterMode, final String scenario, final DatabaseType databaseType, final AdapterMode adapterMode, final AdapterType adapterType) {
-        return clusterMode ? new ClusterContainerComposer(scenario, databaseType, adapterMode, adapterType) : new StandaloneContainerComposer(scenario, databaseType, adapterMode, adapterType);
+    private ContainerComposer createContainerComposer(final boolean clusterMode, final String scenario, final DatabaseType databaseType, final AdapterType adapterType) {
+        return clusterMode ? new ClusterContainerComposer(scenario, databaseType, adapterType) : new StandaloneContainerComposer(scenario, databaseType, adapterType);
     }
     
     @Override
diff --git a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/sql/env/container/compose/mode/ClusterContainerComposer.java b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/sql/env/container/compose/mode/ClusterContainerComposer.java
index 768f4cfc001..2c1e0596af0 100644
--- a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/sql/env/container/compose/mode/ClusterContainerComposer.java
+++ b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/sql/env/container/compose/mode/ClusterContainerComposer.java
@@ -25,7 +25,6 @@ import org.apache.shardingsphere.test.e2e.env.container.ITContainers;
 import org.apache.shardingsphere.test.e2e.env.container.adapter.AdapterContainer;
 import org.apache.shardingsphere.test.e2e.env.container.adapter.AdapterContainerFactory;
 import org.apache.shardingsphere.test.e2e.env.container.adapter.config.AdaptorContainerConfiguration;
-import org.apache.shardingsphere.test.e2e.env.container.adapter.enums.AdapterMode;
 import org.apache.shardingsphere.test.e2e.env.container.adapter.enums.AdapterType;
 import org.apache.shardingsphere.test.e2e.env.container.adapter.impl.ShardingSphereProxyEmbeddedContainer;
 import org.apache.shardingsphere.test.e2e.env.container.governance.GovernanceContainer;
@@ -55,7 +54,7 @@ public final class ClusterContainerComposer implements ContainerComposer {
     
     private final AdapterContainer adapterContainer;
     
-    public ClusterContainerComposer(final String scenario, final DatabaseType databaseType, final AdapterMode adapterMode, final AdapterType adapterType) {
+    public ClusterContainerComposer(final String scenario, final DatabaseType databaseType, final AdapterType adapterType) {
         containers = new ITContainers(scenario);
         // TODO support other types of governance
         governanceContainer = containers.registerContainer(new GovernanceContainer(TypedSPILoader.getService(GovernanceContainerOption.class, "ZooKeeper")));
@@ -65,7 +64,7 @@ public final class ClusterContainerComposer implements ContainerComposer {
                         DatabaseTypedSPILoader.getService(StorageContainerOption.class, databaseType), scenario)
                 : new NativeStorageContainer(databaseType, scenario));
         AdaptorContainerConfiguration containerConfig = SQLE2EProxyContainerConfigurationFactory.newInstance(scenario, "cluster", databaseType);
-        AdapterContainer adapterContainer = AdapterContainerFactory.newInstance(adapterMode, adapterType, databaseType, scenario, containerConfig, storageContainer, envType.name());
+        AdapterContainer adapterContainer = AdapterContainerFactory.newInstance(adapterType, databaseType, scenario, containerConfig, storageContainer, envType.name());
         if (adapterContainer instanceof DockerITContainer) {
             ((DockerITContainer) adapterContainer).dependsOn(governanceContainer, storageContainer);
         }
diff --git a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/sql/env/container/compose/mode/StandaloneContainerComposer.java b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/sql/env/container/compose/mode/StandaloneContainerComposer.java
index 65392fef788..6c304f55ee5 100644
--- a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/sql/env/container/compose/mode/StandaloneContainerComposer.java
+++ b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/sql/env/container/compose/mode/StandaloneContainerComposer.java
@@ -24,7 +24,6 @@ import org.apache.shardingsphere.test.e2e.env.container.ITContainers;
 import org.apache.shardingsphere.test.e2e.env.container.adapter.AdapterContainer;
 import org.apache.shardingsphere.test.e2e.env.container.adapter.AdapterContainerFactory;
 import org.apache.shardingsphere.test.e2e.env.container.adapter.config.AdaptorContainerConfiguration;
-import org.apache.shardingsphere.test.e2e.env.container.adapter.enums.AdapterMode;
 import org.apache.shardingsphere.test.e2e.env.container.adapter.enums.AdapterType;
 import org.apache.shardingsphere.test.e2e.env.container.storage.StorageContainer;
 import org.apache.shardingsphere.test.e2e.env.container.storage.option.StorageContainerOption;
@@ -49,7 +48,7 @@ public final class StandaloneContainerComposer implements ContainerComposer {
     
     private final AdapterContainer adapterContainer;
     
-    public StandaloneContainerComposer(final String scenario, final DatabaseType databaseType, final AdapterMode adapterMode, final AdapterType adapterType) {
+    public StandaloneContainerComposer(final String scenario, final DatabaseType databaseType, final AdapterType adapterType) {
         containers = new ITContainers(scenario);
         Type envType = E2ETestEnvironment.getInstance().getClusterEnvironment().getType();
         storageContainer = containers.registerContainer(Type.DOCKER == envType
@@ -57,7 +56,7 @@ public final class StandaloneContainerComposer implements ContainerComposer {
                         DatabaseTypedSPILoader.getService(StorageContainerOption.class, databaseType), scenario)
                 : new NativeStorageContainer(databaseType, scenario));
         AdaptorContainerConfiguration containerConfig = SQLE2EProxyContainerConfigurationFactory.newInstance(scenario, "standalone", databaseType);
-        AdapterContainer adapterContainer = AdapterContainerFactory.newInstance(adapterMode, adapterType, databaseType, scenario, containerConfig, storageContainer, envType.name());
+        AdapterContainer adapterContainer = AdapterContainerFactory.newInstance(adapterType, databaseType, scenario, containerConfig, storageContainer, envType.name());
         if (adapterContainer instanceof DockerITContainer) {
             ((DockerITContainer) adapterContainer).dependsOn(storageContainer);
         }