terrymanu commented on code in PR #20139:
URL: https://github.com/apache/shardingsphere/pull/20139#discussion_r945117250


##########
shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-env/src/test/java/org/apache/shardingsphere/test/integration/env/container/atomic/adapter/config/ProxyClusterContainerConfigurationFactory.java:
##########
@@ -0,0 +1,42 @@
+/*
+ * 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.integration.env.container.atomic.adapter.config;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Proxy cluster container configuration creator.
+ */
+public final class ProxyClusterContainerConfigurationFactory {
+    
+    /**
+     * Create adaptor container configuration.

Review Comment:
   Please ref the current factory to format your java doc



##########
shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-env/src/test/java/org/apache/shardingsphere/test/integration/env/container/atomic/adapter/config/AdaptorContainerConfiguration.java:
##########
@@ -17,28 +17,19 @@
 
 package 
org.apache.shardingsphere.test.integration.env.container.atomic.adapter.config;
 
-import org.apache.shardingsphere.infra.database.type.DatabaseType;
+import lombok.Getter;
+import lombok.RequiredArgsConstructor;
 
 import java.util.Map;
 
 /**
  * Adaptor container configuration.
  */
-public interface AdaptorContainerConfiguration {
+@RequiredArgsConstructor
+@Getter
+public final class AdaptorContainerConfiguration {
     
-    /**
-     * Get wait strategy info.
-     * 
-     * @return wait strategy info
-     */
-    Map<String, String> getWaitStrategyInfo();
+    private final String proxyDataSourceName;
     
-    /**
-     * Get docker container mapping resources.
-     * 
-     * @param scenario scenario
-     * @param databaseType database type
-     * @return docker container resource mapping
-     */
-    Map<String, String> getResourceMappings(String scenario, DatabaseType 
databaseType);
+    private final Map<String, String> mountedResource;

Review Comment:
   should be mountedResources



##########
shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-env/src/test/java/org/apache/shardingsphere/test/integration/env/container/atomic/adapter/config/ProxyClusterContainerConfigurationFactory.java:
##########
@@ -0,0 +1,42 @@
+/*
+ * 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.integration.env.container.atomic.adapter.config;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Proxy cluster container configuration creator.
+ */
+public final class ProxyClusterContainerConfigurationFactory {
+    
+    /**
+     * Create adaptor container configuration.
+     * 
+     * @return adaptor container configuration
+     */
+    public static AdaptorContainerConfiguration newInstance() {
+        return new AdaptorContainerConfiguration("", getMountedResource());
+    }
+    
+    private static Map<String, String> getMountedResource() {
+        Map<String, String> result = new HashMap<>(1, 1);

Review Comment:
   Please use Collections.singletonMap to simplify your code



##########
shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-scaling/src/test/java/org/apache/shardingsphere/integration/data/pipeline/framework/container/config/proxy/ScalingProxyClusterContainerConfigurationFactory.java:
##########
@@ -20,31 +20,33 @@
 import lombok.RequiredArgsConstructor;
 import org.apache.shardingsphere.infra.database.type.DatabaseType;
 import 
org.apache.shardingsphere.test.integration.env.container.atomic.adapter.config.AdaptorContainerConfiguration;
+import 
org.apache.shardingsphere.test.integration.env.container.atomic.adapter.config.ProxyClusterContainerConfigurationFactory;
 import 
org.apache.shardingsphere.test.integration.env.container.atomic.util.DatabaseTypeUtil;
 
-import java.util.Collections;
-import java.util.HashMap;
 import java.util.Map;
 
 /**
- * Scaling proxy cluster container configuration.
+ * Scaling proxy cluster container configuration creator.
  */
 @RequiredArgsConstructor

Review Comment:
   What is the useful of @RequiredArgsConstructor?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to