You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by pa...@apache.org on 2022/08/08 09:22:20 UTC

[shardingsphere] branch master updated: Refactor : rename a variable to make it more clear (#19973)

This is an automated email from the ASF dual-hosted git repository.

panjuan 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 e86953f3472 Refactor : rename a variable to make it more clear (#19973)
e86953f3472 is described below

commit e86953f3472d42bf6b5c263f0506fefaf3cb18d9
Author: 孙念君 Nianjun Sun <su...@sphere-ex.com>
AuthorDate: Mon Aug 8 17:22:13 2022 +0800

    Refactor : rename a variable to make it more clear (#19973)
    
    * Refactor : rename a variable to make it more clear
    
    * Refactor : rename a variable to make it more clear
---
 .../atomic/adapter/impl/ShardingSphereProxyClusterContainer.java  | 6 +++---
 .../adapter/impl/ShardingSphereProxyStandaloneContainer.java      | 6 +++---
 .../container/proxy/ShardingSphereProxyDockerContainer.java       | 8 ++++----
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-env/src/test/java/org/apache/shardingsphere/test/integration/env/container/atomic/adapter/impl/ShardingSphereProxyClusterContainer.java b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-env/src/test/java/org/apache/shardingsphere/test/integration/env/container/atomic/adapter/impl/ShardingSphereProxyClusterContainer.java
index d878dc129bf..3b244e0f04b 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-env/src/test/java/org/apache/shardingsphere/test/integration/env/container/atomic/adapter/impl/ShardingSphereProxyClusterContainer.java
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-env/src/test/java/org/apache/shardingsphere/test/integration/env/container/atomic/adapter/impl/ShardingSphereProxyClusterContainer.java
@@ -71,9 +71,9 @@ public final class ShardingSphereProxyClusterContainer extends DockerITContainer
     }
     
     private void mapConfigurationFiles() {
-        String containerPath = "/opt/shardingsphere-proxy/conf";
-        withClasspathResourceMapping("/env/common/cluster/proxy/conf/", containerPath, BindMode.READ_ONLY);
-        withClasspathResourceMapping("/env/scenario/" + scenario + "/proxy/conf/" + databaseType.getType().toLowerCase(), containerPath, BindMode.READ_ONLY);
+        String pathInContainer = "/opt/shardingsphere-proxy/conf";
+        withClasspathResourceMapping("/env/common/cluster/proxy/conf/", pathInContainer, BindMode.READ_ONLY);
+        withClasspathResourceMapping("/env/scenario/" + scenario + "/proxy/conf/" + databaseType.getType().toLowerCase(), pathInContainer, BindMode.READ_ONLY);
     }
     
     @Override
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-env/src/test/java/org/apache/shardingsphere/test/integration/env/container/atomic/adapter/impl/ShardingSphereProxyStandaloneContainer.java b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-env/src/test/java/org/apache/shardingsphere/test/integration/env/container/atomic/adapter/impl/ShardingSphereProxyStandaloneContainer.java
index 2660111198a..e011bf72d95 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-env/src/test/java/org/apache/shardingsphere/test/integration/env/container/atomic/adapter/impl/ShardingSphereProxyStandaloneContainer.java
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-env/src/test/java/org/apache/shardingsphere/test/integration/env/container/atomic/adapter/impl/ShardingSphereProxyStandaloneContainer.java
@@ -73,9 +73,9 @@ public final class ShardingSphereProxyStandaloneContainer extends DockerITContai
     }
     
     private void mapConfigurationFiles() {
-        String containerPath = "/opt/shardingsphere-proxy/conf";
-        withClasspathResourceMapping("/env/common/standalone/proxy/conf/", containerPath, BindMode.READ_ONLY);
-        withClasspathResourceMapping("/env/scenario/" + scenario + "/proxy/conf/" + databaseType.getType().toLowerCase(), containerPath, BindMode.READ_ONLY);
+        String pathInContainer = "/opt/shardingsphere-proxy/conf";
+        withClasspathResourceMapping("/env/common/standalone/proxy/conf/", pathInContainer, BindMode.READ_ONLY);
+        withClasspathResourceMapping("/env/scenario/" + scenario + "/proxy/conf/" + databaseType.getType().toLowerCase(), pathInContainer, BindMode.READ_ONLY);
     }
     
     @Override
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-scaling/src/test/java/org/apache/shardingsphere/integration/data/pipeline/framework/container/proxy/ShardingSphereProxyDockerContainer.java b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-scaling/src/test/java/org/apache/shardingsphere/integration/data/pipeline/framework/container/proxy/ShardingSphereProxyDockerContainer.java
index 7f0491b8cc2..9323b622469 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-scaling/src/test/java/org/apache/shardingsphere/integration/data/pipeline/framework/container/proxy/ShardingSphereProxyDockerContainer.java
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-scaling/src/test/java/org/apache/shardingsphere/integration/data/pipeline/framework/container/proxy/ShardingSphereProxyDockerContainer.java
@@ -35,12 +35,12 @@ public final class ShardingSphereProxyDockerContainer extends DockerITContainer
     
     private final DatabaseType databaseType;
     
-    private final String dockerImageName;
+    private final String storageImageName;
     
-    public ShardingSphereProxyDockerContainer(final DatabaseType databaseType, final String dockerImageName) {
+    public ShardingSphereProxyDockerContainer(final DatabaseType databaseType, final String storageImageName) {
         super("Scaling-Proxy", "apache/shardingsphere-proxy-test");
         this.databaseType = databaseType;
-        this.dockerImageName = dockerImageName;
+        this.storageImageName = storageImageName;
     }
     
     @Override
@@ -58,7 +58,7 @@ public final class ShardingSphereProxyDockerContainer extends DockerITContainer
     
     private void mapConfigurationFiles() {
         if (DatabaseTypeUtil.isMySQL(databaseType)) {
-            String majorVersion = DatabaseTypeUtil.parseMajorVersion(dockerImageName);
+            String majorVersion = DatabaseTypeUtil.parseMajorVersion(storageImageName);
             withClasspathResourceMapping(String.format("/env/%s/server-%s.yaml", databaseType.getType().toLowerCase(), majorVersion), "/opt/shardingsphere-proxy/conf/server.yaml", BindMode.READ_ONLY);
         } else {
             withClasspathResourceMapping(String.format("/env/%s/server.yaml", databaseType.getType().toLowerCase()), "/opt/shardingsphere-proxy/conf/server.yaml", BindMode.READ_ONLY);