You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/09/14 06:13:51 UTC

[GitHub] [shardingsphere] taojintianxia opened a new pull request, #20967: Refactor : refactor the IT to support customized proxy test image.

taojintianxia opened a new pull request, #20967:
URL: https://github.com/apache/shardingsphere/pull/20967

   
   ---
   
   Before committing this PR, I'm sure that I have checked the following options:
   - [x] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project.
   - [x] I have self-reviewed the commit code.
   - [x] I have triggered maven check: `mvn clean install -B -T2C -DskipTests -Dmaven.javadoc.skip=true -e`.
   - [x] I have made corresponding changes to the documentation.
   - [x] I have added corresponding unit tests for my changes.
   
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] taojintianxia commented on a diff in pull request #20967: Refactor : refactor the IT to support customized proxy test image.

Posted by GitBox <gi...@apache.org>.
taojintianxia commented on code in PR #20967:
URL: https://github.com/apache/shardingsphere/pull/20967#discussion_r970505233


##########
shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-env/src/test/java/org/apache/shardingsphere/test/integration/env/container/atomic/util/AdapterContainerUtil.java:
##########
@@ -0,0 +1,39 @@
+/*
+ * 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.util;
+
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
+import org.apache.shardingsphere.test.integration.env.container.atomic.constants.ProxyContainerConstants;
+
+/**
+ * Adapter Container Util.
+ */
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public class AdapterContainerUtil {
+    
+    /**
+     * Get adapter container image.
+     * 
+     * @return adapter container image
+     */
+    public static String getAdapterContainerImage() {
+        String result = System.getProperty("it.docker.proxy.image");

Review Comment:
   thanks @TeslaCN 
   
   fixed.



-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] sandynz commented on a diff in pull request #20967: Refactor : refactor the IT to support customized proxy test image.

Posted by GitBox <gi...@apache.org>.
sandynz commented on code in PR #20967:
URL: https://github.com/apache/shardingsphere/pull/20967#discussion_r972835998


##########
shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-scaling/src/test/java/org/apache/shardingsphere/integration/data/pipeline/framework/container/compose/DockerContainerComposer.java:
##########
@@ -65,7 +65,7 @@ public DockerContainerComposer(final DatabaseType databaseType, final String sto
             storageContainerConfig = StorageContainerConfigurationFactory.newInstance(databaseType);
         }
         storageContainer = getContainers().registerContainer((DockerStorageContainer) StorageContainerFactory.newInstance(databaseType, storageContainerImage,
-                "", storageContainerConfig));
+                "", StorageContainerConfigurationFactory.newInstance(databaseType)));

Review Comment:
   Seems it should use `storageContainerConfig`, but not create another instance



-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] sandynz merged pull request #20967: Refactor : refactor the IT to support customized proxy test image.

Posted by GitBox <gi...@apache.org>.
sandynz merged PR #20967:
URL: https://github.com/apache/shardingsphere/pull/20967


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] TeslaCN commented on a diff in pull request #20967: Refactor : refactor the IT to support customized proxy test image.

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on code in PR #20967:
URL: https://github.com/apache/shardingsphere/pull/20967#discussion_r970363111


##########
shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-env/src/test/java/org/apache/shardingsphere/test/integration/env/container/atomic/util/AdapterContainerUtil.java:
##########
@@ -0,0 +1,39 @@
+/*
+ * 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.util;
+
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
+import org.apache.shardingsphere.test.integration.env.container.atomic.constants.ProxyContainerConstants;
+
+/**
+ * Adapter Container Util.
+ */
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public class AdapterContainerUtil {
+    
+    /**
+     * Get adapter container image.
+     * 
+     * @return adapter container image
+     */
+    public static String getAdapterContainerImage() {
+        String result = System.getProperty("it.docker.proxy.image");

Review Comment:
   Default value could be specified in `System.getProperty("prop", "defaultValue")`.



-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] taojintianxia commented on a diff in pull request #20967: Refactor : refactor the IT to support customized proxy test image.

Posted by GitBox <gi...@apache.org>.
taojintianxia commented on code in PR #20967:
URL: https://github.com/apache/shardingsphere/pull/20967#discussion_r974961295


##########
shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-scaling/src/test/java/org/apache/shardingsphere/integration/data/pipeline/framework/container/compose/DockerContainerComposer.java:
##########
@@ -65,7 +65,7 @@ public DockerContainerComposer(final DatabaseType databaseType, final String sto
             storageContainerConfig = StorageContainerConfigurationFactory.newInstance(databaseType);
         }
         storageContainer = getContainers().registerContainer((DockerStorageContainer) StorageContainerFactory.newInstance(databaseType, storageContainerImage,
-                "", storageContainerConfig));
+                "", StorageContainerConfigurationFactory.newInstance(databaseType)));

