satishd commented on code in PR #14034: URL: https://github.com/apache/kafka/pull/14034#discussion_r1451284647
########## core/src/test/scala/unit/kafka/log/UnifiedLogTest.scala: ########## @@ -3951,18 +3953,18 @@ class UnifiedLogTest { assertEquals(10, log.logSegments.size()) { - val deletable = log.deletableSegments( - (segment: LogSegment, _: Option[LogSegment]) => segment.baseOffset <= 5) - val expected = log.nonActiveLogSegmentsFrom(0L).asScala.filter(segment => segment.baseOffset <= 5).toList - assertEquals(6, expected.length) - assertEquals(expected, deletable.toList) + val deletable = new util.ArrayList( Review Comment: This is strictly not needed as it returns `ArrayList` in this test's successful case scenario but the same method can return `EmptyList` instance also in other case. I wanted the test to fail with details about the elements instead of type mismatch. -- 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