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 2022/07/21 09:06:11 UTC
[shardingsphere] branch master updated: Add multiple ShardingSphere-Proxy case in Scaling IT (#19406)
This is an automated email from the ASF dual-hosted git repository.
zhonghongsheng 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 885f258c191 Add multiple ShardingSphere-Proxy case in Scaling IT (#19406)
885f258c191 is described below
commit 885f258c1915896461261a8da0a7b4e5fd238a23
Author: azexcy <10...@users.noreply.github.com>
AuthorDate: Thu Jul 21 17:06:03 2022 +0800
Add multiple ShardingSphere-Proxy case in Scaling IT (#19406)
* Add multiple ShardingSphere-Proxy case
* Simplify code
---
.../container/compose/DockerComposedContainer.java | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-scaling/src/test/java/org/apache/shardingsphere/integration/data/pipeline/framework/container/compose/DockerComposedContainer.java b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-scaling/src/test/java/org/apache/shardingsphere/integration/data/pipeline/framework/container/compose/DockerComposedContainer.java
index 1b5970e5e06..8be68d776e9 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-scaling/src/test/java/org/apache/shardingsphere/integration/data/pipeline/framework/container/compose/DockerComposedContainer.java
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-scaling/src/test/java/org/apache/shardingsphere/integration/data/pipeline/framework/container/compose/DockerComposedContainer.java
@@ -29,30 +29,25 @@ import org.apache.shardingsphere.test.integration.env.runtime.DataSourceEnvironm
/**
* Composed container, include governance container and database container.
*/
-@Getter
public final class DockerComposedContainer extends BaseComposedContainer {
private final DatabaseType databaseType;
- private final GovernanceContainer governanceContainer;
-
private final ShardingSphereProxyDockerContainer proxyContainer;
+ @Getter
private final DatabaseContainer databaseContainer;
public DockerComposedContainer(final DatabaseType databaseType, final String dockerImageName) {
this.databaseType = databaseType;
- ShardingSphereProxyDockerContainer proxyContainer = new ShardingSphereProxyDockerContainer(databaseType);
- governanceContainer = getContainers().registerContainer(new ZookeeperContainer());
+ GovernanceContainer governanceContainer = getContainers().registerContainer(new ZookeeperContainer());
databaseContainer = getContainers().registerContainer(DatabaseContainerFactory.newInstance(databaseType, dockerImageName));
+ ShardingSphereProxyDockerContainer proxyContainer = new ShardingSphereProxyDockerContainer(databaseType);
proxyContainer.dependsOn(governanceContainer, databaseContainer);
+ ShardingSphereProxyDockerContainer anotherProxyContainer = new ShardingSphereProxyDockerContainer(databaseType);
+ anotherProxyContainer.dependsOn(governanceContainer, databaseContainer);
this.proxyContainer = getContainers().registerContainer(proxyContainer);
- }
-
- @Override
- public void stop() {
- super.stop();
- proxyContainer.stop();
+ getContainers().registerContainer(anotherProxyContainer);
}
@Override