apoorvmittal10 commented on code in PR #16108:
URL: https://github.com/apache/kafka/pull/16108#discussion_r1617741713


##########
core/src/test/java/kafka/log/remote/RemoteLogReaderTest.java:
##########
@@ -57,7 +56,7 @@ public void setUp() {
         TestUtils.clearYammerMetrics();
         Properties props = kafka.utils.TestUtils.createDummyBrokerConfig();
         
props.setProperty(RemoteLogManagerConfig.REMOTE_LOG_STORAGE_SYSTEM_ENABLE_PROP, 
"true");
-        brokerTopicStats = new 
BrokerTopicStats(Optional.of(KafkaConfig.fromProps(props)));
+        brokerTopicStats = new 
BrokerTopicStats(KafkaConfig.fromProps(props).isRemoteLogStorageSystemEnabled());

Review Comment:
   Seems the `props` here just created to pass a single config and is not 
required now. We might just require a single line below with removed `props`.
   
   ```
    brokerTopicStats = new BrokerTopicStats(true);
   ```



##########
core/src/test/scala/kafka/server/KafkaRequestHandlerTest.scala:
##########
@@ -197,7 +198,7 @@ class KafkaRequestHandlerTest {
   def testTopicStats(systemRemoteStorageEnabled: Boolean): Unit = {
     val props = kafka.utils.TestUtils.createDummyBrokerConfig()
     
props.setProperty(RemoteLogManagerConfig.REMOTE_LOG_STORAGE_SYSTEM_ENABLE_PROP, 
systemRemoteStorageEnabled.toString)
-    val brokerTopicStats = new 
BrokerTopicStats(java.util.Optional.of(KafkaConfig.fromProps(props)))
+    val brokerTopicStats = new 
BrokerTopicStats(KafkaConfig.fromProps(props).isRemoteLogStorageSystemEnabled)

Review Comment:
   Seems same here and elsewhere that `props` is not required now.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to