From 02e636b17578712e361153a3de9a0c4b5c9a9b4c Mon Sep 17 00:00:00 2001 From: ClownXC Date: Sun, 12 May 2024 00:10:39 +0800 Subject: [PATCH] fix --- .../common/container/AbstractTestContainer.java | 15 ++++++++++++++- .../spark/AbstractTestSparkContainer.java | 1 + .../seatunnel/e2e/common/util/ContainerUtil.java | 3 +++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/seatunnel-e2e/seatunnel-e2e-common/src/test/java/org/apache/seatunnel/e2e/common/container/AbstractTestContainer.java b/seatunnel-e2e/seatunnel-e2e-common/src/test/java/org/apache/seatunnel/e2e/common/container/AbstractTestContainer.java index d7bd0f4d747..37ba4b23260 100644 --- a/seatunnel-e2e/seatunnel-e2e-common/src/test/java/org/apache/seatunnel/e2e/common/container/AbstractTestContainer.java +++ b/seatunnel-e2e/seatunnel-e2e-common/src/test/java/org/apache/seatunnel/e2e/common/container/AbstractTestContainer.java @@ -17,6 +17,7 @@ package org.apache.seatunnel.e2e.common.container; +import groovy.util.logging.Slf4j; import org.apache.seatunnel.e2e.common.util.ContainerUtil; import org.slf4j.Logger; @@ -34,7 +35,6 @@ import static org.apache.seatunnel.e2e.common.util.ContainerUtil.adaptPathForWin; import static org.apache.seatunnel.e2e.common.util.ContainerUtil.copyConfigFileToContainer; import static org.apache.seatunnel.e2e.common.util.ContainerUtil.copyConnectorJarToContainer; - public abstract class AbstractTestContainer implements TestContainer { protected static final Logger LOG = LoggerFactory.getLogger(AbstractTestContainer.class); @@ -103,6 +103,19 @@ protected Container.ExecResult executeJob( throws IOException, InterruptedException { final String confInContainerPath = copyConfigFileToContainer(container, confFile); // copy connectors + LOG.info( + "Container[{}] Server SR Log:" + + "\n==================== Server SR Log====================\n" + + "{}" + + "ModulePath: {}" + + "namePrefix: {}" + + "connectorType: {}" + + "\n==================== Server SR Log end ====================", + container.getDockerImageName(), + confFile, + getConnectorModulePath(), + getConnectorNamePrefix(), + getConnectorType()); copyConnectorJarToContainer( container, confFile, diff --git a/seatunnel-e2e/seatunnel-e2e-common/src/test/java/org/apache/seatunnel/e2e/common/container/spark/AbstractTestSparkContainer.java b/seatunnel-e2e/seatunnel-e2e-common/src/test/java/org/apache/seatunnel/e2e/common/container/spark/AbstractTestSparkContainer.java index fe07d082afd..27e1505246a 100644 --- a/seatunnel-e2e/seatunnel-e2e-common/src/test/java/org/apache/seatunnel/e2e/common/container/spark/AbstractTestSparkContainer.java +++ b/seatunnel-e2e/seatunnel-e2e-common/src/test/java/org/apache/seatunnel/e2e/common/container/spark/AbstractTestSparkContainer.java @@ -111,6 +111,7 @@ public Container.ExecResult executeJob(String confFile) public Container.ExecResult executeJob(String confFile, List variables) throws IOException, InterruptedException { log.info("test in container: {}", identifier()); + log.info("sr-confFile: {}", confFile); return executeJob(master, confFile, variables); } diff --git a/seatunnel-e2e/seatunnel-e2e-common/src/test/java/org/apache/seatunnel/e2e/common/util/ContainerUtil.java b/seatunnel-e2e/seatunnel-e2e-common/src/test/java/org/apache/seatunnel/e2e/common/util/ContainerUtil.java index db627cfc583..fbfa8e388ad 100644 --- a/seatunnel-e2e/seatunnel-e2e-common/src/test/java/org/apache/seatunnel/e2e/common/util/ContainerUtil.java +++ b/seatunnel-e2e/seatunnel-e2e-common/src/test/java/org/apache/seatunnel/e2e/common/util/ContainerUtil.java @@ -91,6 +91,8 @@ public static void copyConnectorJarToContainer( connectorNames.addAll(getConnectors(jobConfig, connectors, "sink")); File module = new File(PROJECT_ROOT_PATH + File.separator + connectorsRootPath); + log.info("sr-module: {}", module); + log.info("sr-module-PATH: {}", module.getAbsolutePath()); List connectorFiles = getConnectorFiles(module, connectorNames, connectorPrefix); connectorFiles.forEach( jar -> @@ -224,6 +226,7 @@ public static String adaptPathForWin(String path) { public static List getConnectorFiles( File currentModule, Set connectorNames, String connectorPrefix) { List connectorFiles = new ArrayList<>(); + for (File file : Objects.requireNonNull(currentModule.listFiles())) { getConnectorFiles(file, connectorNames, connectorPrefix, connectorFiles); }