Review Comment:
   fixed



##########
shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-scaling/src/test/java/org/apache/shardingsphere/integration/data/pipeline/framework/container/compose/DockerContainerComposer.java:
##########
@@ -65,7 +65,7 @@ public DockerContainerComposer(final DatabaseType databaseType, final String sto
             storageContainerConfig = StorageContainerConfigurationFactory.newInstance(databaseType);
         }
         storageContainer = getContainers().registerContainer((DockerStorageContainer) StorageContainerFactory.newInstance(databaseType, storageContainerImage,
-                "", storageContainerConfig));
+                "", StorageContainerConfigurationFactory.newInstance(databaseType)));

Review Comment:
   fixed



-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] azexcy commented on a diff in pull request #20967: Refactor : refactor the IT to support customized proxy test image.

Posted by GitBox <gi...@apache.org>.
azexcy commented on code in PR #20967:
URL: https://github.com/apache/shardingsphere/pull/20967#discussion_r972841922


##########
shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-scaling/src/test/java/org/apache/shardingsphere/integration/data/pipeline/framework/container/compose/DockerContainerComposer.java:
##########
@@ -65,7 +65,7 @@ public DockerContainerComposer(final DatabaseType databaseType, final String sto
             storageContainerConfig = StorageContainerConfigurationFactory.newInstance(databaseType);
         }
         storageContainer = getContainers().registerContainer((DockerStorageContainer) StorageContainerFactory.newInstance(databaseType, storageContainerImage,
-                "", storageContainerConfig));
+                "", StorageContainerConfigurationFactory.newInstance(databaseType)));

Review Comment:
   create mysql 8 container will volumn another `my.cnf`, relation code is at 61~64 line at this file



-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] taojintianxia commented on a diff in pull request #20967: Refactor : refactor the IT to support customized proxy test image.

Posted by GitBox <gi...@apache.org>.
taojintianxia commented on code in PR #20967:
URL: https://github.com/apache/shardingsphere/pull/20967#discussion_r970505233


##########
shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-env/src/test/java/org/apache/shardingsphere/test/integration/env/container/atomic/util/AdapterContainerUtil.java:
##########
@@ -0,0 +1,39 @@
+/*
+ * 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.util;
+
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
+import org.apache.shardingsphere.test.integration.env.container.atomic.constants.ProxyContainerConstants;
+
+/**
+ * Adapter Container Util.
+ */
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public class AdapterContainerUtil {
+    
+    /**
+     * Get adapter container image.
+     * 
+     * @return adapter container image
+     */
+    public static String getAdapterContainerImage() {
+        String result = System.getProperty("it.docker.proxy.image");

Review Comment:
   got it.



-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] taojintianxia commented on a diff in pull request #20967: Refactor : refactor the IT to support customized proxy test image.

Posted by GitBox <gi...@apache.org>.
taojintianxia commented on code in PR #20967:
URL: https://github.com/apache/shardingsphere/pull/20967#discussion_r970505233


##########
shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-env/src/test/java/org/apache/shardingsphere/test/integration/env/container/atomic/util/AdapterContainerUtil.java:
##########
@@ -0,0 +1,39 @@
+/*
+ * 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.util;
+
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
+import org.apache.shardingsphere.test.integration.env.container.atomic.constants.ProxyContainerConstants;
+
+/**
+ * Adapter Container Util.
+ */
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public class AdapterContainerUtil {
+    
+    /**
+     * Get adapter container image.
+     * 
+     * @return adapter container image
+     */
+    public static String getAdapterContainerImage() {
+        String result = System.getProperty("it.docker.proxy.image");

Review Comment:
   thanks @TeslaCN 
   
   refactored.



-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org