You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/09/06 15:32:22 UTC

[GitHub] [kafka] dajac commented on a change in pull request #11299: KAFKA-13258/KAFKA-13259: Fix error response generation

dajac commented on a change in pull request #11299:
URL: https://github.com/apache/kafka/pull/11299#discussion_r702978011



##########
File path: clients/src/test/java/org/apache/kafka/common/requests/RequestResponseTest.java
##########
@@ -657,6 +657,11 @@ private void checkDescribeConfigsResponseVersions() {
     private void checkErrorResponse(AbstractRequest req, Throwable e, boolean checkEqualityAndHashCode) {
         AbstractResponse response = req.getErrorResponse(e);
         checkResponse(response, req.version(), checkEqualityAndHashCode);
+        Errors error = Errors.forException(e);
+        Map<Errors, Integer> errorCounts = response.errorCounts();
+        assertEquals(Collections.singleton(error), errorCounts.keySet(),
+            "API Key " + req.apiKey().name + " v" + req.version() + " failed errorCounts test");
+        assertTrue(errorCounts.get(error) > 0);

Review comment:
       Do we need to get this change as well: https://github.com/apache/kafka/pull/11288/files#diff-b8c878a734acf31ecab2f39b75acc71f6a6f9b4cdad66c18824d19e8f1a11284R2887?




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

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