divijvaidya commented on code in PR #13868:
URL: https://github.com/apache/kafka/pull/13868#discussion_r1235061965


##########
core/src/test/scala/unit/kafka/server/ReplicaManagerTest.scala:
##########
@@ -4935,12 +4991,17 @@ class ReplicaManagerTest {
       topicPartition, leaderEpoch + leaderEpochIncrement, followerBrokerId, 
leaderBrokerId, countDownLatch,
       expectTruncation = false, localLogOffset = Some(10), offsetFromLeader = 
offsetFromLeader, topicId = Some(topicId))
 
-    val responses = replicaManager.describeLogDirs(Set(new 
TopicPartition(topic, topicPartition)))
-    assertEquals(mockLogMgr.liveLogDirs.size, responses.size)
-    responses.foreach { response =>
-      assertEquals(Errors.NONE.code, response.errorCode)
-      assertTrue(response.totalBytes > 0)
-      assertTrue(response.usableBytes >= 0)
+    try {
+      val responses = replicaManager.describeLogDirs(Set(new 
TopicPartition(topic, topicPartition)))
+      assertEquals(mockLogMgr.liveLogDirs.size, responses.size)
+      responses.foreach { response =>
+        assertEquals(Errors.NONE.code, response.errorCode)
+        assertTrue(response.totalBytes > 0)
+        assertTrue(response.usableBytes >= 0)
+      }
+    } finally {
+      // shutdown the replica manager upon test completion
+      replicaManager.shutdown(checkpointHW = false)

Review Comment:
   I added a new test which verifies that `checkpointHighWatermarks()` is 
called on shutdown. Also enabled it for a few Hw related tests.



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