You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/06/01 02:31:20 UTC
[GitHub] [kafka] showuon commented on a diff in pull request #12136: KAFKA-13773: catch kafkaStorageException to avoid broker shutdown directly
showuon commented on code in PR #12136:
URL: https://github.com/apache/kafka/pull/12136#discussion_r886269330
##########
core/src/test/scala/unit/kafka/server/ServerShutdownTest.scala:
##########
@@ -158,14 +158,29 @@ class ServerShutdownTest extends KafkaServerTestHarness {
@ParameterizedTest(name = TestInfoUtils.TestWithParameterizedQuorumName)
@ValueSource(strings = Array("zk", "kraft"))
- def testCleanShutdownAfterFailedStartupDueToCorruptLogs(quorum: String): Unit = {
+ def testNoCleanShutdownAfterFailedStartupDueToCorruptLogs(quorum: String): Unit = {
createTopic(topic)
shutdownBroker()
config.logDirs.foreach { dirName =>
val partitionDir = new File(dirName, s"$topic-0")
partitionDir.listFiles.foreach(f => TestUtils.appendNonsenseToFile(f, TestUtils.random.nextInt(1024) + 1))
}
- verifyCleanShutdownAfterFailedStartup[KafkaStorageException]
+
+ val expectedStatusCode = Some(1)
+ var receivedStatusCode = Option.empty[Int]
Review Comment:
Good call! 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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org