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%2FShardRecoveryCoordinatorTest.java;h=5cb74090dbc8c7acf27a25e18f2bb9add4b26c5a;hb=refs%2Fchanges%2F87%2F38987%2F5;hp=f4468b0e59d025a87f44365fc37e5797668e33a4;hpb=7ec296abdea94bbdc336276731ee545a2fb13e7c;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardRecoveryCoordinatorTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardRecoveryCoordinatorTest.java index f4468b0e59..5cb74090db 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardRecoveryCoordinatorTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardRecoveryCoordinatorTest.java @@ -11,14 +11,9 @@ package org.opendaylight.controller.cluster.datastore; import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; import com.google.common.base.Optional; -import java.io.IOException; import org.junit.Before; import org.junit.Test; -import org.opendaylight.controller.cluster.datastore.modification.MutableCompositeModification; -import org.opendaylight.controller.cluster.datastore.modification.WriteModification; import org.opendaylight.controller.cluster.datastore.utils.SerializationUtils; -import org.opendaylight.controller.cluster.raft.protobuff.client.messages.CompositeModificationByteStringPayload; -import org.opendaylight.controller.cluster.raft.protobuff.client.messages.CompositeModificationPayload; import org.opendaylight.controller.md.cluster.datastore.model.CarsModel; import org.opendaylight.controller.md.cluster.datastore.model.PeopleModel; import org.opendaylight.controller.md.cluster.datastore.model.SchemaContextHelper; @@ -62,36 +57,6 @@ public class ShardRecoveryCoordinatorTest { coordinator.applyCurrentLogRecoveryBatch(); } - @Test - public void testAppendRecoveredLogEntryCompositeModificationPayload() throws IOException { - final ShardRecoveryCoordinator coordinator = new ShardRecoveryCoordinator(peopleDataTree, - peopleSchemaContext, null, "foobar", LoggerFactory.getLogger("foo")); - coordinator.startLogRecoveryBatch(10); - try { - final MutableCompositeModification modification = new MutableCompositeModification((short) 1); - modification.addModification(new WriteModification(CarsModel.BASE_PATH, CarsModel.create())); - coordinator.appendRecoveredLogEntry(new CompositeModificationPayload(modification.toSerializable())); - } catch(final SchemaValidationFailedException e){ - fail("SchemaValidationFailedException should not happen if pruning is done"); - } - } - - @Test - public void testAppendRecoveredLogEntryCompositeModificationByteStringPayload() throws IOException { - final ShardRecoveryCoordinator coordinator = new ShardRecoveryCoordinator(peopleDataTree, - peopleSchemaContext, null, "foobar", LoggerFactory.getLogger("foo")); - coordinator.startLogRecoveryBatch(10); - try { - final MutableCompositeModification modification = new MutableCompositeModification((short) 1); - modification.addModification(new WriteModification(CarsModel.BASE_PATH, CarsModel.create())); - coordinator.appendRecoveredLogEntry(new CompositeModificationByteStringPayload(modification.toSerializable())); - } catch(final SchemaValidationFailedException e){ - fail("SchemaValidationFailedException should not happen if pruning is done"); - } - - assertEquals(false, readCars(peopleDataTree).isPresent()); - } - @Test public void testApplyRecoverySnapshot(){ final ShardRecoveryCoordinator coordinator = new ShardRecoveryCoordinator(peopleDataTree, @@ -171,7 +136,5 @@ public class ShardRecoveryCoordinatorTest { final byte[] bytes = SerializationUtils.serializeNormalizedNode(optional.get()); return bytes; - - } } \ No newline at end of file