lhotari opened a new pull request #13608:
URL: https://github.com/apache/pulsar/pull/13608


   Fixes #13570
   
   ### Motivation
   
   For some reason `spy(new ServerCnx(pulsar))` is flaky and fails with NPE in 
the ServerCnx constructor. The full stacktrace can be seen in #13570 
description.
   
   ### Modifications
   
   The alternative solution is to use `mock(ServerCnx.class, withSettings()
                   .useConstructor(pulsar)
                   .defaultAnswer(CALLS_REAL_METHODS))` and the expectation is 
that the NPE wouldn't occur in this case.


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