showuon commented on code in PR #12165:
URL: https://github.com/apache/kafka/pull/12165#discussion_r873488369
##########
core/src/test/scala/unit/kafka/server/ServerShutdownTest.scala:
##########
@@ -195,8 +195,9 @@ class ServerShutdownTest extends KafkaServerTestHarness {
// identify the correct exception, making sure the server was shutdown,
and cleaning up if anything
// goes wrong so that awaitShutdown doesn't hang
case e: Exception =>
- assertTrue(exceptionClassTag.runtimeClass.isInstance(e), s"Unexpected
exception $e")
- assertEquals(if (quorum == "zk") BrokerState.NOT_RUNNING else
BrokerState.SHUTTING_DOWN, brokers.head.brokerState)
+ assertTrue(exceptionClassTag.runtimeClass.isInstance(if (isKRaftTest()
&& e.isInstanceOf[RuntimeException]) e.getCause.getCause else e),
Review Comment:
I'm a little confused here. You said, we just wrap a `RuntimeException` for
the original exception. But here, we `getCause` twice, compared with before, it
didn't `getCause`. Am I missing something? Thanks.
--
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]