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%2FShardTransactionFailureTest.java;h=de832c0b6052507fb241e76c6d7a14603ca37a0b;hb=364229dd715facec8ef8c73d6c60546c5f38b103;hp=ae4426e35b8281f4c88f1ec6a4b162da67be9ba3;hpb=e448e4e5f1f071aa61152b2f49b239d878c0a580;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTransactionFailureTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTransactionFailureTest.java index ae4426e35b..de832c0b60 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTransactionFailureTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTransactionFailureTest.java @@ -13,6 +13,7 @@ import akka.actor.Props; import akka.testkit.TestActorRef; import java.util.concurrent.TimeUnit; import org.junit.Test; +import org.opendaylight.controller.cluster.access.concepts.MemberName; import org.opendaylight.controller.cluster.datastore.identifiers.ShardIdentifier; import org.opendaylight.controller.cluster.datastore.jmx.mbeans.shard.ShardStats; import org.opendaylight.controller.cluster.datastore.messages.DataExists; @@ -41,8 +42,7 @@ public class ShardTransactionFailureTest extends AbstractActorTest { private static final ShardDataTree store = new ShardDataTree(testSchemaContext, TreeType.OPERATIONAL); private static final ShardIdentifier SHARD_IDENTIFIER = - ShardIdentifier.builder().memberName("member-1") - .shardName("inventory").type("operational").build(); + ShardIdentifier.create("inventory", MemberName.forName("member-1"), "operational"); private final DatastoreContext datastoreContext = DatastoreContext.newBuilder().build(); @@ -59,8 +59,8 @@ public class ShardTransactionFailureTest extends AbstractActorTest { public void testNegativeReadWithReadOnlyTransactionClosed() throws Throwable { final ActorRef shard = createShard(); - final Props props = ShardTransaction.props(RO, store.newReadOnlyTransaction("test-txn", null), shard, - datastoreContext, shardStats, "txn", DataStoreVersions.CURRENT_VERSION); + final Props props = ShardTransaction.props(RO, store.newReadOnlyTransaction(nextTransactionId()), shard, + datastoreContext, shardStats); final TestActorRef subject = TestActorRef.create(getSystem(), props, "testNegativeReadWithReadOnlyTransactionClosed"); @@ -81,8 +81,8 @@ public class ShardTransactionFailureTest extends AbstractActorTest { public void testNegativeReadWithReadWriteTransactionClosed() throws Throwable { final ActorRef shard = createShard(); - final Props props = ShardTransaction.props(RW, store.newReadWriteTransaction("test-txn", null), shard, - datastoreContext, shardStats, "txn", DataStoreVersions.CURRENT_VERSION); + final Props props = ShardTransaction.props(RW, store.newReadWriteTransaction(nextTransactionId()), shard, + datastoreContext, shardStats); final TestActorRef subject = TestActorRef.create(getSystem(), props, "testNegativeReadWithReadWriteTransactionClosed"); @@ -102,8 +102,8 @@ public class ShardTransactionFailureTest extends AbstractActorTest { public void testNegativeExistsWithReadWriteTransactionClosed() throws Throwable { final ActorRef shard = createShard(); - final Props props = ShardTransaction.props(RW, store.newReadWriteTransaction("test-txn", null), shard, - datastoreContext, shardStats, "txn", DataStoreVersions.CURRENT_VERSION); + final Props props = ShardTransaction.props(RW, store.newReadWriteTransaction(nextTransactionId()), shard, + datastoreContext, shardStats); final TestActorRef subject = TestActorRef.create(getSystem(), props, "testNegativeExistsWithReadWriteTransactionClosed");