viktorsomogyi commented on code in PR #14977:
URL: https://github.com/apache/kafka/pull/14977#discussion_r1425600506


##########
core/src/test/scala/unit/kafka/server/LogDirFailureTest.scala:
##########
@@ -191,12 +198,27 @@ class LogDirFailureTest extends IntegrationTestHarness {
     TestUtils.pollUntilAtLeastNumRecords(consumer, 1)
 
     // There should be no remaining LogDirEventNotification znode
-    assertTrue(zkClient.getAllLogDirEventNotifications.isEmpty)
+    if (quorum == "zk") {
+      assertTrue(zkClient.getAllLogDirEventNotifications.isEmpty)
+    }
 
-    // The controller should have marked the replica on the original leader as 
offline
-    val controllerServer = servers.find(_.kafkaController.isActive).get
-    val offlineReplicas = 
controllerServer.kafkaController.controllerContext.replicasInState(topic, 
OfflineReplica)
-    assertTrue(offlineReplicas.contains(PartitionAndReplica(new 
TopicPartition(topic, 0), leaderServerId)))
+    if (quorum == "kraft") {
+      waitUntilTrue(() => {
+        brokers.exists(broker => {
+          val hasOfflineDir = 
broker.asInstanceOf[BrokerServer].logDirFailureChannel.hasOfflineLogDir(failedLogDir.toPath.toString)

Review Comment:
   Fair point, change made



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