nzw921rx opened a new pull request, #11000: URL: https://github.com/apache/seatunnel/pull/11000
### Purpose of this pull request Fix UT flaky tests across `seatunnel-engine`, `seatunnel-api`, and `seatunnel-core`. **Bug fix:** - Fix `CheckpointTimeOutTest` passing wrong Job ID to `startJob()`, causing 120s unconditional timeout **Resource cleanup:** - Fix `RestApiHttpBasicTest.after()` not calling `super.after()`, leaking Hazelcast instance - Fix `SeaTunnelEngineClusterRoleTest.enterPendingWhenResourcesNotEnough` discarding Worker node references — never shut down - Fix `ServerExecuteCommandTest.testMemberList` creating 5 Hazelcast instances with no cleanup; also protect `java.version` mutation with `try/finally` - Fix `MDCTracerTest` executor services never shut down - Fix `CoordinatorServiceTest` — 3 tests with Hazelcast instances not properly cleaned up in `finally` blocks - Fix REST test subclasses (`BaseServletTest`, `RestApiHttpBasicTest`, `RestApiHttpsTest`, `RestApiHttpsForTruststoreTest`) defining `@BeforeAll setUp()` alongside inherited `@BeforeAll before()`, causing double Hazelcast instance creation; renamed to `@Override before()` **Hang prevention:** - Fix `MDCTracerTest` using `CompletableFuture.join()` (no timeout) for scheduled futures; replaced with `get(30, TimeUnit.SECONDS)` **Timeout improvements (39 locations):** - Increase cluster formation / coordinator activation timeouts from 5–10s to 30–60s across `CoordinatorServiceTest`, `SeaTunnelEngineClusterRoleTest`, `FollowerRunningJobsFilterTest`, `EngineStateStoreMetricExportsTest`, `ServerExecuteCommandTest` **Timing improvements:** - Remove unnecessary `pollDelay()` in `RestApiHttpsTest`, `JobHistoryServiceTest`, `CoordinatorServiceWithCancelPendingJobTest` - Replace `Thread.sleep()` with Awaitility condition waits in `CoordinatorServiceTest`, `CoordinatorServiceWithCancelPendingJobTest` - Broaden exact intermediate-state assertions (`PENDING` → `PENDING || RUNNING`, `CANCELED` → `CANCELED || FAILED`) in `CoordinatorServiceWithCancelPendingJobTest`, `SeaTunnelEngineClusterRoleTest` ### Does this PR introduce _any_ user-facing change? No. Test-only changes. ### How was this patch tested? ```bash ./mvnw -pl seatunnel-engine/seatunnel-engine-server test ./mvnw -pl seatunnel-engine/seatunnel-engine-client test ./mvnw -pl seatunnel-api test ./mvnw -pl seatunnel-core/seatunnel-starter 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]
