sanpwc commented on code in PR #1177:
URL: https://github.com/apache/ignite-3/pull/1177#discussion_r1004360168


##########
modules/core/src/main/java/org/apache/ignite/hlc/HybridClock.java:
##########
@@ -40,13 +47,25 @@ public class HybridClock {
     }
 
     /** Latest timestamp. */
-    private volatile HybridTimestamp latestTime;
+    protected volatile HybridTimestamp latestTime;
 
     /**
      * The constructor which initializes the latest time to current time by 
system clock.
      */
     public HybridClock() {
-        this.latestTime = new 
HybridTimestamp(Clock.systemUTC().instant().toEpochMilli(), 0);
+        this.currentTimeMillisProvider = () -> 
Clock.systemUTC().instant().toEpochMilli();
+
+        this.latestTime = new HybridTimestamp(currentTimeMillisProvider.get(), 
0);
+    }
+
+    /**
+     * The constructor which initializes the latest time to the given provider.
+     */
+    @TestOnly

Review Comment:
   I don't like an idea of adding test related code to HybridClock, neither 
@TestOnly nor protected along with all suppliers.



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

Reply via email to