lhotari commented on PR #17851:
URL: https://github.com/apache/pulsar/pull/17851#issuecomment-1259763494

   > > There's nothing here that is caused by a Mockito bug.
   > 
   > I have some experience in asking upstream experts for best practices. But 
let's say I should volunteer to report the case instead of requesting others.
   
   In this case, the reason for the memory leaks is the misuse of Mockito in 
the Pulsar internal test framework.
   Mockito will record invocations by default. To clear the invocations, mocks 
should be resetted or invocations should be cleared if the instances are around 
so that it matters.
   [Unfinished 
stubbing](https://github.com/mockito/mockito/wiki/FAQ#what-are-unfinished-verificationstubbing-errors)
 will also leak memory. Those are really issues in test code of Pulsar, but 
nobody has cared to fix the warning that are logged by the test interceptors 
that mitigate the bad practices by clearing the thread locals. 
   @tisonkun Since you seem to care about this topic, it would be useful to fix 
issues in Pulsar test code one issue at a time.
   
   
   
   
   
   
   
   


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