X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FTransactionChainProxyTest.java;h=026b5490288c1bbdeb1ec44d37e998abddad813e;hp=acba775445879d5a1305969cc099fc6fd35b2cb8;hb=c31a6fcf9fb070d4419ca4c32d8b531fdcb5030d;hpb=00cc355c0c58e999ffebd531bca3a507e150e441 diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionChainProxyTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionChainProxyTest.java index acba775445..026b549028 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionChainProxyTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionChainProxyTest.java @@ -30,8 +30,6 @@ import java.util.concurrent.atomic.AtomicReference; import org.junit.Assert; import org.junit.Test; import org.opendaylight.controller.cluster.datastore.messages.BatchedModifications; -import org.opendaylight.controller.cluster.datastore.messages.BatchedModificationsReply; -import org.opendaylight.controller.cluster.datastore.messages.ReadyTransaction; import org.opendaylight.controller.cluster.datastore.modification.WriteModification; import org.opendaylight.controller.cluster.datastore.shardstrategy.DefaultShardStrategy; import org.opendaylight.controller.cluster.datastore.utils.ActorContext; @@ -176,7 +174,7 @@ public class TransactionChainProxyTest extends AbstractTransactionProxyTest { fail("Tx 2 should not have initiated until the Tx 1's ready future completed"); } - batchedReplyPromise1.success(new BatchedModificationsReply(1, txActorRef1.path().toString())); + batchedReplyPromise1.success(readyTxReply(txActorRef1.path().toString()).value().get().get()); // Tx 2 should've proceeded to find the primary shard. verify(mockActorContext, timeout(5000).times(2)).findPrimaryShardAsync(eq(DefaultShardStrategy.DEFAULT_SHARD)); @@ -196,7 +194,7 @@ public class TransactionChainProxyTest extends AbstractTransactionProxyTest { Promise readyReplyPromise1 = akka.dispatch.Futures.promise(); doReturn(readyReplyPromise1.future()).when(mockActorContext).executeOperationAsync( - eq(actorSelection(txActorRef1)), isA(ReadyTransaction.SERIALIZABLE_CLASS)); + eq(actorSelection(txActorRef1)), isA(BatchedModifications.class)); DOMStoreWriteTransaction writeTx1 = txChainProxy.newReadWriteTransaction(); @@ -205,7 +203,7 @@ public class TransactionChainProxyTest extends AbstractTransactionProxyTest { writeTx1.ready(); - verifyOneBatchedModification(txActorRef1, new WriteModification(TestModel.TEST_PATH, writeNode1), false); + verifyOneBatchedModification(txActorRef1, new WriteModification(TestModel.TEST_PATH, writeNode1), true); String tx2MemberName = "tx2MemberName"; doReturn(tx2MemberName).when(mockActorContext).getCurrentMemberName(); @@ -247,7 +245,7 @@ public class TransactionChainProxyTest extends AbstractTransactionProxyTest { fail("Tx 2 should not have initiated until the Tx 1's ready future completed"); } - readyReplyPromise1.success(readySerializedTxReply(txActorRef1.path().toString()).value().get().get()); + readyReplyPromise1.success(readyTxReply(txActorRef1.path().toString()).value().get().get()); verify(mockActorContext, timeout(5000)).executeOperationAsync(eq(getSystem().actorSelection(shardActorRef2.path())), eqCreateTransaction(tx2MemberName, READ_WRITE));