hansva opened a new issue, #9621:
URL: https://github.com/apache/hop/issues/9621

   ### What needs to happen?
   
   `LineageHubRoutingTest.anInterruptedRunStillLetsGoOfItsSinkAfterItsEvents` 
in `hop-engine` fails intermittently on GitHub Actions, on main and on PR 
builds. It fails the build because surefire's reruns usually fail too:
   
   ```
   AssertionFailedError: every event before the release reached it ==> 
expected: <201> but was: <200>
     at 
LineageHubRoutingTest.anInterruptedRunStillLetsGoOfItsSinkAfterItsEvents(LineageHubRoutingTest.java:284)
   ```
   
   The count changes from run to run (200, 199, 193, 125 and 101 have all been 
seen). Three of the eight main builds on 20 Nov 2026 failed on it. It passes on 
a developer machine.
   
   ### Cause
   
   The test overfills the hub's event queue:
   
   - The test hub's queue holds 100 events: 
`LineageConfiguration.forTesting(false, 100, 10, 50L, Set.of())`.
   - The test emits 200 events in a tight loop.
   - `LineageHub.emit()` adds events with `queue.offer()` and drops an event 
when the queue is full.
   
   On a busy CI runner the worker thread falls behind and events are dropped. 
The build log shows it just before the failure:
   
   ```
   LineageHub - ERROR: Lineage event dropped because the queue is full 
(capacity 100). Total drops: 1
   ```
   
   The hub works as designed (it drops events rather than blocking a running 
pipeline). The test assumes it never needs to.
   
   ### Fix
   
   Change only the test. Either:
   
   - give this test a hub whose queue is larger than the number of events it 
emits, for example `forTesting(false, 1000, 10, 50L, Set.of())`, or
   - emit fewer events than the queue holds.
   
   Either way the test still checks what it is meant to: on an interrupted 
thread, the release request goes into the queue behind the run's events, and 
the replaced sink is shut down only after it has received all of them.
   
   ### Issue Priority
   
   Priority: 2
   
   ### Issue Component
   
   Component: Unit Testing


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