X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2Fpersisted%2FShardDataTreeSnapshotTest.java;h=5adf2cb6bd1a0a3da93ebdecb234c0a8f62dc56c;hb=1413d39efa41e0b3926e400dbd7ef5e3fac694c2;hp=9e05cf4860d5e3faaf7d16144e675f5cc207a3d8;hpb=2658d126f67512fcaac684d2ccb7197fe12f61f4;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/persisted/ShardDataTreeSnapshotTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/persisted/ShardDataTreeSnapshotTest.java index 9e05cf4860..5adf2cb6bd 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/persisted/ShardDataTreeSnapshotTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/persisted/ShardDataTreeSnapshotTest.java @@ -47,8 +47,11 @@ public class ShardDataTreeSnapshotTest { snapshot.serialize(out); } + final byte[] bytes = bos.toByteArray(); + assertEquals(236, bytes.length); + ShardDataTreeSnapshot deserialized; - try (ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray()))) { + try (ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes))) { deserialized = ShardDataTreeSnapshot.deserialize(in).getSnapshot(); } @@ -73,8 +76,11 @@ public class ShardDataTreeSnapshotTest { snapshot.serialize(out); } + final byte[] bytes = bos.toByteArray(); + assertEquals(384, bytes.length); + ShardDataTreeSnapshot deserialized; - try (ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray()))) { + try (ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes))) { deserialized = ShardDataTreeSnapshot.deserialize(in).getSnapshot(); }