jsancio commented on a change in pull request #11457:
URL: https://github.com/apache/kafka/pull/11457#discussion_r744002667



##########
File path: core/src/test/scala/integration/kafka/server/QuorumTestHarness.scala
##########
@@ -163,6 +163,14 @@ abstract class QuorumTestHarness extends Logging {
   // That way you control the initialization order.
   @BeforeEach
   def setUp(testInfo: TestInfo): Unit = {
+    Exit.setExitProcedure((code, message) => {
+      error(s"exit(${code}, ${message}) called!")
+      tearDown()
+    })
+    Exit.setHaltProcedure((code, message) => {
+      error(s"halt(${code}, ${message}) called!")
+      tearDown()

Review comment:
       I think this implementation for `setExitProcedure` and 
`setHaltProcedure` would allow the test that called `Exit.exit` and `Exit.halt` 
to continue. This is probably not what the user intended when they call those 
methods. If you agree, how about throwing an unchecked exception. Maybe 
`AssertionError`




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


Reply via email to