peterxcli commented on code in PR #8503:
URL: https://github.com/apache/ozone/pull/8503#discussion_r2106567294
##########
hadoop-ozone/common/src/test/java/org/apache/hadoop/ozone/om/helpers/OldSnapshotDiffJobCodecForTesting.java:
##########
@@ -0,0 +1,37 @@
+package org.apache.hadoop.ozone.om.helpers;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.apache.hadoop.hdds.utils.db.Codec;
+import java.io.IOException;
+
+
+public class OldSnapshotDiffJobCodecForTesting
Review Comment:
nit
```suggestion
public class SnapshotDiffJobJacksonCodec
```
##########
hadoop-ozone/common/src/test/java/org/apache/hadoop/ozone/om/helpers/TestOmSnapshotDiffJobCodec.java:
##########
@@ -0,0 +1,57 @@
+package org.apache.hadoop.ozone.om.helpers;
+
+import org.apache.hadoop.hdds.utils.db.Codec;
+import org.apache.hadoop.ozone.snapshot.SnapshotDiffResponse.JobStatus;
+import org.apache.hadoop.ozone.snapshot.SnapshotDiffResponse.SubStatus;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+
+/**
+ * Testing serialization of SnapshotDiffJobCodec objects to/from RocksDB.
+ */
+public class TestOmSnapshotDiffJobCodec {
+ private final OldSnapshotDiffJobCodecForTesting oldCodec
+ = new OldSnapshotDiffJobCodecForTesting();
+ private final Codec<SnapshotDiffJob> newCodec = SnapshotDiffJob.getCodec();
+
+ @Test
+ public void testOldJsonSerializedDataCanBeReadByNewCodec() throws Exception {
Review Comment:
The `SnapshotDiffJob.getFromProtoBuf(proto)` is expected to throw exception?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]