liugddx commented on code in PR #6217:
URL: https://github.com/apache/seatunnel/pull/6217#discussion_r1455112106


##########
seatunnel-e2e/seatunnel-engine-e2e/connector-seatunnel-e2e-base/src/test/java/org/apache/seatunnel/engine/e2e/ClusterSeaTunnelContainer.java:
##########
@@ -0,0 +1,498 @@
+/*
+ * 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.seatunnel.engine.e2e;
+
+import org.apache.seatunnel.e2e.common.util.ContainerUtil;
+import org.apache.seatunnel.engine.server.rest.RestConstant;
+
+import org.awaitility.Awaitility;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.testcontainers.containers.GenericContainer;
+import org.testcontainers.containers.Network;
+import org.testcontainers.containers.output.Slf4jLogConsumer;
+import org.testcontainers.containers.wait.strategy.Wait;
+import org.testcontainers.utility.DockerLoggerFactory;
+import org.testcontainers.utility.MountableFile;
+
+import io.restassured.response.Response;
+
+import java.io.IOException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import static io.restassured.RestAssured.given;
+import static 
org.apache.seatunnel.e2e.common.util.ContainerUtil.PROJECT_ROOT_PATH;
+import static org.hamcrest.Matchers.equalTo;
+
+public class ClusterSeaTunnelContainer extends SeaTunnelContainer {
+    private static final String JDK_DOCKER_IMAGE = "openjdk:8";
+    private static final String SERVER_SHELL = "seatunnel-cluster.sh";
+
+    private GenericContainer<?> secondServer;
+
+    private final Network NETWORK = Network.newNetwork();
+
+    private static final String jobName = "test测试";
+    private static final String paramJobName = "param_test测试";
+
+    private static final String http = "http://";;
+
+    private static final String colon = ":";
+
+    private static final String confFile = "/fakesource_to_console.conf";
+
+    @Override
+    @BeforeEach
+    public void startUp() throws Exception {
+        Path binPath = Paths.get(SEATUNNEL_HOME, "bin", SERVER_SHELL);
+        Path config = Paths.get(SEATUNNEL_HOME, "config");
+        Path hadoopJar = Paths.get(SEATUNNEL_HOME, 
"lib/seatunnel-hadoop3-3.1.4-uber.jar");
+
+        server =

Review Comment:
   > Seem like just same code copy twice. Could you do some refactor to extract 
a method?
   
   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]

Reply via email to