rpuch commented on code in PR #4664: URL: https://github.com/apache/ignite-3/pull/4664#discussion_r1824769150
########## modules/core/src/test/java/org/apache/ignite/internal/hlc/HybridTimestampTest.java: ########## @@ -158,4 +163,34 @@ void roundUpIncrementsPhysicalPartWhenLogicalPartIsNonZero() { assertThat(ts.roundUpToPhysicalTick(), is(new HybridTimestamp(2, 0))); } + + @Test + void serializationAndDeserializationForNonNull() throws Exception { + HybridTimestamp originalTs = new HybridTimestamp(System.currentTimeMillis(), 2); + + IgniteDataOutput out = new IgniteUnsafeDataOutput(100); + + originalTs.writeTo(out); + + IgniteDataInput in = new IgniteUnsafeDataInput(out.array()); + + HybridTimestamp restoredTs = HybridTimestamp.readFrom(in); + + assertThat(restoredTs, is(originalTs)); + + assertThat(in.available(), is(0)); + } + + @Test + void serializationAndDeserializationForNull() throws Exception { Review Comment: `serializationAndDeserializationForNonNull()` tests `readFrom()` -- 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: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org