jsancio commented on a change in pull request #11457: URL: https://github.com/apache/kafka/pull/11457#discussion_r754698733
########## File path: core/src/test/scala/integration/kafka/server/QuorumTestHarness.scala ########## @@ -163,6 +163,26 @@ abstract class QuorumTestHarness extends Logging { // That way you control the initialization order. @BeforeEach def setUp(testInfo: TestInfo): Unit = { + Exit.setExitProcedure((code, message) => { + try { + throw new RuntimeException(s"exit(${code}, ${message}) called!") + } catch { + case e: Throwable => error("test error", e) + throw e Review comment: Did you mean to add this exception handling? Are you trying to log the exception before throwing it? If so, how about: ```suggestion val e = throw new RuntimeException(s"exit(${code}, ${message}) called!") error("Throwing an exception because the test called exit", e) throw e ``` Similarly for the halt override. -- 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