XiaoHongbo-Hope opened a new pull request, #8833:
URL: https://github.com/apache/paimon/pull/8833
### Purpose
`SparkMultimodalITCase` hardcodes port `9092` (which is also Kafka's default
port) for its test Hive metastore, so `TestHiveMetastore.start(9092)`
intermittently fails when the port is already taken:
```
java.lang.RuntimeException: Cannot start TestHiveMetastore
at
org.apache.paimon.spark.SparkMultimodalITCase.startMetastore(SparkMultimodalITCase.java:49)
[ERROR] Tests run: 196, Failures: 0, Errors: 1, Skipped: 0
```
This is currently flaky on master too (e.g. the `UTCase and ITCase Spark
4.x` job fails on several recent master pushes with the exact same error).
Start the metastore on port `0` (an OS-assigned free port, which
`TestHiveMetastore` already resolves via `getLocalPort()`) and read the actual
port back through a new `TestHiveMetastore.getPort()` for the Spark configs, so
the test no longer depends on a fixed port being free.
### Tests
Exercised by `SparkMultimodalITCase` itself; the fixed-port race can't be
reproduced deterministically in a unit test.
--
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]