gaurav-narula commented on code in PR #19607: URL: https://github.com/apache/kafka/pull/19607#discussion_r2122020927
########## storage/src/test/java/org/apache/kafka/storage/internals/log/LogSegmentsTest.java: ########## @@ -274,4 +278,27 @@ public void testUpdateDir() throws IOException { } } + @Test + public void testCloseClosesAllLogSegmentsOnExceptionWhileClosingOne() throws IOException { + LogSegment seg1 = createSegment(0L); + LogSegment seg2 = createSegment(100L); + LogSegment seg3 = createSegment(200L); + LogSegments segments = new LogSegments(topicPartition); + segments.add(seg1); + segments.add(seg2); + segments.add(seg3); + + doThrow(new IOException("Failure")).when(seg2).close(); + + try { Review Comment: Addressed with [ce22ba9](https://github.com/apache/kafka/pull/19607/commits/ce22ba92e1ab3c9da057eef6e997ad6c3534e5f9) -- 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