You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "gaurav-narula (via GitHub)" <gi...@apache.org> on 2025/12/18 13:43:45 UTC

[PR] KAFKA-20007: override exit procedure in AclCommandTest#testAclCliWithMisusingBootstrapControllerToServer [kafka]

gaurav-narula opened a new pull request, #21173:
URL: https://github.com/apache/kafka/pull/21173

   `AclCommandTest#testAclCliWithMisusingBootstrapControllerToServer` crashes the Gradle executor as the command exits with a status code 1.
   
   This fix updates the exit procedure prior to invoking the command.


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


Re: [PR] KAFKA-20007: override exit procedure in AclCommandTest#testAclCliWithMisusingBootstrapControllerToServer [kafka]

Posted by "gaurav-narula (via GitHub)" <gi...@apache.org>.
gaurav-narula commented on PR #21173:
URL: https://github.com/apache/kafka/pull/21173#issuecomment-3670385014

   CC: @chia7712 @omkreddy 


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


Re: [PR] KAFKA-20007: override exit procedure in AclCommandTest#testAclCliWithMisusingBootstrapControllerToServer [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 merged PR #21173:
URL: https://github.com/apache/kafka/pull/21173


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


Re: [PR] KAFKA-20007: override exit procedure in AclCommandTest#testAclCliWithMisusingBootstrapControllerToServer [kafka]

Posted by "gaurav-narula (via GitHub)" <gi...@apache.org>.
gaurav-narula commented on code in PR #21173:
URL: https://github.com/apache/kafka/pull/21173#discussion_r2634660858


##########
tools/src/test/java/org/apache/kafka/tools/AclCommandTest.java:
##########
@@ -220,7 +220,17 @@ public void testAclCliWithMisusingBootstrapServerToController(ClusterInstance cl
 
     @ClusterTest
     public void testAclCliWithMisusingBootstrapControllerToServer(ClusterInstance cluster) {
-        assertThrows(RuntimeException.class, () -> testAclCli(cluster, adminArgs(cluster.bootstrapControllers(), Optional.empty())));
+        Exit.setExitProcedure((status, message) -> {

Review Comment:
   Good shout! This would help future test authors. I've refactored it to `callMain`.



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


Re: [PR] KAFKA-20007: override exit procedure in AclCommandTest#testAclCliWithMisusingBootstrapControllerToServer [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on code in PR #21173:
URL: https://github.com/apache/kafka/pull/21173#discussion_r2634055122


##########
tools/src/test/java/org/apache/kafka/tools/AclCommandTest.java:
##########
@@ -220,7 +220,17 @@ public void testAclCliWithMisusingBootstrapServerToController(ClusterInstance cl
 
     @ClusterTest
     public void testAclCliWithMisusingBootstrapControllerToServer(ClusterInstance cluster) {
-        assertThrows(RuntimeException.class, () -> testAclCli(cluster, adminArgs(cluster.bootstrapControllers(), Optional.empty())));
+        Exit.setExitProcedure((status, message) -> {

Review Comment:
   Should we apply this approach to `callMain` to benefit all tests?



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