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/02/04 02:48:37 UTC

[GitHub] [spark] HeartSaVioR commented on a change in pull request #35343: [SPARK-38046][SS][TEST] Fix KafkaSource/KafkaMicroBatch flaky test due to non-deterministic timing

HeartSaVioR commented on a change in pull request #35343:
URL: https://github.com/apache/spark/pull/35343#discussion_r799125786



##########
File path: core/src/main/scala/org/apache/spark/util/Clock.scala
##########
@@ -99,3 +101,29 @@ private[spark] class SystemClock extends Clock {
     -1
   }
 }
+
+/**

Review comment:
       Yes. Unless the package private issue exists, I don't see the reason to have this here.
   
   The main reason I want to "isolate" the singleton and the backed class is, once we expose this as utility class, "other tests" in "other modules" can co-use this class, which is unexpected. We will need to narrow the scope as small as possible to avoid any side-effect.
   (I know we only expose get and advance so it's hard to break unless concurrent run of test/suites, but just a sort of defensive programming.)




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