sashapolo commented on code in PR #2402:
URL: https://github.com/apache/ignite-3/pull/2402#discussion_r1284044003


##########
modules/core/src/test/java/org/apache/ignite/internal/hlc/HybridTimestampTest.java:
##########
@@ -64,4 +67,62 @@ void notEqualWhenLogicalIsDifferent() {
     void hashCodeSameWhenComponentsAreSame() {
         assertEquals(new HybridTimestamp(1, 2).hashCode(), new 
HybridTimestamp(1, 2).hashCode());
     }
+
+    @Test
+    void addPhysicalTimeIncrementsPhysicalComponent() {
+        HybridTimestamp before = new HybridTimestamp(1, 2);
+
+        HybridTimestamp after = before.addPhysicalTime(1000);
+
+        assertThat(after.getPhysical(), is(1001L));
+    }
+
+    @Test
+    void addPhysicalTimeLeavesLogicalComponentIntact() {

Review Comment:
   I know why you did it, but in this case it's an unnecessary over 
complication, I think. You add some copy-pasted code just to check subtraction 
of two numbers, it won't make the other tests any more "heavy". It's up to you, 
of course, because it's obviously not a big deal



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