taojintianxia commented on code in PR #20169:
URL: https://github.com/apache/shardingsphere/pull/20169#discussion_r945314895
##########
shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-env/src/test/java/org/apache/shardingsphere/test/integration/env/container/atomic/storage/config/impl/mysql/MySQLContainerConfigurationFactory.java:
##########
@@ -17,32 +17,43 @@
package
org.apache.shardingsphere.test.integration.env.container.atomic.storage.config.impl.mysql;
-import
org.apache.shardingsphere.test.integration.env.container.atomic.storage.config.StorageContainerConfiguration;
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
-public class DefaultMySQLContainerConfiguration implements
StorageContainerConfiguration {
+/**
+ * MySQL container configuration factory.
+ */
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public final class MySQLContainerConfigurationFactory {
+
+ /**
+ * Create new instance of mysql container configuration.
+ *
+ * @return created instance
+ */
+ public static MySQLContainerConfiguration newInstance() {
+ return new MySQLContainerConfiguration(getCommands(),
getContainerEnvs(), getMountedResources());
+ }
- @Override
- public String[] getCommands() {
+ private static String[] getCommands() {
// TODO need auto set server-id by generator, now always set server-id
to 1
String[] commands = new String[1];
commands[0] = "--server-id=1";
return commands;
}
- @Override
- public Map<String, String> getEnvs() {
+ private static Map<String, String> getContainerEnvs() {
Map<String, String> result = new HashMap<>();
Review Comment:
done
--
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]