jsancio commented on code in PR #19668: URL: https://github.com/apache/kafka/pull/19668#discussion_r2087113715
########## raft/src/test/java/org/apache/kafka/raft/RequestManagerTest.java: ########## @@ -120,10 +131,17 @@ public void testIgnoreUnexpectedResponse() { ); long correlationId = 1; - cache.onRequestSent(node, correlationId, time.milliseconds()); - assertFalse(cache.isReady(node, time.milliseconds())); - cache.onResponseResult(node, correlationId + 1, true, time.milliseconds()); - assertFalse(cache.isReady(node, time.milliseconds())); + cache.onRequestSent(node, correlationId, time.milliseconds(), fetch); + assertFalse(cache.isReady(node, time.milliseconds(), fetch)); + cache.onResponseResult(node, correlationId + 1, true, time.milliseconds(), fetch); + assertFalse(cache.isReady(node, time.milliseconds(), fetch)); + + // completing a request of a different type should not affect the state of other requests + cache.onRequestSent(node, correlationId, time.milliseconds(), updateVoter); + assertFalse(cache.isReady(node, time.milliseconds(), updateVoter)); + cache.onResponseResult(node, correlationId, true, time.milliseconds(), updateVoter); + assertTrue(cache.isReady(node, time.milliseconds(), updateVoter)); + assertFalse(cache.isReady(node, time.milliseconds(), fetch)); Review Comment: Create a new `@Test` method for testing that the request manager can have multiple inflight requests. -- 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