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


##########
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:
   The point is to make unrelated properties be tested by separate tests, to 
make it easier to see what is being tested and what fails (if it does). 
Combining tests for a few properties in one test method makes it less obvious 
and only makes sense if each test scenario is rather heavy.



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