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;
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();
final ActorRef shard = createShard();
final Props props = ShardTransaction.props(RO, store.newReadOnlyTransaction("test-txn", null), shard,
- datastoreContext, shardStats, "txn", DataStoreVersions.CURRENT_VERSION);
+ datastoreContext, shardStats);
final TestActorRef<ShardTransaction> subject = TestActorRef.create(getSystem(), props,
"testNegativeReadWithReadOnlyTransactionClosed");
final ActorRef shard = createShard();
final Props props = ShardTransaction.props(RW, store.newReadWriteTransaction("test-txn", null), shard,
- datastoreContext, shardStats, "txn", DataStoreVersions.CURRENT_VERSION);
+ datastoreContext, shardStats);
final TestActorRef<ShardTransaction> subject = TestActorRef.create(getSystem(), props,
"testNegativeReadWithReadWriteTransactionClosed");
final ActorRef shard = createShard();
final Props props = ShardTransaction.props(RW, store.newReadWriteTransaction("test-txn", null), shard,
- datastoreContext, shardStats, "txn", DataStoreVersions.CURRENT_VERSION);
+ datastoreContext, shardStats);
final TestActorRef<ShardTransaction> subject = TestActorRef.create(getSystem(), props,
"testNegativeExistsWithReadWriteTransactionClosed");