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%2FShardTransactionHeliumBackwardsCompatibilityTest.java;h=1d1b08b5f8d57db68e9690cf1045fec5cff10bcc;hb=f78b7f15e24efdb5dd9f91b487bc63dad7517b1c;hp=af07aeebcf0ce324014812d986391a438ffd2076;hpb=bc9665899219b2218abd8a9bee314cd07f0f84d0;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTransactionHeliumBackwardsCompatibilityTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTransactionHeliumBackwardsCompatibilityTest.java index af07aeebcf..1d1b08b5f8 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTransactionHeliumBackwardsCompatibilityTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTransactionHeliumBackwardsCompatibilityTest.java @@ -7,6 +7,12 @@ */ package org.opendaylight.controller.cluster.datastore; +import akka.actor.ActorRef; +import akka.actor.ActorSelection; +import akka.actor.PoisonPill; +import akka.actor.Props; +import akka.dispatch.Dispatchers; +import akka.testkit.TestActorRef; import java.util.Collections; import org.junit.Assert; import org.junit.Test; @@ -27,12 +33,6 @@ import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes; import org.opendaylight.yangtools.yang.model.api.SchemaContext; import scala.concurrent.duration.FiniteDuration; -import akka.actor.ActorRef; -import akka.actor.ActorSelection; -import akka.actor.PoisonPill; -import akka.actor.Props; -import akka.dispatch.Dispatchers; -import akka.testkit.TestActorRef; /** * Tests backwards compatibility support from Helium-1 to Helium. @@ -46,6 +46,7 @@ import akka.testkit.TestActorRef; */ public class ShardTransactionHeliumBackwardsCompatibilityTest extends AbstractActorTest { + @SuppressWarnings("unchecked") @Test public void testTransactionCommit() throws Exception { new ShardTestKit(getSystem()) {{ @@ -78,9 +79,10 @@ public class ShardTransactionHeliumBackwardsCompatibilityTest extends AbstractAc // Write data to the Tx txActor.tell(new WriteData(TestModel.TEST_PATH, - ImmutableNodes.containerNode(TestModel.TEST_QNAME), schemaContext), getRef()); + ImmutableNodes.containerNode(TestModel.TEST_QNAME), DataStoreVersions.BASE_HELIUM_VERSION). + toSerializable(), getRef()); - expectMsgClass(duration, WriteDataReply.class); + expectMsgClass(duration, ShardTransactionMessages.WriteDataReply.class); // Ready the Tx @@ -151,9 +153,11 @@ public class ShardTransactionHeliumBackwardsCompatibilityTest extends AbstractAc // Write data to the Tx txActor.tell(new WriteData(TestModel.TEST_PATH, - ImmutableNodes.containerNode(TestModel.TEST_QNAME), schemaContext), getRef()); + ImmutableNodes.containerNode(TestModel.TEST_QNAME), + DataStoreVersions.BASE_HELIUM_VERSION).toSerializable(), getRef()); - expectMsgClass(duration, WriteDataReply.class); + expectMsgClass(duration, WriteDataReply.INSTANCE.toSerializable( + DataStoreVersions.BASE_HELIUM_VERSION).getClass()); // Ready the Tx