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 af630955d59 Add AgentE2ETestConfiguration (#32212)
af630955d59 is described below

commit af630955d59a93d8b077a50854f52bbe464361fe
Author: Liang Zhang <[email protected]>
AuthorDate: Sun Jul 21 13:06:22 2024 +0800

    Add AgentE2ETestConfiguration (#32212)
---
 .../common/env/AgentE2ETestConfiguration.java      | 63 ++++++++++++++++++++++
 .../agent/common/env/AgentE2ETestEnvironment.java  | 51 ++++++------------
 .../AgentE2ETestCaseArgumentsProvider.java         |  4 +-
 .../test/e2e/agent/file/FilePluginE2EIT.java       |  5 +-
 .../test/e2e/agent/file/cases/LogE2ETestCase.java  |  4 +-
 .../test/e2e/agent/metrics/MetricsPluginE2EIT.java |  5 +-
 .../e2e/agent/metrics/cases/MetricE2ETestCase.java |  4 +-
 .../test/e2e/agent/jaeger/JaegerPluginE2EIT.java   |  5 +-
 .../e2e/agent/jaeger/cases/JaegerE2ETestCase.java  |  4 +-
 .../test/e2e/agent/zipkin/ZipkinPluginE2EIT.java   |  3 +-
 .../e2e/agent/zipkin/cases/ZipkinE2ETestCase.java  |  4 +-
 11 files changed, 101 insertions(+), 51 deletions(-)

diff --git 
a/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/env/AgentE2ETestConfiguration.java
 
b/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/env/AgentE2ETestConfiguration.java
new file mode 100644
index 00000000000..526d66de0c0
--- /dev/null
+++ 
b/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/env/AgentE2ETestConfiguration.java
@@ -0,0 +1,63 @@
+/*
+ * 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.agent.common.env;
+
+import com.google.common.base.Strings;
+import lombok.Getter;
+
+import java.util.Properties;
+
+/**
+ * Agent E2E test configuration.
+ */
+@Getter
+public final class AgentE2ETestConfiguration {
+    
+    private static final AgentE2ETestConfiguration INSTANCE = new 
AgentE2ETestConfiguration();
+    
+    private final String adapter;
+    
+    private final String plugin;
+    
+    private final long collectDataWaitSeconds;
+    
+    private AgentE2ETestConfiguration() {
+        Properties envProps = 
EnvironmentProperties.loadProperties("env/engine-env.properties");
+        adapter = envProps.getProperty("it.env.adapter");
+        plugin = envProps.getProperty("it.env.plugin");
+        collectDataWaitSeconds = 
Long.parseLong(envProps.getProperty("it.env.collect.data.wait.seconds", "0"));
+    }
+    
+    /**
+     * Get instance.
+     *
+     * @return singleton instance
+     */
+    public static AgentE2ETestConfiguration getInstance() {
+        return INSTANCE;
+    }
+    
+    /**
+     * Judge whether contains test parameter.
+     *
+     * @return contains or not
+     */
+    public boolean containsTestParameter() {
+        return !Strings.isNullOrEmpty(adapter) && 
!Strings.isNullOrEmpty(plugin);
+    }
+}
diff --git 
a/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/env/AgentE2ETestEnvironment.java
 
b/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/env/AgentE2ETestEnvironment.java
index 74d8e654d81..049f778ef3e 100644
--- 
a/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/env/AgentE2ETestEnvironment.java
+++ 
b/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/env/AgentE2ETestEnvironment.java
@@ -17,7 +17,6 @@
 
 package org.apache.shardingsphere.test.e2e.agent.common.env;
 
-import com.google.common.base.Strings;
 import lombok.Getter;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.shardingsphere.test.e2e.agent.common.container.ITContainers;
@@ -52,15 +51,10 @@ public final class AgentE2ETestEnvironment {
     
     private static final AgentE2ETestEnvironment INSTANCE = new 
AgentE2ETestEnvironment();
     
-    @Getter
-    private final Collection<String> actualLogs = new LinkedList<>();
+    private final AgentE2ETestConfiguration testConfig;
     
     @Getter
-    private final String adapter;
-    
-    private final String plugin;
-    
-    private final long collectDataWaitSeconds;
+    private final Collection<String> actualLogs = new LinkedList<>();
     
     @Getter
     private String prometheusHttpUrl;
@@ -96,11 +90,8 @@ public final class AgentE2ETestEnvironment {
     private String jdbcProjectImage;
     
     private AgentE2ETestEnvironment() {
+        testConfig = AgentE2ETestConfiguration.getInstance();
         initContainerImage();
-        Properties envProps = 
EnvironmentProperties.loadProperties("env/engine-env.properties");
-        adapter = envProps.getProperty("it.env.adapter");
-        plugin = envProps.getProperty("it.env.plugin");
-        collectDataWaitSeconds = 
Long.parseLong(envProps.getProperty("it.env.collect.data.wait.seconds", "0"));
     }
     
     private void initContainerImage() {
@@ -126,15 +117,16 @@ public final class AgentE2ETestEnvironment {
      * Init environment.
      */
     public void init() {
-        if (!containsTestParameter()) {
+        if (!AgentE2ETestConfiguration.getInstance().containsTestParameter()) {
             return;
         }
-        if (AdapterType.PROXY.getValue().equalsIgnoreCase(adapter)) {
+        if 
(AdapterType.PROXY.getValue().equalsIgnoreCase(testConfig.getAdapter())) {
             createProxyEnvironment();
-        } else if (AdapterType.JDBC.getValue().equalsIgnoreCase(adapter)) {
+        } else if 
(AdapterType.JDBC.getValue().equalsIgnoreCase(testConfig.getAdapter())) {
             createJDBCEnvironment();
         }
         log.info("Waiting to collect data ...");
+        long collectDataWaitSeconds = testConfig.getCollectDataWaitSeconds();
         if (collectDataWaitSeconds > 0L) {
             
Awaitility.await().ignoreExceptions().atMost(Duration.ofSeconds(collectDataWaitSeconds
 + 1L)).pollDelay(collectDataWaitSeconds, TimeUnit.SECONDS).until(() -> true);
         }
@@ -145,9 +137,9 @@ public final class AgentE2ETestEnvironment {
         containers = new ITContainers();
         MySQLContainer storageContainer = new MySQLContainer(mysqlImage);
         GovernanceContainer governanceContainer = 
GovernanceContainerFactory.newInstance("ZooKeeper");
-        ShardingSphereProxyContainer proxyContainer = 
PluginType.FILE.getValue().equalsIgnoreCase(plugin)
-                ? new ShardingSphereProxyContainer(proxyImage, plugin, 
this::collectLogs)
-                : new ShardingSphereProxyContainer(proxyImage, plugin);
+        ShardingSphereProxyContainer proxyContainer = 
PluginType.FILE.getValue().equalsIgnoreCase(testConfig.getPlugin())
+                ? new ShardingSphereProxyContainer(proxyImage, 
testConfig.getPlugin(), this::collectLogs)
+                : new ShardingSphereProxyContainer(proxyImage, 
testConfig.getPlugin());
         proxyContainer.dependsOn(storageContainer);
         proxyContainer.dependsOn(governanceContainer);
         Optional<DockerITContainer> pluginContainer = getPluginContainer();
@@ -169,9 +161,9 @@ public final class AgentE2ETestEnvironment {
         containers = new ITContainers();
         Optional<DockerITContainer> pluginContainer = getPluginContainer();
         MySQLContainer storageContainer = new MySQLContainer(mysqlImage);
-        ShardingSphereJdbcContainer jdbcContainer = 
PluginType.FILE.getValue().equalsIgnoreCase(plugin)
-                ? new ShardingSphereJdbcContainer(jdbcProjectImage, plugin, 
this::collectLogs)
-                : new ShardingSphereJdbcContainer(jdbcProjectImage, plugin);
+        ShardingSphereJdbcContainer jdbcContainer = 
PluginType.FILE.getValue().equalsIgnoreCase(testConfig.getPlugin())
+                ? new ShardingSphereJdbcContainer(jdbcProjectImage, 
testConfig.getPlugin(), this::collectLogs)
+                : new ShardingSphereJdbcContainer(jdbcProjectImage, 
testConfig.getPlugin());
         jdbcContainer.dependsOn(storageContainer);
         pluginContainer.ifPresent(jdbcContainer::dependsOn);
         pluginContainer.ifPresent(optional -> 
containers.registerContainer(optional));
@@ -182,13 +174,13 @@ public final class AgentE2ETestEnvironment {
     }
     
     private Optional<DockerITContainer> getPluginContainer() {
-        if (PluginType.PROMETHEUS.getValue().equalsIgnoreCase(plugin)) {
+        if 
(PluginType.PROMETHEUS.getValue().equalsIgnoreCase(testConfig.getPlugin())) {
             prometheusContainer = new PrometheusContainer(prometheusImage);
             return Optional.of(prometheusContainer);
-        } else if (PluginType.ZIPKIN.getValue().equalsIgnoreCase(plugin)) {
+        } else if 
(PluginType.ZIPKIN.getValue().equalsIgnoreCase(testConfig.getPlugin())) {
             zipkinContainer = new ZipkinContainer(zipkinImage);
             return Optional.of(zipkinContainer);
-        } else if (PluginType.JAEGER.getValue().equalsIgnoreCase(plugin)) {
+        } else if 
(PluginType.JAEGER.getValue().equalsIgnoreCase(testConfig.getPlugin())) {
             jaegerContainer = new JaegerContainer(jaegerImage);
             return Optional.of(jaegerContainer);
         }
@@ -211,7 +203,7 @@ public final class AgentE2ETestEnvironment {
      * Destroy environment.
      */
     public void destroy() {
-        if (!containsTestParameter()) {
+        if (!AgentE2ETestConfiguration.getInstance().containsTestParameter()) {
             return;
         }
         if (null != proxyRequestExecutor) {
@@ -221,13 +213,4 @@ public final class AgentE2ETestEnvironment {
             containers.stop();
         }
     }
-    
-    /**
-     * Judge whether contains test parameter.
-     *
-     * @return contains or not
-     */
-    public boolean containsTestParameter() {
-        return !Strings.isNullOrEmpty(adapter) && 
!Strings.isNullOrEmpty(plugin);
-    }
 }
diff --git 
a/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/framework/AgentE2ETestCaseArgumentsProvider.java
 
b/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/framework/AgentE2ETestCaseArgumentsProvider.java
index 11285573d4f..065217a7bca 100644
--- 
a/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/framework/AgentE2ETestCaseArgumentsProvider.java
+++ 
b/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/framework/AgentE2ETestCaseArgumentsProvider.java
@@ -20,7 +20,7 @@ package 
org.apache.shardingsphere.test.e2e.agent.common.framework;
 import lombok.RequiredArgsConstructor;
 import org.apache.shardingsphere.test.e2e.agent.common.cases.AgentE2ETestCases;
 import 
org.apache.shardingsphere.test.e2e.agent.common.cases.AgentE2ETestCasesLoader;
-import 
org.apache.shardingsphere.test.e2e.agent.common.env.AgentE2ETestEnvironment;
+import 
org.apache.shardingsphere.test.e2e.agent.common.env.AgentE2ETestConfiguration;
 import org.junit.jupiter.api.extension.ExtensionContext;
 import org.junit.jupiter.params.provider.Arguments;
 import org.junit.jupiter.params.provider.ArgumentsProvider;
@@ -37,6 +37,6 @@ public abstract class AgentE2ETestCaseArgumentsProvider 
implements ArgumentsProv
     
     @Override
     public final Stream<? extends Arguments> provideArguments(final 
ExtensionContext extensionContext) {
-        return new 
AgentE2ETestCasesLoader(agentE2ETestCasesClass).loadTestCases(AgentE2ETestEnvironment.getInstance().getAdapter()).stream().map(Arguments::of);
+        return new 
AgentE2ETestCasesLoader(agentE2ETestCasesClass).loadTestCases(AgentE2ETestConfiguration.getInstance().getAdapter()).stream().map(Arguments::of);
     }
 }
diff --git 
a/test/e2e/agent/plugins/logging/file/src/test/java/org/apache/shardingsphere/test/e2e/agent/file/FilePluginE2EIT.java
 
b/test/e2e/agent/plugins/logging/file/src/test/java/org/apache/shardingsphere/test/e2e/agent/file/FilePluginE2EIT.java
index ba0474e303e..a7474e14a1c 100644
--- 
a/test/e2e/agent/plugins/logging/file/src/test/java/org/apache/shardingsphere/test/e2e/agent/file/FilePluginE2EIT.java
+++ 
b/test/e2e/agent/plugins/logging/file/src/test/java/org/apache/shardingsphere/test/e2e/agent/file/FilePluginE2EIT.java
@@ -17,12 +17,13 @@
 
 package org.apache.shardingsphere.test.e2e.agent.file;
 
+import 
org.apache.shardingsphere.test.e2e.agent.common.env.AgentE2ETestConfiguration;
 import 
org.apache.shardingsphere.test.e2e.agent.common.env.AgentE2ETestEnvironment;
 import 
org.apache.shardingsphere.test.e2e.agent.common.framework.AgentE2ETestActionExtension;
 import 
org.apache.shardingsphere.test.e2e.agent.common.framework.AgentE2ETestCaseArgumentsProvider;
 import org.apache.shardingsphere.test.e2e.agent.file.asserts.LogContentAssert;
-import org.apache.shardingsphere.test.e2e.agent.file.cases.LogE2ETestCases;
 import org.apache.shardingsphere.test.e2e.agent.file.cases.LogE2ETestCase;
+import org.apache.shardingsphere.test.e2e.agent.file.cases.LogE2ETestCases;
 import org.junit.jupiter.api.condition.EnabledIf;
 import org.junit.jupiter.api.extension.ExtendWith;
 import org.junit.jupiter.params.ParameterizedTest;
@@ -42,7 +43,7 @@ class FilePluginE2EIT {
     }
     
     private static boolean isEnabled() {
-        return AgentE2ETestEnvironment.getInstance().containsTestParameter();
+        return AgentE2ETestConfiguration.getInstance().containsTestParameter();
     }
     
     private static final class TestCaseArgumentsProvider extends 
AgentE2ETestCaseArgumentsProvider {
diff --git 
a/test/e2e/agent/plugins/logging/file/src/test/java/org/apache/shardingsphere/test/e2e/agent/file/cases/LogE2ETestCase.java
 
b/test/e2e/agent/plugins/logging/file/src/test/java/org/apache/shardingsphere/test/e2e/agent/file/cases/LogE2ETestCase.java
index 5866de19957..8b5410a13b7 100644
--- 
a/test/e2e/agent/plugins/logging/file/src/test/java/org/apache/shardingsphere/test/e2e/agent/file/cases/LogE2ETestCase.java
+++ 
b/test/e2e/agent/plugins/logging/file/src/test/java/org/apache/shardingsphere/test/e2e/agent/file/cases/LogE2ETestCase.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.test.e2e.agent.file.cases;
 import lombok.Getter;
 import lombok.Setter;
 import org.apache.shardingsphere.test.e2e.agent.common.cases.AgentE2ETestCase;
-import 
org.apache.shardingsphere.test.e2e.agent.common.env.AgentE2ETestEnvironment;
+import 
org.apache.shardingsphere.test.e2e.agent.common.env.AgentE2ETestConfiguration;
 
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
@@ -39,6 +39,6 @@ public final class LogE2ETestCase implements AgentE2ETestCase 
{
     
     @Override
     public String toString() {
-        return String.format("%s -> `%s`", 
AgentE2ETestEnvironment.getInstance().getAdapter(), logRegex);
+        return String.format("%s -> `%s`", 
AgentE2ETestConfiguration.getInstance().getAdapter(), logRegex);
     }
 }
diff --git 
a/test/e2e/agent/plugins/metrics/prometheus/src/test/java/org/apache/shardingsphere/test/e2e/agent/metrics/MetricsPluginE2EIT.java
 
b/test/e2e/agent/plugins/metrics/prometheus/src/test/java/org/apache/shardingsphere/test/e2e/agent/metrics/MetricsPluginE2EIT.java
index 87cbe72e86b..6fb268a7f86 100644
--- 
a/test/e2e/agent/plugins/metrics/prometheus/src/test/java/org/apache/shardingsphere/test/e2e/agent/metrics/MetricsPluginE2EIT.java
+++ 
b/test/e2e/agent/plugins/metrics/prometheus/src/test/java/org/apache/shardingsphere/test/e2e/agent/metrics/MetricsPluginE2EIT.java
@@ -17,12 +17,13 @@
 
 package org.apache.shardingsphere.test.e2e.agent.metrics;
 
+import 
org.apache.shardingsphere.test.e2e.agent.common.env.AgentE2ETestConfiguration;
 import 
org.apache.shardingsphere.test.e2e.agent.common.env.AgentE2ETestEnvironment;
 import 
org.apache.shardingsphere.test.e2e.agent.common.framework.AgentE2ETestActionExtension;
 import 
org.apache.shardingsphere.test.e2e.agent.common.framework.AgentE2ETestCaseArgumentsProvider;
 import org.apache.shardingsphere.test.e2e.agent.metrics.asserts.MetricAssert;
-import 
org.apache.shardingsphere.test.e2e.agent.metrics.cases.MetricE2ETestCases;
 import 
org.apache.shardingsphere.test.e2e.agent.metrics.cases.MetricE2ETestCase;
+import 
org.apache.shardingsphere.test.e2e.agent.metrics.cases.MetricE2ETestCases;
 import org.junit.jupiter.api.condition.EnabledIf;
 import org.junit.jupiter.api.extension.ExtendWith;
 import org.junit.jupiter.params.ParameterizedTest;
@@ -39,7 +40,7 @@ class MetricsPluginE2EIT {
     }
     
     private static boolean isEnabled() {
-        return AgentE2ETestEnvironment.getInstance().containsTestParameter();
+        return AgentE2ETestConfiguration.getInstance().containsTestParameter();
     }
     
     private static final class TestCaseArgumentsProvider extends 
AgentE2ETestCaseArgumentsProvider {
diff --git 
a/test/e2e/agent/plugins/metrics/prometheus/src/test/java/org/apache/shardingsphere/test/e2e/agent/metrics/cases/MetricE2ETestCase.java
 
b/test/e2e/agent/plugins/metrics/prometheus/src/test/java/org/apache/shardingsphere/test/e2e/agent/metrics/cases/MetricE2ETestCase.java
index 5319b23e3c3..83888a065c2 100644
--- 
a/test/e2e/agent/plugins/metrics/prometheus/src/test/java/org/apache/shardingsphere/test/e2e/agent/metrics/cases/MetricE2ETestCase.java
+++ 
b/test/e2e/agent/plugins/metrics/prometheus/src/test/java/org/apache/shardingsphere/test/e2e/agent/metrics/cases/MetricE2ETestCase.java
@@ -20,7 +20,7 @@ package 
org.apache.shardingsphere.test.e2e.agent.metrics.cases;
 import lombok.Getter;
 import lombok.Setter;
 import org.apache.shardingsphere.test.e2e.agent.common.cases.AgentE2ETestCase;
-import 
org.apache.shardingsphere.test.e2e.agent.common.env.AgentE2ETestEnvironment;
+import 
org.apache.shardingsphere.test.e2e.agent.common.env.AgentE2ETestConfiguration;
 
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
@@ -48,6 +48,6 @@ public final class MetricE2ETestCase implements 
AgentE2ETestCase {
     
     @Override
     public String toString() {
-        return String.format("%s -> %s", 
AgentE2ETestEnvironment.getInstance().getAdapter(), metricName);
+        return String.format("%s -> %s", 
AgentE2ETestConfiguration.getInstance().getAdapter(), metricName);
     }
 }
diff --git 
a/test/e2e/agent/plugins/tracing/jaeger/src/test/java/org/apache/shardingsphere/test/e2e/agent/jaeger/JaegerPluginE2EIT.java
 
b/test/e2e/agent/plugins/tracing/jaeger/src/test/java/org/apache/shardingsphere/test/e2e/agent/jaeger/JaegerPluginE2EIT.java
index 516837e4d68..2c62a9caaa5 100644
--- 
a/test/e2e/agent/plugins/tracing/jaeger/src/test/java/org/apache/shardingsphere/test/e2e/agent/jaeger/JaegerPluginE2EIT.java
+++ 
b/test/e2e/agent/plugins/tracing/jaeger/src/test/java/org/apache/shardingsphere/test/e2e/agent/jaeger/JaegerPluginE2EIT.java
@@ -17,12 +17,13 @@
 
 package org.apache.shardingsphere.test.e2e.agent.jaeger;
 
+import 
org.apache.shardingsphere.test.e2e.agent.common.env.AgentE2ETestConfiguration;
 import 
org.apache.shardingsphere.test.e2e.agent.common.env.AgentE2ETestEnvironment;
 import 
org.apache.shardingsphere.test.e2e.agent.common.framework.AgentE2ETestActionExtension;
 import 
org.apache.shardingsphere.test.e2e.agent.common.framework.AgentE2ETestCaseArgumentsProvider;
 import 
org.apache.shardingsphere.test.e2e.agent.jaeger.asserts.JaegerSpanAssert;
-import 
org.apache.shardingsphere.test.e2e.agent.jaeger.cases.JaegerE2ETestCases;
 import org.apache.shardingsphere.test.e2e.agent.jaeger.cases.JaegerE2ETestCase;
+import 
org.apache.shardingsphere.test.e2e.agent.jaeger.cases.JaegerE2ETestCases;
 import org.junit.jupiter.api.condition.EnabledIf;
 import org.junit.jupiter.api.extension.ExtendWith;
 import org.junit.jupiter.params.ParameterizedTest;
@@ -39,7 +40,7 @@ class JaegerPluginE2EIT {
     }
     
     private static boolean isEnabled() {
-        return AgentE2ETestEnvironment.getInstance().containsTestParameter();
+        return AgentE2ETestConfiguration.getInstance().containsTestParameter();
     }
     
     private static final class TestCaseArgumentsProvider extends 
AgentE2ETestCaseArgumentsProvider {
diff --git 
a/test/e2e/agent/plugins/tracing/jaeger/src/test/java/org/apache/shardingsphere/test/e2e/agent/jaeger/cases/JaegerE2ETestCase.java
 
b/test/e2e/agent/plugins/tracing/jaeger/src/test/java/org/apache/shardingsphere/test/e2e/agent/jaeger/cases/JaegerE2ETestCase.java
index 5b90ba3cfcb..56aa3398872 100644
--- 
a/test/e2e/agent/plugins/tracing/jaeger/src/test/java/org/apache/shardingsphere/test/e2e/agent/jaeger/cases/JaegerE2ETestCase.java
+++ 
b/test/e2e/agent/plugins/tracing/jaeger/src/test/java/org/apache/shardingsphere/test/e2e/agent/jaeger/cases/JaegerE2ETestCase.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.test.e2e.agent.jaeger.cases;
 import lombok.Getter;
 import lombok.Setter;
 import org.apache.shardingsphere.test.e2e.agent.common.cases.AgentE2ETestCase;
-import 
org.apache.shardingsphere.test.e2e.agent.common.env.AgentE2ETestEnvironment;
+import 
org.apache.shardingsphere.test.e2e.agent.common.env.AgentE2ETestConfiguration;
 
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
@@ -47,6 +47,6 @@ public final class JaegerE2ETestCase implements 
AgentE2ETestCase {
     
     @Override
     public String toString() {
-        return String.format("%s -> %s -> %s", 
AgentE2ETestEnvironment.getInstance().getAdapter(), spanName, 
tags.iterator().next().toString());
+        return String.format("%s -> %s -> %s", 
AgentE2ETestConfiguration.getInstance().getAdapter(), spanName, 
tags.iterator().next().toString());
     }
 }
diff --git 
a/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/ZipkinPluginE2EIT.java
 
b/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/ZipkinPluginE2EIT.java
index 1426c69cbf9..fa158b7913e 100644
--- 
a/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/ZipkinPluginE2EIT.java
+++ 
b/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/ZipkinPluginE2EIT.java
@@ -17,6 +17,7 @@
 
 package org.apache.shardingsphere.test.e2e.agent.zipkin;
 
+import 
org.apache.shardingsphere.test.e2e.agent.common.env.AgentE2ETestConfiguration;
 import 
org.apache.shardingsphere.test.e2e.agent.common.env.AgentE2ETestEnvironment;
 import 
org.apache.shardingsphere.test.e2e.agent.common.framework.AgentE2ETestActionExtension;
 import 
org.apache.shardingsphere.test.e2e.agent.common.framework.AgentE2ETestCaseArgumentsProvider;
@@ -39,7 +40,7 @@ class ZipkinPluginE2EIT {
     }
     
     private static boolean isEnabled() {
-        return AgentE2ETestEnvironment.getInstance().containsTestParameter();
+        return AgentE2ETestConfiguration.getInstance().containsTestParameter();
     }
     
     private static final class TestCaseArgumentsProvider extends 
AgentE2ETestCaseArgumentsProvider {
diff --git 
a/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/cases/ZipkinE2ETestCase.java
 
b/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/cases/ZipkinE2ETestCase.java
index 4624a6a6059..01b471756d5 100644
--- 
a/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/cases/ZipkinE2ETestCase.java
+++ 
b/test/e2e/agent/plugins/tracing/zipkin/src/test/java/org/apache/shardingsphere/test/e2e/agent/zipkin/cases/ZipkinE2ETestCase.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.test.e2e.agent.zipkin.cases;
 import lombok.Getter;
 import lombok.Setter;
 import org.apache.shardingsphere.test.e2e.agent.common.cases.AgentE2ETestCase;
-import 
org.apache.shardingsphere.test.e2e.agent.common.env.AgentE2ETestEnvironment;
+import 
org.apache.shardingsphere.test.e2e.agent.common.env.AgentE2ETestConfiguration;
 
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
@@ -47,6 +47,6 @@ public final class ZipkinE2ETestCase implements 
AgentE2ETestCase {
     
     @Override
     public String toString() {
-        return String.format("%s -> %s -> %s", 
AgentE2ETestEnvironment.getInstance().getAdapter(), spanName, 
tags.iterator().next().toString());
+        return String.format("%s -> %s -> %s", 
AgentE2ETestConfiguration.getInstance().getAdapter(), spanName, 
tags.iterator().next().toString());
     }
 }

Reply via email to