chia7712 commented on code in PR #22908:
URL: https://github.com/apache/kafka/pull/22908#discussion_r3671967544


##########
clients/src/test/java/org/apache/kafka/common/requests/RequestResponseTest.java:
##########
@@ -359,6 +359,61 @@ public void testSerialization() {
         }
     }
 
+    @Test
+    public void testClientThrottlesResponsesWithThrottleTime() {
+        Map<ApiKeys, Short> postKip219Version = Map.ofEntries(

Review Comment:
   Have we considered moving this map to the production code to slim down the 
sub-classes?
   
   '''java 
   public boolean shouldClientThrottle(short version) {
       Short minThrottledVersion = POST_KIP_219_VERSIONS.get(this.apiKey());
       if (minThrottledVersion != null) {
           return version >= minThrottledVersion;
       }
       return this.hasThrottleTimeMsField(); 
   }
   '''
   
   (sorry for the poor formatting, I typed this on my phone)



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