This is an automated email from the ASF dual-hosted git repository.
SteNicholas pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/celeborn.git
The following commit(s) were added to refs/heads/main by this push:
new 1a4d42e66a [MINOR] Use a random master port in
HybridShuffleWordCountTest
1a4d42e66a is described below
commit 1a4d42e66a043c1b951bbc34802e075d78ad0673
Author: ForVic <[email protected]>
AuthorDate: Sun Nov 8 12:00:07 2026 +0800
[MINOR] Use a random master port in HybridShuffleWordCountTest
### What changes were proposed in this pull request?
Stop pinning the master in `HybridShuffleWordCountTest` to port `9097`. Use
the random port chosen by `setupMiniClusterWithRandomPorts` and read it back
from the master conf, as `SplitTest` does.
### Why are the changes needed?
The test is flaky. Other suites pick ports at random from `[1024, 32767]`,
so an earlier suite in the same run can hold `9097`. The fixed port overrides
the random one, so every setup retry tries `9097` again and the suite aborts:
```
java.net.BindException: Address already in use: Service 'Master' failed
after 0 retries (starting from 9097)!
org.apache.celeborn.tests.flink.HybridShuffleWordCountTest *** ABORTED ***
```
This happened in `flink2 (11, 2.0)` on #3949, which doesn't touch Flink.
### Does this PR resolve a correctness bug?
- [ ] Yes
### Does this PR introduce _any_ user-facing change?
- [ ] Yes
### How was this patch tested?
`HybridShuffleWordCountTest` passes locally with Flink 2.0 / JDK 17 (4
tests).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Closes #3950 from ForVic/ForVic/flink-hybrid-test-random-port.
Authored-by: ForVic <[email protected]>
Signed-off-by: Nicholas Jiang <[email protected]>
---
.../celeborn/tests/flink/HybridShuffleWordCountTest.scala | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git
a/tests/flink-it/src/test/scala/org/apache/celeborn/tests/flink/HybridShuffleWordCountTest.scala
b/tests/flink-it/src/test/scala/org/apache/celeborn/tests/flink/HybridShuffleWordCountTest.scala
index ef71860d8c..3bc29979e5 100644
---
a/tests/flink-it/src/test/scala/org/apache/celeborn/tests/flink/HybridShuffleWordCountTest.scala
+++
b/tests/flink-it/src/test/scala/org/apache/celeborn/tests/flink/HybridShuffleWordCountTest.scala
@@ -39,6 +39,7 @@ import org.apache.celeborn.service.deploy.worker.Worker
class HybridShuffleWordCountTest extends AnyFunSuite with Logging with
MiniClusterFeature
with BeforeAndAfterAll {
var workers: collection.Set[Worker] = null
+ var port = 0
val NUM_PARALLELISM = 8
@@ -48,11 +49,9 @@ class HybridShuffleWordCountTest extends AnyFunSuite with
Logging with MiniClust
override def beforeAll(): Unit = {
logInfo("test initialized , setup celeborn mini cluster")
- val masterConf = Map(
- "celeborn.master.host" -> "localhost",
- "celeborn.master.port" -> "9097")
- val workerConf = Map("celeborn.master.endpoints" -> "localhost:9097")
- workers = setupMiniClusterWithRandomPorts(masterConf, workerConf)._2
+ val (m, w) = setupMiniClusterWithRandomPorts()
+ workers = w
+ port = m.conf.get(CelebornConf.MASTER_PORT)
}
override def afterAll(): Unit = {
@@ -101,7 +100,7 @@ class HybridShuffleWordCountTest extends AnyFunSuite with
Logging with MiniClust
configuration.setString(
"taskmanager.network.hybrid-shuffle.external-remote-tier-factory.class",
"org.apache.celeborn.plugin.flink.tiered.CelebornTierFactory")
- configuration.setString("celeborn.master.endpoints", "localhost:9097")
+ configuration.setString(CelebornConf.MASTER_ENDPOINTS.key,
s"localhost:$port")
if (integrityCheckEnabled) {
configuration.setString(CelebornConf.CLIENT_SHUFFLE_INTEGRITY_CHECK_ENABLED.key,
"true")
}
@@ -142,7 +141,7 @@ class HybridShuffleWordCountTest extends AnyFunSuite with
Logging with MiniClust
configuration.setString(
"taskmanager.network.hybrid-shuffle.external-remote-tier-factory.class",
"org.apache.celeborn.plugin.flink.tiered.CelebornTierFactory")
- configuration.setString("celeborn.master.endpoints", "localhost:9097")
+ configuration.setString(CelebornConf.MASTER_ENDPOINTS.key,
s"localhost:$port")
if (integrityCheckEnabled) {
configuration.setString(CelebornConf.CLIENT_SHUFFLE_INTEGRITY_CHECK_ENABLED.key,
"true")
}