chia7712 commented on code in PR #15911: URL: https://github.com/apache/kafka/pull/15911#discussion_r1596287627
########## storage/src/test/java/org/apache/kafka/server/log/remote/storage/RemoteLogMetadataManagerTest.java: ########## @@ -49,9 +45,10 @@ public class RemoteLogMetadataManagerTest { private final Time time = new MockTime(1); - @ParameterizedTest(name = "remoteLogMetadataManager = {0}") - @MethodSource("remoteLogMetadataManagers") - public void testFetchSegments(RemoteLogMetadataManager remoteLogMetadataManager) throws Exception { + private RemoteLogMetadataManager remoteLogMetadataManager = new TopicBasedRemoteLogMetadataManagerWrapperWithHarness(); + + @Test + public void testFetchSegments() throws Exception { try { Review Comment: It seems to me `TopicBasedRemoteLogMetadataManagerWrapperWithHarness` can be removed also. We don't use the wrapper actually. This test can be modified by following style: ```java @Test public void testFetchSegments() throws Exception { try (TopicBasedRemoteLogMetadataManagerHarness remoteLogMetadataManagerHarness = new TopicBasedRemoteLogMetadataManagerHarness()) { RemoteLogMetadataManager remoteLogMetadataManager = remoteLogMetadataManagerHarness.remoteLogMetadataManager(); ``` noted `TopicBasedRemoteLogMetadataManagerHarness` needs to implement `AutoClosable`, and `remoteLogMetadataManager` should be a public method. -- 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