kevin-wu24 commented on code in PR #19668:
URL: https://github.com/apache/kafka/pull/19668#discussion_r2121872734


##########
raft/src/test/java/org/apache/kafka/raft/RequestManagerTest.java:
##########
@@ -408,24 +400,70 @@ public void testAnyInflightRequestWithAnyRequest() {
         );
 
         assertFalse(cache.hasAnyInflightRequest(time.milliseconds(), fetch));
+        assertFalse(cache.hasAnyInflightRequest(time.milliseconds(), 
fetchSnapshot));
 
         // Send a request and check state
-        cache.onRequestSent(otherNode, 11, time.milliseconds(), fetch);
+        cache.onRequestSent(otherNode, 11, time.milliseconds(), apiKey);
         assertTrue(cache.hasAnyInflightRequest(time.milliseconds(), fetch));
+        assertTrue(cache.hasAnyInflightRequest(time.milliseconds(), 
fetchSnapshot));
 
         // Wait until the request times out
         time.sleep(requestTimeoutMs);
         assertFalse(cache.hasAnyInflightRequest(time.milliseconds(), fetch));
+        assertFalse(cache.hasAnyInflightRequest(time.milliseconds(), 
fetchSnapshot));
 
         // Send another request and fail it
-        cache.onRequestSent(otherNode, 12, time.milliseconds(), fetch);
-        cache.onResponseResult(otherNode, 12, false, time.milliseconds(), 
fetch);
+        cache.onRequestSent(otherNode, 12, time.milliseconds(), apiKey);
+        cache.onResponseResult(otherNode, 12, false, time.milliseconds(), 
apiKey);
         assertFalse(cache.hasAnyInflightRequest(time.milliseconds(), fetch));
+        assertFalse(cache.hasAnyInflightRequest(time.milliseconds(), 
fetchSnapshot));
 
         // Send another request and mark it successful
-        cache.onRequestSent(otherNode, 12, time.milliseconds(), fetch);
-        cache.onResponseResult(otherNode, 12, true, time.milliseconds(), 
fetch);
+        cache.onRequestSent(otherNode, 12, time.milliseconds(), apiKey);
+        cache.onResponseResult(otherNode, 12, true, time.milliseconds(), 
apiKey);
         assertFalse(cache.hasAnyInflightRequest(time.milliseconds(), fetch));
+        assertFalse(cache.hasAnyInflightRequest(time.milliseconds(), 
fetchSnapshot));
+    }
+
+    @ParameterizedTest
+    @EnumSource(
+        value = ApiKeys.class,
+        names = {
+            "VOTE",
+            "BEGIN_QUORUM_EPOCH",
+            "END_QUORUM_EPOCH",
+            "API_VERSIONS",
+            "UPDATE_RAFT_VOTER"

Review Comment:
   I was going to add it in the auto-join PR, since we technically don't 
support it until then.



-- 
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-unsubscr...@kafka.apache.org

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

Reply via email to