JNSimba commented on code in PR #575: URL: https://github.com/apache/doris-flink-connector/pull/575#discussion_r1998577395
########## flink-doris-connector/src/test/java/org/apache/doris/flink/container/instance/DorisContainer.java: ########## @@ -145,6 +186,89 @@ private void initializeVariables() throws Exception { LOG.info("Init variables successfully."); } + // wait for container running + private void waitForContainerRunning() { + LOG.info("Waiting for Doris services to be accessible..."); + + try { + Awaitility.await("FE HTTP Service") + .atMost(5, TimeUnit.MINUTES) + .pollInterval(1, TimeUnit.SECONDS) + .until( + () -> { + try { + ExecResult result = + dorisContainer.execInContainer( + "curl", + "-s", + "-o", + "/dev/null", + "-w", + "%{http_code}", + "-m", + "2", + "http://localhost:" + FE.HTTP_PORT); + boolean ready = result.getStdout().equals("200"); Review Comment: You can directly use the verification method in DorisContaier.startContainer -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org