showuon commented on a change in pull request #11021:
URL: https://github.com/apache/kafka/pull/11021#discussion_r669478307
##########
File path:
clients/src/test/java/org/apache/kafka/clients/admin/KafkaAdminClientTest.java
##########
@@ -3179,41 +3179,47 @@ public void testDeleteConsumerGroupsWithOlderBroker()
throws Exception {
env.kafkaClient().prepareResponse(
prepareOldFindCoordinatorResponse(Errors.GROUP_AUTHORIZATION_FAILED,
Node.noNode()));
- final DeleteConsumerGroupsResult errorResult =
env.adminClient().deleteConsumerGroups(groupIds);
+ DeleteConsumerGroupsResult errorResult =
env.adminClient().deleteConsumerGroups(groupIds);
TestUtils.assertFutureError(errorResult.deletedGroups().get("groupId"),
GroupAuthorizationException.class);
- //Retriable errors should be retried
+ // Retriable errors should be retried
env.kafkaClient().prepareResponse(
prepareOldFindCoordinatorResponse(Errors.NONE,
env.cluster().controller()));
- final DeletableGroupResultCollection errorResponse1 = new
DeletableGroupResultCollection();
- errorResponse1.add(new DeletableGroupResult()
- .setGroupId("groupId")
-
.setErrorCode(Errors.COORDINATOR_NOT_AVAILABLE.code())
- );
- env.kafkaClient().prepareResponse(new DeleteGroupsResponse(
- new DeleteGroupsResponseData()
- .setResults(errorResponse1)));
Review comment:
This section is testing "retriable" errors should be retried. Before the
change, `COORDINATOR_NOT_AVAILABLE` is considered as retriable error. But after
this PR, it'll considered as unmapped error, so it is moved to later, to test
when receiving the error, we should re-find coordinator, and then re-send
request.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]