zhang-arvin commented on PR #11900:
URL: https://github.com/apache/seatunnel/pull/11900#issuecomment-6051807737

   @DanielLeens The residual coverage gap you called out (Issue 3) is now 
closed with a deterministic regression test. Pushed head `94ada9982`.
   
   New test: 
`JobHistoryServiceTest.testShutdownRunsBeforeThrowingCleanupStep()`.
   
   What it does - it exercises exactly the failure mode the PR guards against, 
not just the happy path:
   - spies the live `JobHistoryService` on the real `CoordinatorService` so 
`shutdown()` invocations are observable;
   - injects a `JobMaster` whose `interrupt()` throws into 
`runningJobMasterMap` - a step that `clearCoordinatorService()` runs **after** 
`jobHistoryService.shutdown()`;
   - resets the `coordinatorServiceCleared` guard so the method body actually 
executes;
   - asserts `clearCoordinatorService()` propagates the exception **and** 
`Mockito.verify(spied).shutdown()` still holds.
   
   So if a future refactor moves `shutdown()` after any throwing step (the 
four-times-reintroduced regression you described), this test fails.
   
   Local run: `JobHistoryServiceTest#testShutdownRunsBeforeThrowingCleanupStep` 
+ `#testShutdownRemovesListeners` -> `Tests run: 2, Failures: 0`.
   
   This head also carries the mechanical rebase onto the current `dev` - I 
verified the PR's own file content is unchanged apart from this new test.
   
   Also: the branch moved `ccd7d928e -> 58157036b` (rebase-only) while this was 
in flight; I rebased this test onto `58157036b`, so nothing was dropped.


-- 
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]

Reply via email to