cardamon commented on PR #4576:
URL: 
https://github.com/apache/activemq-artemis/pull/4576#issuecomment-1703462232

   Actually, I'm not sure how this could be easily & meaningfully tested in a 
unit test. `ThreadLocal` instances are really quite annoying. The don't allow 
their value to be queried without actually setting it.
   
   One direction would be for the `ThreadLocal` to be mocked with Mockito, and 
then verify that the correct calls are made. But the unit test would just be a 
replication of the logic of the code that's being tested. Although it would I 
suppose prevent regressions by accidental modification of code.
   
   Would that be enough?


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