Browse Source

[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 <673421862@qq.com>
Co-authored-by: David Zollo <dailidong66@gmail.com>
3.2.1-prepare
lizhenglei 11 months ago committed by GitHub
parent
commit
74fd24b091
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      dolphinscheduler-bom/pom.xml
  2. 26
      dolphinscheduler-e2e/dolphinscheduler-e2e-core/src/main/java/org/apache/dolphinscheduler/e2e/core/DolphinSchedulerExtension.java
  3. 2
      dolphinscheduler-e2e/pom.xml

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

26
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;
}

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

Loading…
Cancel
Save