daniancu opened a new pull request, #55:
URL: https://github.com/apache/sling-org-apache-sling-event/pull/55

   ## Summary
   
   - Replace fire-and-forget `java.util.Timer` in `startProcessing()` with a 
`ScheduledExecutorService` that is properly shut down on `deactivate()`, 
preventing thread leaks
   - Add package-private `setScheduler()` so tests can inject a controllable 
scheduler
   - Rewrite `testTopologyChange` to use a `ManualScheduler` that captures 
tasks for on-demand execution, eliminating the flaky `Thread.sleep(4000)` and 
making the test deterministic and ~8x faster
   
   ## Test plan
   
   - [x] `mvn test -Dtest=JobManagerConfigurationTest#testTopologyChange` — 
passes in ~1s (was ~9s)
   - [x] `mvn test` — all 109 tests pass
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


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