clolov commented on code in PR #14161: URL: https://github.com/apache/kafka/pull/14161#discussion_r1287188953
########## core/src/test/scala/unit/kafka/server/KafkaServerTest.scala: ########## @@ -154,6 +155,92 @@ class KafkaServerTest extends QuorumTestHarness { server.shutdown() } + @Test + def testClusterWideDisablementOfTieredStorageWithEnabledTieredTopic(): Unit = { + val tsEnabledProps = TestUtils.createBrokerConfigs(1, zkConnect).head + tsEnabledProps.put(RemoteLogManagerConfig.REMOTE_LOG_STORAGE_SYSTEM_ENABLE_PROP, true.toString) + tsEnabledProps.put(RemoteLogManagerConfig.REMOTE_LOG_METADATA_MANAGER_CLASS_NAME_PROP, + "org.apache.kafka.server.log.remote.storage.NoOpRemoteLogMetadataManager") + tsEnabledProps.put(RemoteLogManagerConfig.REMOTE_STORAGE_MANAGER_CLASS_NAME_PROP, + "org.apache.kafka.server.log.remote.storage.NoOpRemoteStorageManager") + + val server = TestUtils.createServer(KafkaConfig.fromProps(tsEnabledProps)) + server.remoteLogManagerOpt match { + case Some(_) => + case None => fail("RemoteLogManager should be initialized") + } + + val topicProps = new Properties() + topicProps.setProperty(TopicConfig.REMOTE_LOG_STORAGE_ENABLE_CONFIG, true.toString) Review Comment: I do not know why there isn't a TestUtils.createTopicConfigs ¯\\\_(ツ)\_/¯ Happy to add it if others think it might be useful! ########## core/src/test/scala/unit/kafka/server/KafkaServerTest.scala: ########## @@ -154,6 +155,92 @@ class KafkaServerTest extends QuorumTestHarness { server.shutdown() } + @Test + def testClusterWideDisablementOfTieredStorageWithEnabledTieredTopic(): Unit = { + val tsEnabledProps = TestUtils.createBrokerConfigs(1, zkConnect).head + tsEnabledProps.put(RemoteLogManagerConfig.REMOTE_LOG_STORAGE_SYSTEM_ENABLE_PROP, true.toString) + tsEnabledProps.put(RemoteLogManagerConfig.REMOTE_LOG_METADATA_MANAGER_CLASS_NAME_PROP, + "org.apache.kafka.server.log.remote.storage.NoOpRemoteLogMetadataManager") + tsEnabledProps.put(RemoteLogManagerConfig.REMOTE_STORAGE_MANAGER_CLASS_NAME_PROP, + "org.apache.kafka.server.log.remote.storage.NoOpRemoteStorageManager") + + val server = TestUtils.createServer(KafkaConfig.fromProps(tsEnabledProps)) + server.remoteLogManagerOpt match { + case Some(_) => + case None => fail("RemoteLogManager should be initialized") + } + + val topicProps = new Properties() + topicProps.setProperty(TopicConfig.REMOTE_LOG_STORAGE_ENABLE_CONFIG, true.toString) Review Comment: I do not know why there isn't a TestUtils.createTopicConfigs ¯\\\_(ツ)\_/¯ Happy to add it if others think it might be useful! -- 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