ChimdumebiNebolisa opened a new pull request, #25156:
URL: https://github.com/apache/pulsar/pull/25156

   ### What does this PR do?
   
   Adds a JUnit 5 regression test that demonstrates a thread leak in 
`LoadSimulationController` due to an unclosed static `ExecutorService`.
   
   ### Why is this needed?
   
   `LoadSimulationController` declares a private static cached thread pool 
(`Executors.newCachedThreadPool()`) with no shutdown path. In embedded or 
containerized test environments, the non-daemon threads can outlive intended 
usage and delay or prevent clean JVM shutdown.
   
   ### How was this tested?
   
   A new JUnit 5 test uses reflection to access the static executor, submits a 
task to force thread creation, and asserts that a non-daemon executor thread is 
alive afterward.
   
   ### Follow-up
   
   I will push a subsequent commit on the same branch that introduces proper 
executor lifecycle management (instance-scoped executor + explicit shutdown) 
and updates the test expectation accordingly.
   


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