mimaison commented on a change in pull request #10743:
URL: https://github.com/apache/kafka/pull/10743#discussion_r657881689



##########
File path: clients/src/test/java/org/apache/kafka/clients/MockClient.java
##########
@@ -245,10 +246,18 @@ public void send(ClientRequest request, long now) {
                 unsupportedVersionException = new UnsupportedVersionException(
                         "Api " + request.apiKey() + " with version " + 
version);
             } else {
-                AbstractRequest abstractRequest = 
request.requestBuilder().build(version);
-                if (!futureResp.requestMatcher.matches(abstractRequest))
-                    throw new IllegalStateException("Request matcher did not 
match next-in-line request "
-                            + abstractRequest + " with prepared response " + 
futureResp.responseBody);
+                try {
+                    AbstractRequest abstractRequest = 
request.requestBuilder().build(version);
+                    if (!futureResp.requestMatcher.matches(abstractRequest))
+                        throw new IllegalStateException("Request matcher did 
not match next-in-line request "
+                                + abstractRequest + " with prepared response " 
+ futureResp.responseBody);
+                } catch (NoBatchedFindCoordinatorsException uble) {

Review comment:
       Yes I looked into it but I think there's 1 test in 
TransactionManagerTest that expects `UnsupportedVersionException` to be thrown.
   MockClient works in slightly different ways than the real client and it 
would be good to address this but I'd rather defer to a follow up PR.




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

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


Reply via email to