nsivabalan opened a new pull request, #19061:
URL: https://github.com/apache/hudi/pull/19061
**DO NOT MERGE — temporary triage + fix branch stacked on top of #19060.**
This PR is the candidate fix for the Azure CI flake first surfaced in #18147
and #18650:
```
Caused by: java.net.BindException: Address already in use
Caused by: org.apache.hudi.exception.HoodieLockException: Failed to connect
to ZooKeeper within 10000 ms
at
org.apache.hudi.client.transaction.lock.BaseZookeeperBasedLockProvider.<init>(BaseZookeeperBasedLockProvider.java:86)
```
It stacks on top of the diagnostic-only commit from #19060 (`5328f34`) and
adds a second commit that:
1. Tracks the in-process `TestingServer` in an instance field so
`@AfterEach` can always close it.
2. Wraps the body of
`testHoodieClientBasicMultiWriterWithEarlyConflictDetection` in `try/finally`,
so the server (and the four write clients) are closed on every exit path
including failed assertions — previously the `server.close()` lived at the tail
of a ~70-line body with several `assertThrows`/`assertDoesNotThrow` calls, so
any failure short of the tail leaked the server. Because surefire runs with
`forkCount=1 reuseForks=true`, that leaked TestingServer (its bound ephemeral
port, temp ZK data dir, and background threads) persisted across every later
test in the `hudi-spark` JVM — consistent with the late-suite `BindException`
we observed.
Verification plan:
1. Wait for the stripped-down Azure pipeline from #19060 to run `mvn test
-Dtest=TestHoodieClientMultiWriter` with this fix applied. Expect green.
2. If green, close this draft, restore master pipelines, and open a real fix
PR with the test-only change.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]