This is an automated email from the ASF dual-hosted git repository.

zihaoxiang pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new 74fd24b091 [Improvement][E2E] support e2e compose v2 fix code style 
(#15325)
74fd24b091 is described below

commit 74fd24b091d073572da1545574309a2ff91c33d4
Author: lizhenglei <[email protected]>
AuthorDate: Wed Dec 27 15:35:05 2023 +0800

    [Improvement][E2E] support e2e compose v2 fix code style (#15325)
    
    * support e2e compose v2 fix code stystle
    
    * fix
    
    * fix
    
    * fix version
    
    * Revert "fix version"
    
    This reverts commit 4f1c1963
    
    * fix version
    
    * fix blank
    
    ---------
    
    Co-authored-by: 80597928 <[email protected]>
    Co-authored-by: David Zollo <[email protected]>
---
 dolphinscheduler-bom/pom.xml                       |  2 +-
 .../e2e/core/DolphinSchedulerExtension.java        | 26 +++++++++++++---------
 dolphinscheduler-e2e/pom.xml                       |  2 +-
 3 files changed, 17 insertions(+), 13 deletions(-)

diff --git a/dolphinscheduler-bom/pom.xml b/dolphinscheduler-bom/pom.xml
index d4d4ee828f..c15fc164a7 100644
--- a/dolphinscheduler-bom/pom.xml
+++ b/dolphinscheduler-bom/pom.xml
@@ -119,7 +119,7 @@
         <esdk-obs.version>3.23.3</esdk-obs.version>
         <system-lambda.version>1.2.1</system-lambda.version>
         <zeppelin-client.version>0.10.1</zeppelin-client.version>
-        <testcontainer.version>1.17.6</testcontainer.version>
+        <testcontainer.version>1.19.3</testcontainer.version>
         <checker-qual.version>3.19.0</checker-qual.version>
         <zeppelin-client.version>0.10.1</zeppelin-client.version>
         <aliyun-voice.version>2.1.4</aliyun-voice.version>
diff --git 
a/dolphinscheduler-e2e/dolphinscheduler-e2e-core/src/main/java/org/apache/dolphinscheduler/e2e/core/DolphinSchedulerExtension.java
 
b/dolphinscheduler-e2e/dolphinscheduler-e2e-core/src/main/java/org/apache/dolphinscheduler/e2e/core/DolphinSchedulerExtension.java
index ce96044777..21c740952c 100644
--- 
a/dolphinscheduler-e2e/dolphinscheduler-e2e-core/src/main/java/org/apache/dolphinscheduler/e2e/core/DolphinSchedulerExtension.java
+++ 
b/dolphinscheduler-e2e/dolphinscheduler-e2e-core/src/main/java/org/apache/dolphinscheduler/e2e/core/DolphinSchedulerExtension.java
@@ -46,7 +46,7 @@ import org.openqa.selenium.chrome.ChromeOptions;
 import org.openqa.selenium.remote.RemoteWebDriver;
 import org.testcontainers.Testcontainers;
 import org.testcontainers.containers.BrowserWebDriverContainer;
-import org.testcontainers.containers.DockerComposeContainer;
+import org.testcontainers.containers.ComposeContainer;
 import org.testcontainers.containers.wait.strategy.Wait;
 import org.testcontainers.shaded.org.awaitility.Awaitility;
 import org.testcontainers.utility.DockerImageName;
@@ -67,14 +67,14 @@ final class DolphinSchedulerExtension implements 
BeforeAllCallback, AfterAllCall
     private final int DOCKER_PORT = 12345;
 
     private RemoteWebDriver driver;
-    private DockerComposeContainer<?> compose;
+    private ComposeContainer compose;
     private BrowserWebDriverContainer<?> browser;
     private HostAndPort address;
     private String rootPath;
 
     private Path record;
 
-    private final String serviceName = "dolphinscheduler_1";
+    private final String serviceName = "dolphinscheduler";
 
     @Override
     @SuppressWarnings("UnstableApiUsage")
@@ -194,7 +194,7 @@ final class DolphinSchedulerExtension implements 
BeforeAllCallback, AfterAllCall
         }
     }
 
-    private DockerComposeContainer<?> createDockerCompose(ExtensionContext 
context) {
+    private ComposeContainer createDockerCompose(ExtensionContext context) {
         final Class<?> clazz = context.getRequiredTestClass();
         final DolphinScheduler annotation = 
clazz.getAnnotation(DolphinScheduler.class);
         final List<File> files = Stream.of(annotation.composeFiles())
@@ -203,13 +203,17 @@ final class DolphinSchedulerExtension implements 
BeforeAllCallback, AfterAllCall
                                        .map(URL::getPath)
                                        .map(File::new)
                                        .collect(Collectors.toList());
-        compose = new DockerComposeContainer<>(files)
-            .withPull(true)
-            .withTailChildContainers(true)
-            .withLocalCompose(true)
-            .withExposedService(serviceName, DOCKER_PORT, 
Wait.forListeningPort().withStartupTimeout(Duration.ofSeconds(300)))
-            .withLogConsumer(serviceName, outputFrame -> 
LOGGER.info(outputFrame.getUtf8String()))
-            .waitingFor(serviceName, 
Wait.forHealthcheck().withStartupTimeout(Duration.ofSeconds(300)));
+                                                                          
+       ComposeContainer compose = new ComposeContainer(files)
+                .withPull(true)
+                .withTailChildContainers(true)
+                .withLocalCompose(true)
+                .withExposedService(
+                        serviceName,
+                        DOCKER_PORT, 
Wait.forListeningPort().withStartupTimeout(Duration.ofSeconds(300)))
+                .withLogConsumer(serviceName, outputFrame -> 
LOGGER.info(outputFrame.getUtf8String()))
+                .waitingFor(serviceName, 
Wait.forHealthcheck().withStartupTimeout(Duration.ofSeconds(300)));
+          
 
         return compose;
     }
diff --git a/dolphinscheduler-e2e/pom.xml b/dolphinscheduler-e2e/pom.xml
index ee831be1d7..c7ce90b1a6 100644
--- a/dolphinscheduler-e2e/pom.xml
+++ b/dolphinscheduler-e2e/pom.xml
@@ -119,7 +119,7 @@
             <dependency>
                 <groupId>org.testcontainers</groupId>
                 <artifactId>testcontainers-bom</artifactId>
-                <version>1.18.3</version>
+                <version>1.19.3</version>
                 <scope>import</scope>
                 <type>pom</type>
             </dependency>

Reply via email to