This is an automated email from the ASF dual-hosted git repository.

JackieTien97 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new 2fd7d838cba [IT] Read the address column of lsof when checking port 
occupation (#19070)
2fd7d838cba is described below

commit 2fd7d838cbab3bd8645681b8020c5597e340378d
Author: Christofer Dutz <[email protected]>
AuthorDate: Wed Nov 4 01:23:06 2026 +0100

    [IT] Read the address column of lsof when checking port occupation (#19070)
---
 .../src/main/java/org/apache/iotdb/it/env/cluster/EnvUtils.java      | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/EnvUtils.java 
b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/EnvUtils.java
index b69e86c12bd..56393827005 100644
--- 
a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/EnvUtils.java
+++ 
b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/EnvUtils.java
@@ -175,12 +175,15 @@ public class EnvUtils {
   /**
    * List occupied port and the associated pid on Unix.
    *
+   * <p>A line of the lsof output splits into 10 columns, e.g. {@code java 
1234 user 77u IPv6 0x1a2b
+   * 0t0 TCP 127.0.0.1:6667 (LISTEN)}. The address is in column 8 and the 
state in column 9.
+   *
    * @param ports ports to be checked
    * @return (occupiedPort, pid) pairs
    */
   public static Map<Integer, Long> listPortOccupationUnix(final List<Integer> 
ports)
       throws IOException {
-    return listPortOccupation(ports, "lsof -iTCP -sTCP:LISTEN,TIME_WAIT -P 
-n", 10, 9, 1);
+    return listPortOccupation(ports, "lsof -iTCP -sTCP:LISTEN,TIME_WAIT -P 
-n", 10, 8, 1);
   }
 
   private static Pair<Integer, Integer> getClusterNodesNum(final int index) {

Reply via email to