voonhous opened a new issue, #19894: URL: https://github.com/apache/hudi/issues/19894
Found while reviewing #19892 (part of #19524). `HiveTestService` (HiveServer2 port, and the metastore port it already picked this way), and `ZookeeperTestService` choose a port with `NetworkTestUtils.nextFreePort()`, which binds port 0, reads the number and closes the socket. The port is then bound later, and re-bound by every subsequent test class in the same JVM, with no retry. Ports from bind(0) come from the ephemeral range, so another process, Spark or Netty outbound connections, or a sibling surefire fork can take it in between, and every Hive or ZK test in that JVM then fails. `HdfsTestService` already handles this: #2070 added a five-attempt retry around port selection for exactly this reason. Proposed fix: retry the pick-and-bind in `HiveTestService.start()` and `ZookeeperTestService.start()` on `BindException`, and expose the JDBC URL and connect string as methods rather than constants so a retried port is visible to callers. -- 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]
