tisonkun commented on code in PR #17851:
URL: https://github.com/apache/pulsar/pull/17851#discussion_r980987160
##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/BrokerTestUtil.java:
##########
@@ -44,4 +44,19 @@ public static <T> T spyWithClassAndConstructorArgs(Class<T>
classToSpy, Object..
.useConstructor(args)
.defaultAnswer(Mockito.CALLS_REAL_METHODS));
}
+
+ /**
+ * Create a Mockito spy that is stub-only which does not record method
invocations,
+ * thus saving memory but disallowing verification of invocations.
Review Comment:
> but disallowing verification of invocations
If so, can we replace those calls to `spy(obj)` with bare `obj`?
--
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]