ijuma commented on a change in pull request #8517:
URL: https://github.com/apache/kafka/pull/8517#discussion_r413076253



##########
File path: core/src/main/scala/kafka/utils/DelayedItem.scala
##########
@@ -21,24 +21,19 @@ import java.util.concurrent._
 
 import org.apache.kafka.common.utils.Time
 
-import scala.math._
+class DelayedItem(val delayMs: Long, val time: Time) extends Logging {
+  def this(delayMs: Long) = this(delayMs, Time.SYSTEM)

Review comment:
       It should pass the actual `time` instance so that we can mock if we want:
   
   ```class ReplicaFetcherThread(name: String,
                              fetcherId: Int,
                              sourceBroker: BrokerEndPoint,
                              brokerConfig: KafkaConfig,
                              failedPartitions: FailedPartitions,
                              replicaMgr: ReplicaManager,
                              metrics: Metrics,
                              time: Time,
   ```




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to