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


##########
shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-env/src/test/java/org/apache/shardingsphere/test/integration/env/container/atomic/adapter/config/ProxyClusterContainerConfigurationCreator.java:
##########
@@ -0,0 +1,48 @@
+/*
+ * 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 lombok.RequiredArgsConstructor;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Proxy cluster container configuration creator.
+ */
+@RequiredArgsConstructor

Review Comment:
   Why use `@RequiredArgsConstructor` here?



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

Review Comment:
   The element of map is one, why the initial size is `2`?



##########
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,20 @@
 
 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
+public final class AdaptorContainerConfiguration {
     
-    /**
-     * Get wait strategy info.
-     * 
-     * @return wait strategy info
-     */
-    Map<String, String> getWaitStrategyInfo();
+    @Getter

Review Comment:
   Can `@Getter` move to class level?



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

Review Comment:
   How about rename Creator to Factory? It is better to keep consist with other 
codes with ShardingSphere



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

Review Comment:
   Please do not use abbreviation in java doc 



##########
shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-env/src/test/java/org/apache/shardingsphere/test/integration/env/container/atomic/adapter/AdapterContainerFactory.java:
##########
@@ -40,15 +40,15 @@ public final class AdapterContainerFactory {
      * @param databaseType database type
      * @param storageContainer storage container
      * @param scenario scenario
-     * @param adaptorContainerConfig adaptor container configuration
+     * @param containerConfig adaptor container configuration
      * @return adapter container
      */
     public static AdapterContainer newInstance(final String mode, final String 
adapter, final DatabaseType databaseType,
-                                               final StorageContainer 
storageContainer, final String scenario, final AdaptorContainerConfiguration 
adaptorContainerConfig) {
+                                               final StorageContainer 
storageContainer, final String scenario, final AdaptorContainerConfiguration 
containerConfig) {
         switch (adapter) {
             case "proxy":
                 if ("Cluster".equalsIgnoreCase(mode)) {

Review Comment:
   Please use ternary expression



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

Review Comment:
   Please leave blank line between javadoc content and return value.



##########
shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-env/src/test/java/org/apache/shardingsphere/test/integration/env/container/atomic/adapter/AdapterContainerFactory.java:
##########
@@ -40,15 +40,15 @@ public final class AdapterContainerFactory {
      * @param databaseType database type
      * @param storageContainer storage container

Review Comment:
   Why use storage container and database type together, is storage container 
include database type?



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

Review Comment:
   Is it necessary to create an independent method?



##########
shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-env/src/test/java/org/apache/shardingsphere/test/integration/env/container/atomic/adapter/config/ProxyClusterContainerConfigurationCreator.java:
##########
@@ -0,0 +1,48 @@
+/*
+ * 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 lombok.RequiredArgsConstructor;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Proxy cluster container configuration creator.
+ */
+@RequiredArgsConstructor
+public final class ProxyClusterContainerConfigurationCreator {
+    
+    /**
+     * Create adaptor container config.
+     * @return adaptor container config
+     */
+    public static AdaptorContainerConfiguration create() {

Review Comment:
   How about change method name to newInstance? It is better to keep consist 
with other codes with ShardingSphere



-- 
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