Repository navigation
[Fix][CI] Isolate Hazelcast test port ranges in CI - #11630
Conversation
DanielLeens
left a comment
There was a problem hiding this comment.
Thanks for the fix. I reviewed the full current head 5de1cbc250.
PR solves what problem
- User pain: engine-server tests use the same fixed Hazelcast port range, so concurrent CI jobs can collide on port binding and fail for infrastructure reasons instead of source logic.
- Fix approach: allocate a fresh non-overlapping port range per test class/helper and thread that port into the Hazelcast test config builders.
- One-line summary: this is a focused test-only CI hardening change, and the current head looks good to me.
I. Code change review
1.1 Core logic analysis
Precise change:
TestUtils.getAvailablePort(int)now allocates a bindable base port and tracks non-overlapping reserved ranges inside the JVM.AbstractSeaTunnelServerTest,WorkerTagTest, and the REST API tests stop hard-coding5801and instead use that helper.TestUtilsTestadds focused coverage for bindable-port and non-overlapping-range behavior.
Before / After:
- Before: all these tests pinned the same Hazelcast range around
5801, which is fragile under parallel CI. - After: each test context gets its own dynamically selected base range.
Key findings:
- The change is tightly scoped to tests.
- The runtime path that changed is exactly the port-selection logic for Hazelcast test clusters.
- I do not see a new source-side blocker here.
- I did note separately in the queue that the branch is
behind_by=2, but I am not treating that as a review blocker because the current head already has a passingBuildresult on Monday, August 3, 2026.
Logic correctness / runtime path:
Engine-server test bootstrap
-> getHazelcastConfig()
-> getHazelcastPort()
-> TestUtils.getAvailablePort(100)
-> Hazelcast test cluster binds the selected range
-> parallel CI jobs stop competing for the same fixed 5801-based range
1.2 Compatibility impact
- Fully compatible.
- Test-only change; no API/config/default/protocol/serialization impact.
1.3 Performance / side-effect analysis
- Small startup overhead from probing candidate ports.
- Acceptable for tests, and lower operational risk than fixed shared ports.
1.4 Error handling and logs
No blocker found.
II. Code quality assessment
2.1 Code style
The helper extraction is clear and consistent with the existing test utilities.
2.2 Test coverage and stability
The added TestUtilsTest directly covers the new helper behavior and I did not see a flaky-test anti-pattern in the added assertions.
2.3 Documentation updates
No user-facing documentation change is required for this test-only fix.
III. Architecture
3.1 Solution elegance
This is a precise fix rather than a broad refactor.
3.2 Maintainability
Centralizing the port allocation logic in TestUtils makes follow-up test updates easier.
3.3 Extensibility
Future engine-server tests can reuse the same helper instead of introducing more fixed ports.
3.4 Historical compatibility
Compatible.
IV. Problem summary
No blocking issue found on the current head.
V. Merge conclusion
Conclusion: can merge
- Blocking items
- None from Daniel on the current head.
- Suggested follow-ups
- None.
Overall, this is a focused and useful CI-hardening change. Happy to approve.
Purpose of this pull request
Fix CI flakes caused by engine-server tests sharing hardcoded Hazelcast port ranges.
Changes
5801test ports with dynamic range-aware ports.Does this PR introduce any user-facing change?
How was this patch tested?
Check list
New License Guide
incompatible-changes.mdto describe the incompatibility caused by this PR.