AndrewJSchofield commented on code in PR #23221:
URL: https://github.com/apache/kafka/pull/23221#discussion_r3844300027


##########
clients/src/test/java/org/apache/kafka/clients/consumer/internals/FetcherTest.java:
##########
@@ -2829,6 +2829,11 @@ public void testFetcherConcurrency() throws Exception {
         LogContext logContext = new LogContext();
         buildDependencies(new MetricConfig(), Long.MAX_VALUE, new 
SubscriptionState(logContext, AutoOffsetResetStrategy.EARLIEST), logContext);
 
+        // Replace the Mockito spy from buildDependencies() with a plain 
instance: sendFetches()/poll() below
+        // are called on every spin of a tight busy-wait, and the per-call 
cost of Mockito's real-method
+        // interception on that many invocations can make a run slow enough to 
hit GC overhead limits.
+        consumerClient = new ConsumerNetworkClient(logContext, client, 
metadata, time, 100, 1000, Integer.MAX_VALUE);

Review Comment:
   Yes, I can do the refactor.



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