github-actions[bot] commented on code in PR #64113:
URL: https://github.com/apache/doris/pull/64113#discussion_r3449600371


##########
regression-test/suites/external_table_p0/paimon/test_paimon_jdbc_catalog.groovy:
##########
@@ -66,38 +66,58 @@ suite("test_paimon_jdbc_catalog", "p0,external") {
 
     assertTrue(jdbcDriversDir != null && !jdbcDriversDir.isEmpty(), 
"jdbc_drivers_dir must be configured")
 
-    def executeCommand = { String cmd, Boolean mustSuc ->
+    def executeCommand = { String cmd, Boolean mustSuc, int timeoutSeconds = 
300 ->
+        StringBuilder stdout = new StringBuilder()
+        StringBuilder stderr = new StringBuilder()
         try {
             logger.info("execute ${cmd}")
-            def proc = new ProcessBuilder("/bin/bash", "-c", 
cmd).redirectErrorStream(true).start()
-            int exitcode = proc.waitFor()
-            String output = proc.text
+            def proc = new ProcessBuilder("/bin/bash", "-c", cmd).start()
+            proc.consumeProcessOutput(stdout, stderr)
+            proc.waitForOrKill(timeoutSeconds * 1000)
+            int exitcode = proc.exitValue()
+            String output = stdout.toString()
+            String error = stderr.toString()
             if (exitcode != 0) {
-                logger.info("exit code: ${exitcode}, output\n: ${output}")
+                logger.info("exit code: ${exitcode}, stdout\n: 
${output}\nstderr\n: ${error}")
                 if (mustSuc) {
-                    assertTrue(false, "Execute failed: ${cmd}")
+                    assertTrue(false, "Execute failed: 
${cmd}\nstdout:\n${output}\nstderr:\n${error}")
                 }
             }
             return output
         } catch (IOException e) {
-            assertTrue(false, "Execute timeout: ${cmd}")
+            assertTrue(false, "Execute failed: ${cmd}, err: ${e.message}")
         }
     }
 
-    executeCommand("mkdir -p ${localDriverDir}", false)
-    executeCommand("mkdir -p ${jdbcDriversDir}", true)
+    executeCommand("mkdir -p ${localDriverDir}", false, 60)
+    executeCommand("mkdir -p ${jdbcDriversDir}", true, 60)
     if (!new File(localDriverPath).exists()) {
-        executeCommand("/usr/bin/curl --max-time 600 ${driverDownloadUrl} 
--output ${localDriverPath}", true)
+        executeCommand("/usr/bin/curl --max-time 600 ${driverDownloadUrl} 
--output ${localDriverPath}", true, 660)
     }
-    executeCommand("cp -f ${localDriverPath} ${jdbcDriversDir}/${driverName}", 
true)
+    executeCommand("cp -f ${localDriverPath} ${jdbcDriversDir}/${driverName}", 
true, 60)
 
-    String sparkContainerName = executeCommand("docker ps --filter 
name=spark-iceberg --format {{.Names}}", false)
+    String sparkContainerName = executeCommand("docker ps --filter 
name=spark-iceberg --format {{.Names}}", false, 30)
             ?.trim()
     if (sparkContainerName == null || sparkContainerName.isEmpty()) {
         logger.info("spark-iceberg container not found, skip this test")
         return
     }
-    executeCommand("docker cp ${localDriverPath} 
${sparkContainerName}:${sparkDriverPath}", true)
+    executeCommand("docker cp ${localDriverPath} 
${sparkContainerName}:${sparkDriverPath}", true, 60)
+
+    String sparkMinioEndpoint = "http://${externalEnvIp}:${minioPort}";
+    if (sparkContainerName.contains("spark-iceberg")) {
+        String sparkMinioContainerName = 
sparkContainerName.replaceFirst("spark-iceberg", "minio")

Review Comment:
   The standard Iceberg/Paimon compose template names these containers 
`doris--spark-iceberg` and `doris--iceberg-minio` 
(`docker/thirdparties/docker-compose/iceberg/iceberg.yaml.tpl`). With that 
setup, this replacement derives `doris--minio`, so the subsequent `docker ps 
--filter name=doris--minio` does not find the actual MinIO container and 
`sparkMinioEndpoint` stays on the host-mapped `${externalEnvIp}:${minioPort}` 
path. In the standard regression config that is `127.0.0.1:19001`, which is 
still localhost from inside `docker exec ${sparkContainerName}`. That leaves 
the same Spark-in-Docker connectivity problem this PR is trying to fix in the 
default external test environment. Please derive the sibling name as 
`...iceberg-minio` or otherwise resolve the MinIO container/service alias from 
the compose network instead of replacing `spark-iceberg` with just `minio`.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to