bozhao12 commented on code in PR #12286: URL: https://github.com/apache/kafka/pull/12286#discussion_r901721861
########## storage/src/test/java/org/apache/kafka/server/log/remote/metadata/storage/TopicBasedRemoteLogMetadataManagerRestartTest.java: ########## @@ -68,10 +72,27 @@ protected Map<String, Object> overrideRemoteLogMetadataManagerProps() { remoteLogMetadataManagerHarness.initialize(Collections.emptySet(), true); } - private void startTopicBasedRemoteLogMetadataManagerHarness(boolean startConsumerThread) { - remoteLogMetadataManagerHarness.initializeRemoteLogMetadataManager(Collections.emptySet(), startConsumerThread); + private void startTopicBasedRemoteLogMetadataManagerHarness(boolean startConsumerThread, + int remoteLogMetadataTopicPartitionCount) { + remoteLogMetadataManagerHarness.initializeRemoteLogMetadataManager(Collections.emptySet(), startConsumerThread, + remoteLogMetadataTopicPartitionCount); } + + @Test + public void testRLMMInitializeResources() throws Exception { + assertTrue(topicBasedRlmm().isInitialized()); + + stopTopicBasedRemoteLogMetadataManagerHarness(); + assertThrows(KafkaException.class, () -> startTopicBasedRemoteLogMetadataManagerHarness(false, 4)); Review Comment: @divijvaidya Thanks for your suggestion, I updated the code. -- 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