You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/01/29 19:29:37 UTC
[GitHub] [spark] jerrypeng commented on a change in pull request #35343: [SPARK-38046][SS][TEST] Fix KafkaSource/KafkaMicroBatch flaky test due to non-deterministic timing
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org