showuon commented on code in PR #12165:
URL: https://github.com/apache/kafka/pull/12165#discussion_r874535508


##########
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:
   [KAFKA-13908](https://issues.apache.org/jira/browse/KAFKA-13908) is created 
for the RuntimeException cause issue.



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