X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FShardTest.java;h=144f0f5c9fc825917d139ca01b3ff0e989c39ab1;hb=94603c85193862f85bf9d9aa51d5062d9f84e979;hp=99606e751a9a5d1ba6a5209b9d8a0ab491dcb229;hpb=023402c7c80372260b6c5c82f120093a73806717;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTest.java index 99606e751a..144f0f5c9f 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTest.java @@ -426,8 +426,8 @@ public class ShardTest extends AbstractShardTest { newDatastoreContext(), SCHEMA_CONTEXT); } - Map getPeerAddresses() { - return getRaftActorContext().getPeerAddresses(); + String getPeerAddress(String id) { + return getRaftActorContext().getPeerAddress(id); } @Override @@ -448,15 +448,14 @@ public class ShardTest extends AbstractShardTest { } })), "testPeerAddressResolved"); - //waitUntilLeader(shard); assertEquals("Recovery complete", true, Uninterruptibles.awaitUninterruptibly(recoveryComplete, 5, TimeUnit.SECONDS)); final String address = "akka://foobar"; shard.underlyingActor().onReceiveCommand(new PeerAddressResolved(shardID.toString(), address)); - assertEquals("getPeerAddresses", address, - ((TestShard) shard.underlyingActor()).getPeerAddresses().get(shardID.toString())); + assertEquals("getPeerAddress", address, + ((TestShard) shard.underlyingActor()).getPeerAddress(shardID.toString())); shard.tell(PoisonPill.getInstance(), ActorRef.noSender()); }}; @@ -1183,7 +1182,7 @@ public class ShardTest extends AbstractShardTest { final ShardDataTree dataStore = shard.underlyingActor().getDataStore(); - final DataTreeModification modification = dataStore.getDataTree().takeSnapshot().newModification(); + final DataTreeModification modification = dataStore.newModification(); final ContainerNode writeData = ImmutableNodes.containerNode(TestModel.TEST_QNAME); new WriteModification(TestModel.TEST_PATH, writeData).apply(modification); @@ -1216,7 +1215,7 @@ public class ShardTest extends AbstractShardTest { final ShardDataTree dataStore = shard.underlyingActor().getDataStore(); - final DataTreeModification modification = dataStore.getDataTree().takeSnapshot().newModification(); + final DataTreeModification modification = dataStore.newModification(); final ContainerNode writeData = ImmutableNodes.containerNode(TestModel.TEST_QNAME); new WriteModification(TestModel.TEST_PATH, writeData).apply(modification); @@ -2086,7 +2085,7 @@ public class ShardTest extends AbstractShardTest { // Ready the third Tx. final String transactionID3 = "tx3"; - final DataTreeModification modification3 = dataStore.getDataTree().takeSnapshot().newModification(); + final DataTreeModification modification3 = dataStore.newModification(); new WriteModification(TestModel.TEST2_PATH, ImmutableNodes.containerNode(TestModel.TEST2_QNAME)) .apply(modification3); modification3.ready();