FrankYang0529 opened a new pull request, #16849: URL: https://github.com/apache/kafka/pull/16849
The MockClient#send doesn't respect matcher for unsupported request. Currently, I prefer to remove matcher. All related test cases can pass. We can see whether add matcher back for unsupported request in the future. ```java UnsupportedVersionException unsupportedVersionException = null; if (futureResp.isUnsupportedRequest) { 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); } ClientResponse resp = new ClientResponse(request.makeHeader(version), request.callback(), request.destination(), request.createdTimeMs(), time.milliseconds(), futureResp.disconnected, unsupportedVersionException, null, futureResp.responseBody); responses.add(resp); ``` ### Committer Checklist (excluded from commit message) - [ ] Verify design and implementation - [ ] Verify test coverage and CI build status - [ ] Verify documentation (including upgrade notes) -- 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