SbloodyS commented on code in PR #15325: URL: https://github.com/apache/dolphinscheduler/pull/15325#discussion_r1427978265
########## dolphinscheduler-e2e/pom.xml: ########## @@ -15,15 +15,14 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> -<project xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Review Comment: Same here. ########## dolphinscheduler-e2e/pom.xml: ########## @@ -15,15 +15,14 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> -<project xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>org.apache.dolphinscheduler</groupId> <artifactId>dolphinscheduler-e2e</artifactId> - <packaging>pom</packaging> <version>1.0-SNAPSHOT</version> + <packaging>pom</packaging> Review Comment: Same here. ########## dolphinscheduler-e2e/pom.xml: ########## @@ -43,8 +42,34 @@ <slf4j-api.version>1.7.36</slf4j-api.version> <log4j-slf4j-impl.version>2.17.2</log4j-slf4j-impl.version> <guava.version>31.0.1-jre</guava.version> + + </properties> + <dependencyManagement> + <dependencies> + <dependency> + <groupId>com.google.guava</groupId> + <artifactId>guava</artifactId> + <version>${guava.version}</version> + </dependency> + <dependency> + <groupId>org.junit</groupId> + <artifactId>junit-bom</artifactId> + <version>${junit.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + <dependency> + <groupId>org.testcontainers</groupId> + <artifactId>testcontainers-bom</artifactId> + <version>1.19.3</version> + <type>pom</type> + <scope>import</scope> + </dependency> + </dependencies> + </dependencyManagement> Review Comment: Same here. ########## dolphinscheduler-e2e/dolphinscheduler-e2e-core/src/main/java/org/apache/dolphinscheduler/e2e/core/DolphinSchedulerExtension.java: ########## @@ -194,22 +195,24 @@ private void setDriver(Object object, Field field) { } } - 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()) - .map(it -> DolphinScheduler.class.getClassLoader().getResource(it)) - .filter(Objects::nonNull) - .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))); + .map(it -> DolphinScheduler.class.getClassLoader().getResource(it)) + .filter(Objects::nonNull) + .map(URL::getPath) + .map(File::new) + .collect(Collectors.toList()); + 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))); Review Comment: Same here. ########## dolphinscheduler-e2e/dolphinscheduler-e2e-core/src/main/java/org/apache/dolphinscheduler/e2e/core/DolphinSchedulerExtension.java: ########## @@ -126,8 +127,8 @@ private void runInLocal() { private void runInDockerContainer(ExtensionContext context) { compose = createDockerCompose(context); compose.start(); - - address = HostAndPort.fromParts("host.testcontainers.internal", compose.getServicePort(serviceName, DOCKER_PORT)); + address = + HostAndPort.fromParts("host.testcontainers.internal", compose.getServicePort(serviceName, DOCKER_PORT)); Review Comment: Please do not add meaningless modifications. ########## dolphinscheduler-e2e/pom.xml: ########## @@ -43,8 +42,34 @@ <slf4j-api.version>1.7.36</slf4j-api.version> <log4j-slf4j-impl.version>2.17.2</log4j-slf4j-impl.version> <guava.version>31.0.1-jre</guava.version> + + Review Comment: Same here. -- 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]
