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%2FShardTransactionTest.java;h=4d7c61a197e08420e7cec90753aa1ef427f4ce4d;hb=516a4b2ea78179c9bd6ebb584862e8fc686ebf08;hp=68cee1fcaccd91c51c18f6cfab65e45da494bc39;hpb=de3e413b633b7555ae8f3fe2ec163dbb7dda5da8;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTransactionTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTransactionTest.java index 68cee1fcac..4d7c61a197 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTransactionTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTransactionTest.java @@ -26,7 +26,7 @@ import org.opendaylight.controller.cluster.datastore.modification.Modification; import org.opendaylight.controller.cluster.datastore.modification.WriteModification; import org.opendaylight.controller.md.cluster.datastore.model.TestModel; import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStore; -import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier; +import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes; import org.opendaylight.yangtools.yang.model.api.SchemaContext; @@ -58,14 +58,14 @@ public class ShardTransactionTest extends AbstractActorTest { protected void run() { subject.tell( - new ReadData(InstanceIdentifier.builder().build()).toSerializable(), + new ReadData(YangInstanceIdentifier.builder().build()).toSerializable(), getRef()); final String out = new ExpectMsg("match hint") { // do not put code outside this method, will run afterwards protected String match(Object in) { if (in.getClass().equals(ReadDataReply.SERIALIZABLE_CLASS)) { - if (ReadDataReply.fromSerializable(testSchemaContext,InstanceIdentifier.builder().build(), in) + if (ReadDataReply.fromSerializable(testSchemaContext,YangInstanceIdentifier.builder().build(), in) .getNormalizedNode()!= null) { return "match"; } @@ -179,7 +179,7 @@ public class ShardTransactionTest extends AbstractActorTest { final String out = new ExpectMsg("match hint") { // do not put code outside this method, will run afterwards protected String match(Object in) { - if (in instanceof WriteDataReply) { + if (in.getClass().equals(WriteDataReply.SERIALIZABLE_CLASS)) { return "match"; } else { throw noMatch(); @@ -217,7 +217,7 @@ public class ShardTransactionTest extends AbstractActorTest { final String out = new ExpectMsg(duration("500 milliseconds"), "match hint") { // do not put code outside this method, will run afterwards protected String match(Object in) { - if (in instanceof MergeDataReply) { + if (in.getClass().equals(MergeDataReply.SERIALIZABLE_CLASS)) { return "match"; } else { throw noMatch(); @@ -254,7 +254,7 @@ public class ShardTransactionTest extends AbstractActorTest { final String out = new ExpectMsg("match hint") { // do not put code outside this method, will run afterwards protected String match(Object in) { - if (in instanceof DeleteDataReply) { + if (in.getClass().equals(DeleteDataReply.SERIALIZABLE_CLASS)) { return "match"; } else { throw noMatch(); @@ -286,12 +286,12 @@ public class ShardTransactionTest extends AbstractActorTest { new Within(duration("1 seconds")) { protected void run() { - subject.tell(new ReadyTransaction(), getRef()); + subject.tell(new ReadyTransaction().toSerializable(), getRef()); final String out = new ExpectMsg("match hint") { // do not put code outside this method, will run afterwards protected String match(Object in) { - if (in instanceof ReadyTransactionReply) { + if (in.getClass().equals(ReadyTransactionReply.SERIALIZABLE_CLASS)) { return "match"; } else { throw noMatch(); @@ -324,12 +324,12 @@ public class ShardTransactionTest extends AbstractActorTest { new Within(duration("2 seconds")) { protected void run() { - subject.tell(new CloseTransaction(), getRef()); + subject.tell(new CloseTransaction().toSerializable(), getRef()); final String out = new ExpectMsg("match hint") { // do not put code outside this method, will run afterwards protected String match(Object in) { - if (in instanceof CloseTransactionReply) { + if (in.getClass().equals(CloseTransactionReply.SERIALIZABLE_CLASS)) { return "match"; } else { throw noMatch();