showuon commented on code in PR #12296:
URL: https://github.com/apache/kafka/pull/12296#discussion_r913806265


##########
core/src/test/scala/unit/kafka/log/LogCleanerTest.scala:
##########
@@ -1854,6 +1853,26 @@ class LogCleanerTest {
     } finally logCleaner.shutdown()
   }
 
+  @Test
+  def testReconfigureLogCleanerIoMaxBytesPerSecond(): Unit = {
+    val oldKafkaProps = TestUtils.createBrokerConfig(1, "localhost:2181")
+    oldKafkaProps.put(KafkaConfig.LogCleanerIoMaxBytesPerSecondProp, 10000000)
+
+    val logCleaner = new LogCleaner(LogCleaner.cleanerConfig(new 
KafkaConfig(oldKafkaProps)),
+      logDirs = Array(TestUtils.tempDir()),
+      logs = new Pool[TopicPartition, UnifiedLog](),
+      logDirFailureChannel = new LogDirFailureChannel(1),
+      time = time)
+
+    assertEquals(logCleaner.throttler.desiredRatePerSec, 10000000, 
"Throttler.desiredRatePerSec should be initialized with 
KafkaConfig.LogCleanerIoMaxBytesPerSecondProp")

Review Comment:
   nit: the 1st parameter of `assertEquals` should be expected value, and 2nd 
one is actual value. Same comment applied to below assertion. That is:
   `assertEquals(1000000, logCleaner.throttler.desiredRatePerSec)`



-- 
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

Reply via email to