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 bf6e6ba4940 Add TODO for Merge test container class (#32209)
bf6e6ba4940 is described below
commit bf6e6ba4940fe74a11760db157777a657671d16a
Author: Liang Zhang <[email protected]>
AuthorDate: Sun Jul 21 10:50:39 2024 +0800
Add TODO for Merge test container class (#32209)
* Add TODO for Merge test container class
* Add TODO for Merge test container class
---
.../e2e/agent/common/container/MySQLContainer.java | 1 +
.../container/ShardingSphereJdbcContainer.java | 1 +
.../container/ShardingSphereProxyContainer.java | 1 +
.../agent/common/env/AgentE2ETestEnvironment.java | 24 +++++++++++-----------
.../jdbc/ShardingSphereJDBCContainer.java | 1 +
5 files changed, 16 insertions(+), 12 deletions(-)
diff --git
a/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/container/MySQLContainer.java
b/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/container/MySQLContainer.java
index 6c21095d0c9..03b4c5ef2b6 100644
---
a/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/container/MySQLContainer.java
+++
b/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/container/MySQLContainer.java
@@ -30,6 +30,7 @@ import java.util.Map;
/**
* MySQL container.
*/
+// TODO Merge test container: merge with
org.apache.shardingsphere.test.e2e.env.container.atomic.storage.impl.MySQLContainer
public final class MySQLContainer extends DockerITContainer {
private static final int EXPOSED_PORT = 3306;
diff --git
a/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/container/ShardingSphereJdbcContainer.java
b/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/container/ShardingSphereJdbcContainer.java
index 6f383c8ae9b..07a128b7bd6 100644
---
a/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/container/ShardingSphereJdbcContainer.java
+++
b/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/container/ShardingSphereJdbcContainer.java
@@ -31,6 +31,7 @@ import java.util.function.Consumer;
/**
* ShardingSphere jdbc container.
*/
+// TODO Merge test container: merge with
org.apache.shardingsphere.test.e2e.env.container.atomic.adapter.impl.ShardingSphereJdbcContainer
public final class ShardingSphereJdbcContainer extends DockerITContainer {
private static final String CONFIG_PATH_IN_CONTAINER =
"/opt/shardingsphere-jdbc-app/";
diff --git
a/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/container/ShardingSphereProxyContainer.java
b/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/container/ShardingSphereProxyContainer.java
index aaecb04354a..5e33ef037c6 100644
---
a/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/container/ShardingSphereProxyContainer.java
+++
b/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/container/ShardingSphereProxyContainer.java
@@ -37,6 +37,7 @@ import java.util.function.Consumer;
/**
* ShardingSphere proxy container.
*/
+// TODO Merge test container: merge with ShardingSphereProxyClusterContainer
public final class ShardingSphereProxyContainer extends DockerITContainer {
private static final int EXPOSED_PORT = 3307;
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 7548709c569..74d8e654d81 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
@@ -97,20 +97,20 @@ public final class AgentE2ETestEnvironment {
private AgentE2ETestEnvironment() {
initContainerImage();
- Properties props =
EnvironmentProperties.loadProperties("env/engine-env.properties");
- adapter = props.getProperty("it.env.adapter");
- plugin = props.getProperty("it.env.plugin");
- collectDataWaitSeconds =
Long.parseLong(props.getProperty("it.env.collect.data.wait.seconds", "0"));
+ 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() {
- Properties props =
EnvironmentProperties.loadProperties("env/image.properties");
- proxyImage = props.getProperty("proxy.image",
"apache/shardingsphere-proxy-agent-test:latest");
- jdbcProjectImage = props.getProperty("jdbc.project.image",
"apache/shardingsphere-jdbc-agent-test:latest");
- mysqlImage = props.getProperty("mysql.image", "mysql:8.0");
- jaegerImage = props.getProperty("jaeger.image",
"jaegertracing/all-in-one:1.41");
- zipkinImage = props.getProperty("zipkin.image",
"openzipkin/zipkin:3.2");
- prometheusImage = props.getProperty("prometheus.image",
"prom/prometheus:v2.41.0");
+ Properties imageProps =
EnvironmentProperties.loadProperties("env/image.properties");
+ proxyImage = imageProps.getProperty("proxy.image",
"apache/shardingsphere-proxy-agent-test:latest");
+ jdbcProjectImage = imageProps.getProperty("jdbc.project.image",
"apache/shardingsphere-jdbc-agent-test:latest");
+ mysqlImage = imageProps.getProperty("mysql.image", "mysql:8.0");
+ jaegerImage = imageProps.getProperty("jaeger.image",
"jaegertracing/all-in-one:1.41");
+ zipkinImage = imageProps.getProperty("zipkin.image",
"openzipkin/zipkin:3.2");
+ prometheusImage = imageProps.getProperty("prometheus.image",
"prom/prometheus:v2.41.0");
}
/**
@@ -135,7 +135,7 @@ public final class AgentE2ETestEnvironment {
createJDBCEnvironment();
}
log.info("Waiting to collect data ...");
- if (0L < collectDataWaitSeconds) {
+ if (collectDataWaitSeconds > 0L) {
Awaitility.await().ignoreExceptions().atMost(Duration.ofSeconds(collectDataWaitSeconds
+ 1L)).pollDelay(collectDataWaitSeconds, TimeUnit.SECONDS).until(() -> true);
}
initialized = true;
diff --git
a/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/framework/container/jdbc/ShardingSphereJDBCContainer.java
b/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/framework/container/jdbc/ShardingSphereJDBCContainer.java
index 21a0f3621f1..80d8dd4af3e 100644
---
a/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/framework/container/jdbc/ShardingSphereJDBCContainer.java
+++
b/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/framework/container/jdbc/ShardingSphereJDBCContainer.java
@@ -30,6 +30,7 @@ import java.util.concurrent.atomic.AtomicReference;
/**
* ShardingSphere JDBC container.
*/
+// TODO Merge test container: merge with
org.apache.shardingsphere.test.e2e.env.container.atomic.adapter.impl.ShardingSphereJdbcContainer
public final class ShardingSphereJDBCContainer implements EmbeddedITContainer {
private final DockerStorageContainer databaseContainer;