DanielLeens opened a new pull request, #13030: URL: https://github.com/apache/seatunnel/pull/13030
### Purpose of this pull request Yes, I am contributing this test-fixture fix to Apache SeaTunnel. Keep the HTTP listeners in two REST test fixtures outside their Hazelcast discovery ranges. Both failures occurred on October 27 in PRs that do not change these fixtures: - [PR #13014, Windows JDK 17](https://github.com/SEPURI-SAI-KRISHNA/seatunnel/actions/runs/40469039568/job/122093000180): `OptionRulesApiTest` starts Hazelcast at `18044`, then repeatedly connects to its HTTP listener at `18082`. It fails to join after 300 seconds. - [PR #13011, Ubuntu JDK 11](https://github.com/corgy-w/seatunnel/actions/runs/40463008664/job/122053501099): `RestApiSubmitJobStartWithSavePointTest` starts Hazelcast at `22981`, then repeatedly connects to HTTP port `23000`, with the same startup failure. #11630 (`696e27422`) introduced random Hazelcast ranges while leaving HTTP ports unreserved. #11572 (`c7401bf14`) subsequently moved allocation into `10000..30000`, which contains both fixed HTTP ports. #11868 widened discovery from 30 to 100 ports: the observed OptionRules collision is 38 ports above its base, while the savepoint collision is 19 ports above its base and was already within the previous scan width. A distinct cluster name cannot prevent the wrong-protocol connection. This patch uses the existing `TestUtils` allocator for both HTTP fixtures: - Reserve the single HTTP port used by `OptionRulesApiTest` before allocating its Hazelcast range. - Reserve two HTTP ports for the savepoint fixture's two members. They can share `HttpConfig`, so dynamic selection is retained. Jetty's upper endpoint is inclusive: a range of one covers exactly the two reserved ports. This replaces the unreserved 2,001-candidate range rather than reserving a large block in the shared test-port pool. Related: #13028 addresses the same collision pattern in `RestApiHttpsForTruststoreTest`. This PR changes neither that fixture nor its branch. ### Does this PR introduce any user-facing change? No. Only two test fixtures change. Production code, shared allocator implementation, POMs, APIs, checkpoint formats, test methods, assertions, timeouts and Hazelcast discovery settings are unchanged. ### How was this patch tested? - Passed scoped JDK 17 formatting: `./mvnw -f seatunnel-engine/seatunnel-engine-server/pom.xml -nsu -Dmaven.gitcommitid.skip=true spotless:apply spotless:check`. `git diff --check` also passed. - An independent automated source review found no blocking findings in the final two-port variant. It covers allocator exclusion, static initialization order, shared HTTP configuration, Jetty's inclusive port-selection range and preservation of all existing assertions. The allocator is not an OS-level port reservation; external-process races remain outside this fix. - No local compilation, tests, E2E, Docker, services or UI were run; no build artifacts were reused. Runtime verification must come from the exact-head GitHub unit-test matrix, including both REST classes. CI results remain pending. - `OptionRulesApiTest` retains its exact REST status and option-rule checks. The savepoint test retains its two-member cluster check, missing-checkpoint HTTP 400 checks, restored job identifiers and restore-mode assertions. ### Check list - [x] No production code, dependency, connector registration or compatibility changes. - [x] No disabled tests, removed assertions, or increased timeout/retry budgets. - [x] No user-facing documentation change is needed. -- 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]
