You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/11/23 17:22:24 UTC

[GitHub] [kafka] gharris1727 commented on a diff in pull request #12876: KAFKA-12476: Prevent herder tick thread from sleeping excessively after slow operations

gharris1727 commented on code in PR #12876:
URL: https://github.com/apache/kafka/pull/12876#discussion_r1030712499


##########
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/distributed/DistributedHerderTest.java:
##########
@@ -3735,6 +3750,19 @@ private ClusterConfigState exactlyOnceSnapshot(
                 taskConfigs, taskCountRecords, taskConfigGenerations, pendingFencing, Collections.emptySet());
     }
 
+    private void expectQueueHerderOperation() {
+        member.wakeup();
+        PowerMock.expectLastCall();
+    }

Review Comment:
   The point of this function is not to hide the tedious mocking, it's to give a semantic name to describe what's happening in the application. A herder operation is being queued up, and the only mocked portion of that is a member wakeup call.
   
   Seeing as easymock is being migrated away, i think this easymock-centric expectCall is not very impactful.
   
   I can also inline the function, now that i've used it for what I needed.



-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org