[Fix][Zeta] Fix flaky pending job info test#10891
Open
QuakeWang wants to merge 1 commit into
Open
Conversation
Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>
DanielLeens
reviewed
May 16, 2026
Contributor
DanielLeens
left a comment
There was a problem hiding this comment.
Thanks for the contribution. I reviewed the latest head and checked the pending-job path that this test is targeting. This change is test-only, it hits the real pending-queue branch, and I do not see a source-level blocker on the current head.
What this PR solves
- User pain point
Pending-job tests that depend on coordinator scheduling timing can fail intermittently, which makes it hard to tell whether the failure is in production logic or in the test itself. - Fix approach
This PR rewrites the test setup to construct pending-job scenarios directly with helpers instead of depending on asynchronous timing. - One-line summary
This is a focused test-stability fix for the pending-job path, and I do not see a source-level blocker on the latest head.
Runtime path I checked
CoordinatorService.getJobInfo(jobId) [CoordinatorService.java:1393-1407]
-> history lookup
-> runningJobMasterMap lookup
-> pendingJobQueue.getById(jobId)
-> runningJobInfoIMap lookup
Key findings
- The production path itself is unchanged.
- The updated test now targets the real
pendingJobQueuebranch directly instead of relying on async scheduling to reach that state. - The new helpers (
newMockCoordinatorService(...),enqueueMockPendingJob(...)) make the scenario easier to reason about and less timing-sensitive. - I do not see a source-level blocker on the latest head.
Test / CI notes
- The test structure is healthier than before: it uses mocks and condition-based waiting rather than adding new fixed sleeps.
- The current
Buildsignal is incomplete because the latest run was cancelled, andchangesdid not finish cleanly before the matrix fan-out, so CI needs a clean rerun before merge.
Conclusion: can merge after fixes
- Blocking items
- Please rerun the latest CI and get
Buildgreen before merge.
- Suggested but non-blocking improvements
- No new source-side changes are required from my side on this revision.
Overall, this looks like a good test-only cleanup for the pending-job path. I do not have a source-level blocker on the current head; the remaining gate is CI completeness.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose of this pull request
Fix flaky
CoordinatorServiceTest.testGetPendingJobInfo.Related CI failure: https://github.com/QuakeWang/seatunnel/actions/runs/25901176569/job/76125357474
The old test submitted a real job and asserted that the job was still in
pendingJobQueue. This assertion depended on a transient scheduler state because the coordinator scheduler may consume the pending job immediately after submission.This patch makes the test deterministic by constructing a controlled pending job and verifying that
getJobInfo()can return DAG info from the pending job path.Does this PR introduce any user-facing change?
No.
How was this patch tested?
Check list
New License Guide
incompatible-changes.mdto describe the incompatibility caused by this PR.