riedelmax commented on code in PR #14544: URL: https://github.com/apache/kafka/pull/14544#discussion_r1382605249
########## core/src/test/scala/unit/kafka/server/KafkaApisTest.scala: ########## @@ -6206,12 +6206,40 @@ class KafkaApisTest { assertEquals(Errors.GROUP_AUTHORIZATION_FAILED.code, response.data.errorCode) } + @Test + def testConsumerGroupDescribe(): Unit = { + val groupId = "group0" + val consumerGroupDescribeRequestData = new ConsumerGroupDescribeRequestData() + consumerGroupDescribeRequestData.groupIds.add(groupId) + val requestChannelRequest = buildRequest(new ConsumerGroupDescribeRequest.Builder(consumerGroupDescribeRequestData, true).build()) + + val future = new CompletableFuture[util.List[ConsumerGroupDescribeResponseData.DescribedGroup]]() + when(groupCoordinator.consumerGroupDescribe( + any[RequestContext], + any[util.List[String]] + )).thenReturn(future) Review Comment: When I change it back, it still does not get invoked. I think it is because the mock gets this specific reference to the list of groupIds. But in KafkaApis.scala I create a new List to only send the request for authorized groups. So the list that gets send actually is a different one than the one in the mock. -- 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