jerrypeng commented on a change in pull request #35343:
URL: https://github.com/apache/spark/pull/35343#discussion_r795086025
##########
File path: core/src/main/scala/org/apache/spark/util/Clock.scala
##########
@@ -99,3 +101,20 @@ private[spark] class SystemClock extends Clock {
-1
}
}
+
+/**
+ * To return a mocked system clock for testing purposes
+ */
+private[spark] class MockedSystemClock extends ManualClock {
+ override def getTimeMillis(): Long = {
+ currentMockSystemTime
+ }
+}
+
+object MockedSystemClock {
Review comment:
This is a companion object of MockedSystemClock. It basically contains
static methods for that class. I think having a comment for the
MockedSystemClock is good enough
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]