zhoukangcn commented on code in PR #10046:
URL: https://github.com/apache/gravitino/pull/10046#discussion_r2881826601
##########
integration-test-common/src/test/java/org/apache/gravitino/integration/test/container/DorisContainer.java:
##########
@@ -63,78 +84,136 @@ protected DorisContainer(
Map<String, String> envVars,
Optional<Network> network) {
super(image, hostName, ports, extraHosts, filesToMount, envVars, network);
- }
- @Override
- protected void setupContainer() {
- super.setupContainer();
- withLogConsumer(new PrintingContainerLog(format("%-14s| ",
"DorisContainer")));
- withStartupTimeout(Duration.ofMinutes(5));
+ String dir = System.getenv("GRAVITINO_ROOT_DIR");
+ if (dir == null || dir.isEmpty()) {
+ throw new RuntimeException("GRAVITINO_ROOT_DIR is not set");
+ }
+ String composeFile =
+ ITUtils.joinPath(
+ dir, "integration-test-common", "doris-docker-script",
"docker-compose.yaml");
+
+ String effectiveImage =
+ (DEFAULT_IMAGE != null && !DEFAULT_IMAGE.isEmpty()) ? DEFAULT_IMAGE :
image;
+ Preconditions.check(
+ "Doris Docker image must be configured via
GRAVITINO_CI_DORIS_DOCKER_IMAGE or "
+ + "DorisContainer builder image",
+ effectiveImage != null && !effectiveImage.isEmpty());
+
+ composeContainer =
+ new ComposeContainer(new File(composeFile))
+ .withEnv("GRAVITINO_CI_DORIS_DOCKER_IMAGE", effectiveImage)
+ .withExposedService(
+ FE_SERVICE,
+ FE_MYSQL_PORT,
+
Wait.forListeningPort().withStartupTimeout(Duration.ofMinutes(3)))
+ .withExposedService(FE_SERVICE, FE_HTTP_PORT)
+ .withScaledService(BE_SERVICE, BE_SCALE)
+ .withStartupTimeout(Duration.ofMinutes(5))
Review Comment:
In my local testing, without pulling Docker images, it takes 25-35 seconds
(JDBC query available). Considering the CI environment, I have unified the
timeout to 120 seconds (consistent with the previous checkContainerStatus
timeout).
--
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]