You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "dybyte (via GitHub)" <gi...@apache.org> on 2026/04/20 19:15:44 UTC
[PR] [Fix][CI] Increase test timeout [seatunnel]
dybyte opened a new pull request, #10794:
URL: https://github.com/apache/seatunnel/pull/10794
### Purpose of this pull request
`testTerminalZombieJobShouldNotRestartAfterMasterSwitch()` has a relatively short timeout, which may lead to intermittent failures in the CI environment. This PR increases the timeout to make the test more stable.
### Does this PR introduce _any_ user-facing change?
### How was this patch tested?
### Check list
* [ ] If any new Jar binary package adding in your PR, please add License Notice according
[New License Guide](https://github.com/apache/seatunnel/blob/dev/docs/en/contribution/new-license.md)
* [ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/seatunnel/tree/dev/docs
* [ ] If necessary, please update `incompatible-changes.md` to describe the incompatibility caused by this PR.
* [ ] If you are contributing the connector code, please check that the following files are updated:
1. Update [plugin-mapping.properties](https://github.com/apache/seatunnel/blob/dev/plugin-mapping.properties) and add new connector information in it
2. Update the pom file of [seatunnel-dist](https://github.com/apache/seatunnel/blob/dev/seatunnel-dist/pom.xml)
3. Add ci label in [label-scope-conf](https://github.com/apache/seatunnel/blob/dev/.github/workflows/labeler/label-scope-conf.yml)
4. Add e2e testcase in [seatunnel-e2e](https://github.com/apache/seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/)
5. Update connector [plugin_config](https://github.com/apache/seatunnel/blob/dev/config/plugin_config)
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][CI] Increase test timeout [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #10794:
URL: https://github.com/apache/seatunnel/pull/10794#issuecomment-4285883798
Hi @dybyte, thanks for tightening this flaky test in a very focused way. I reviewed the latest PR head locally from the full diff and the test runtime path.
# What This PR Fixes
- User pain point: `CoordinatorServiceTest.testTerminalZombieJobShouldNotRestartAfterMasterSwitch` starts a real two-node Hazelcast/SeaTunnel test cluster, submits a streaming job, cancels it, forces a master switch, and verifies that stale terminal metadata does not restart tasks. On slower CI workers, the old 20-30s waits can report false failures.
- Fix approach: the PR only extends Awaitility windows in that test: job cancellation gets up to 120s, master switch / metadata cleanup gets up to 30s, and the final “no task restarts” assertion keeps a continuous 10s observation window with a 20s max wait.
- One-line summary: this is a test-stability change, not a SeaTunnel runtime behavior change.
# 1. Code Change Review
## 1.1 Core Logic Analysis
Local review info:
- Local review ref: `refs/pr-review-batch/seatunnel-pr-review-2/10794`
- Local branch name: `seatunnel-review-10794`
- PR HEAD: `0a805df3817a15f67877f855139bdd35796e6530`
- Merge base: `2c81f7f3c3174f6825ed6f27361db18aa5064d6a`
- Changed file: `seatunnel-engine/seatunnel-engine-server/src/test/java/org/apache/seatunnel/engine/server/CoordinatorServiceTest.java`
Before:
```java
await().atMost(30, TimeUnit.SECONDS)
.untilAsserted(() -> Assertions.assertEquals(JobStatus.CANCELED, coordinatorService.getJobStatus(jobId)));
await().atMost(20, TimeUnit.SECONDS)
.untilAsserted(() -> Assertions.assertTrue(server2.isMasterNode()));
await().during(10000, TimeUnit.MILLISECONDS)
.atMost(12000, TimeUnit.MILLISECONDS)
.untilAsserted(...);
```
After:
```java
await().atMost(120, TimeUnit.SECONDS)
.untilAsserted(() -> Assertions.assertEquals(JobStatus.CANCELED, coordinatorService.getJobStatus(jobId)));
await().atMost(30, TimeUnit.SECONDS)
.untilAsserted(() -> Assertions.assertTrue(server2.isMasterNode()));
await().during(10, TimeUnit.SECONDS)
.atMost(20, TimeUnit.SECONDS)
.untilAsserted(...);
```
Runtime path checked:
```text
CoordinatorServiceTest starts instance1 and instance2
-> submitJob(jobId, jobData, startWithSavePoint) [CoordinatorServiceTest.java:121-124]
-> wait until RUNNING [126-130]
-> collect PipelineLocation / TaskGroupLocation [132-144]
-> cancelJob(jobId) [146-147]
-> wait for CANCELED; PR extends this to 120s [149-154]
-> re-inject terminal zombie metadata [166-183]
-> instance1.shutdown() triggers master switch [189-190]
-> PR extends the new-master wait to 30s [192-198]
-> wait for runningJobInfo/runningJobState cleanup [206-215]
-> observe for 10s that no task group becomes active again [217-235]
```
Key findings:
- The normal production SeaTunnel path does not hit this PR; only this test method changes.
- The important assertions remain intact; the PR only gives asynchronous cluster cleanup more time.
- I found no blocking code-level issue in the change itself.
- Current GitHub CI is still failing, so I would not treat this as ready until CI is green or the failures are explicitly classified as unrelated flaky/infrastructure failures.
Local command results:
- PR queue command returned 122 PRs; GraphQL `issueCount` also returned 122.
- `git fetch upstream pull/10794/head:refs/pr-review-batch/seatunnel-pr-review-2/10794`: succeeded.
- `git diff --stat`: 1 test file, `+5/-5`.
- `git diff --unified=80`: confirmed only Awaitility timeout changes.
- `gh pr checks` / check-run API: current Build conclusion is failure; failing jobs include `jdbc-connectors-it-part-7 (11)`, `kafka-connector-it (11)`, and `jdbc-connectors-it-ddl (8)` on the fork-side run.
- I did not run local tests; this review is based on source-level analysis as requested.
## 1.2 Compatibility Impact
Compatibility: fully compatible.
- API/config/defaults/protocol/serialization: unchanged.
- Historical behavior: production behavior is unchanged; only test wait windows are adjusted.
## 1.3 Performance / Side Effects
No runtime CPU, memory, GC, network, locking, concurrency, retry, idempotency, or resource-release impact. The only side effect is that this test can wait longer before failing.
## 1.4 Error Handling And Logs
Issue 1: CI is currently not green
- Location: GitHub check run `72193719730`
- Problem: the visible Build check is failing. The failures do not look directly caused by this test-timeout-only PR, but they still need a rerun or maintainer classification before merge.
- Risk: merging with unresolved CI failures weakens the quality signal for `dev`.
- Suggested fix: rerun the failed jobs; if they reproduce, inspect logs and decide whether this is unrelated flaky infrastructure or a real regression.
- Severity: Medium
# 2. Code Quality
## 2.1 Style
The change follows the existing test style, and using `TimeUnit.SECONDS` improves readability for the final observation window.
## 2.2 Tests
No new scenario is added, which is acceptable for a timeout-only stabilization PR. The original assertions remain in place.
## 2.3 Documentation
No docs update is needed.
# 3. Architecture
## 3.1 Solution Quality
This is a focused test-stability fix. It does not hide the assertion or change runtime code.
## 3.2 Maintainability
The wait windows are local to the one flaky test and easy to revisit.
## 3.3 Extensibility
No new abstraction is needed for a one-test timeout adjustment.
## 3.4 Historical Compatibility
Fully compatible.
# 4. Findings Summary
| No. | Finding | Location | Severity |
|---|---|---|---|
| 1 | CI is currently not green | GitHub check run `72193719730` | Medium |
# 5. Merge Decision
### Conclusion: can merge after fixes
1. Blocking items
- Issue 1: rerun or resolve/classify the failing CI jobs before merge.
2. Recommended non-blocking improvements
- None.
Overall, the code change itself looks reasonable and low risk. Once CI is green or the current failures are confirmed unrelated, I think this PR is fine to merge.
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][CI] Increase test timeout [seatunnel]
Posted by "zhangshenghang (via GitHub)" <gi...@apache.org>.
zhangshenghang merged PR #10794:
URL: https://github.com/apache/seatunnel/pull/10794
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][CI] Increase test timeout [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #10794:
URL: https://github.com/apache/seatunnel/pull/10794#issuecomment-4303014364
Hi @dybyte, thanks for the focused follow-up here. I rechecked the latest PR head locally after the new maintainer activity.
# What This PR Fixes
- User pain point: `CoordinatorServiceTest.testTerminalZombieJobShouldNotRestartAfterMasterSwitch` starts a real two-node Hazelcast/SeaTunnel test cluster, submits a streaming job, cancels it, simulates a master switch, and verifies that terminal zombie metadata does not restart task groups. On slower CI workers, the old wait windows could fail before the asynchronous cleanup path had enough time to settle.
- Fix approach: the PR only increases the Awaitility windows in this test. Job cancellation now has up to 120 seconds, master switch and metadata cleanup have up to 30 seconds, and the final assertion still observes for a continuous 10 seconds that task groups do not become active again.
- One-line summary: this is a test-stability fix, not a production runtime behavior change.
# Code Review
Core path checked:
```text
CoordinatorServiceTest starts two Hazelcast/SeaTunnel nodes
-> instance1 becomes the initial master
-> submitJob(jobId, jobData, startWithSavePoint)
-> wait until the job reaches RUNNING
-> collect PipelineLocation / TaskGroupLocation
-> cancelJob(jobId)
-> this PR extends the CANCELED wait to 120s
-> inject terminal zombie metadata into runningJobInfo / runningJobState
-> instance1.shutdown() triggers master switch
-> this PR extends the new-master wait to 30s
-> wait for running metadata cleanup on the new master
-> observe for 10s that no TaskGroupLocation becomes active again
```
Key findings:
- The normal SeaTunnel production path does not hit this PR; only this test method is affected.
- The important assertions are still intact. The PR does not hide the regression this test is meant to catch.
- The change covers slow CI timing around cancellation, master election, and distributed metadata cleanup.
- Current GitHub checks are now green: `Label PRs when reviewed`, `Build`, `Notify test workflow`, and `labeler` are all SUCCESS.
# Compatibility / Side Effects
Compatibility: fully compatible.
This does not change APIs, options, defaults, protocols, serialization, checkpoint behavior, or historical runtime behavior. The only side effect is that this test can wait longer before failing when the condition is genuinely not satisfied, which is an acceptable trade-off for this asynchronous cluster test.
# Findings
No blocking issue found in the current head.
# Merge Decision
### Conclusion: can merge
1. Blocking items
- None.
2. Recommended non-blocking improvements
- None.
Overall, this is a small and well-scoped test-stability improvement. Since the checks are green now and the core assertion remains meaningful, I think this PR is ready to merge from my side.
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org