Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaochen-zhou committed May 11, 2024
1 parent 07501c5 commit 02e636b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ public Container.ExecResult executeJob(String confFile)
public Container.ExecResult executeJob(String confFile, List<String> variables)
throws IOException, InterruptedException {
log.info("test in container: {}", identifier());
log.info("sr-confFile: {}", confFile);
return executeJob(master, confFile, variables);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<File> connectorFiles = getConnectorFiles(module, connectorNames, connectorPrefix);
connectorFiles.forEach(
jar ->
Expand Down Expand Up @@ -224,6 +226,7 @@ public static String adaptPathForWin(String path) {
public static List<File> getConnectorFiles(
File currentModule, Set<String> connectorNames, String connectorPrefix) {
List<File> connectorFiles = new ArrayList<>();

for (File file : Objects.requireNonNull(currentModule.listFiles())) {
getConnectorFiles(file, connectorNames, connectorPrefix, connectorFiles);
}
Expand Down

0 comments on commit 02e636b

Please sign in to comment.