divijvaidya commented on code in PR #13820:
URL: https://github.com/apache/kafka/pull/13820#discussion_r1229313099


##########
core/src/test/scala/unit/kafka/utils/timer/MockTimer.scala:
##########
@@ -17,12 +17,15 @@
 package kafka.utils.timer
 
 import org.apache.kafka.server.util.MockTime
+import org.apache.kafka.server.util.timer.{Timer, TimerTask, TimerTaskEntry}
 
 import scala.collection.mutable
 
 class MockTimer(val time: MockTime = new MockTime) extends Timer {
 
-  private val taskQueue = 
mutable.PriorityQueue[TimerTaskEntry]()(Ordering[TimerTaskEntry].reverse)
+  private val taskQueue = mutable.PriorityQueue.empty[TimerTaskEntry](new 
Ordering[TimerTaskEntry] {
+    override def compare(x: TimerTaskEntry, y: TimerTaskEntry): Int = 
java.lang.Long.compare(x.expirationMs, y.expirationMs)

Review Comment:
   This can be removed after we add compare method to TimerTaskEntry



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