lianetm commented on code in PR #20521:
URL: https://github.com/apache/kafka/pull/20521#discussion_r2417815170


##########
core/src/test/scala/integration/kafka/api/AuthorizerIntegrationTest.scala:
##########
@@ -1358,7 +1358,7 @@ class AuthorizerIntegrationTest extends 
AbstractAuthorizerIntegrationTest {
 
     val consumer = createConsumer()
     consumer.assign(java.util.List.of(tp))
-    assertThrows(classOf[TopicAuthorizationException], () => 
consumeRecords(consumer))
+    assertThrows(classOf[AuthorizationException], () => 
consumeRecords(consumer))

Review Comment:
   I see this is where we are getting a `GroupAuthException` instead of the 
expected `TopicAuth`, but instead of changing the intention of the test (check 
that assign+poll without ACLs throws TopicAuth), should we just create the 
consumer without group_id instead 
   
   `val consumer = createConsumer(configsToRemove = 
List(ConsumerConfig.GROUP_ID_CONFIG))
   `
   With that, assign+poll should indeed throw TopicAuth as before



##########
core/src/test/scala/integration/kafka/api/AuthorizerIntegrationTest.scala:
##########
@@ -1358,7 +1358,7 @@ class AuthorizerIntegrationTest extends 
AbstractAuthorizerIntegrationTest {
 
     val consumer = createConsumer()
     consumer.assign(java.util.List.of(tp))
-    assertThrows(classOf[TopicAuthorizationException], () => 
consumeRecords(consumer))
+    assertThrows(classOf[AuthorizationException], () => 
consumeRecords(consumer))

Review Comment:
   I see this is where we are getting a `GroupAuthException` instead of the 
expected `TopicAuth`, but instead of changing the intention of the test (check 
that assign+poll without ACLs throws TopicAuth), should we just create the 
consumer without group_id instead 
   
   `val consumer = createConsumer(configsToRemove = 
List(ConsumerConfig.GROUP_ID_CONFIG))
   `
   
   With that, assign+poll should indeed throw TopicAuth as before



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

Reply via email to