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%2FShardTransactionChainTest.java;h=d468af6664981d08ad603b1a841fefbdaccc8d47;hp=b35880a6a501367a4c1155b3cae4ef405352ddb6;hb=5bcd1acc0d6407ff27365e3dce7810589eae2a2d;hpb=79d775c3cc0fe48b01eefdb732124e81dfe3441c diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTransactionChainTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTransactionChainTest.java index b35880a6a5..d468af6664 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTransactionChainTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTransactionChainTest.java @@ -19,7 +19,8 @@ public class ShardTransactionChainTest extends AbstractActorTest { private static ListeningExecutorService storeExecutor = MoreExecutors.listeningDecorator(MoreExecutors.sameThreadExecutor()); - private static final InMemoryDOMDataStore store = new InMemoryDOMDataStore("OPER", storeExecutor); + private static final InMemoryDOMDataStore store = new InMemoryDOMDataStore("OPER", storeExecutor, + MoreExecutors.sameThreadExecutor()); static { store.onGlobalContextUpdated(TestModel.createTestContext()); @@ -31,12 +32,14 @@ public class ShardTransactionChainTest extends AbstractActorTest { final ActorRef subject = getSystem().actorOf(props, "testCreateTransaction"); new Within(duration("1 seconds")) { + @Override protected void run() { subject.tell(new CreateTransaction("txn-1", TransactionProxy.TransactionType.READ_ONLY.ordinal() ).toSerializable(), getRef()); final String out = new ExpectMsg(duration("1 seconds"), "match hint") { // do not put code outside this method, will run afterwards + @Override protected String match(Object in) { if (in.getClass().equals(CreateTransactionReply.SERIALIZABLE_CLASS)) { return CreateTransactionReply.fromSerializable(in).getTransactionPath(); @@ -66,12 +69,14 @@ public class ShardTransactionChainTest extends AbstractActorTest { final ActorRef subject = getSystem().actorOf(props, "testCloseTransactionChain"); new Within(duration("1 seconds")) { + @Override protected void run() { subject.tell(new CloseTransactionChain().toSerializable(), getRef()); final String out = new ExpectMsg(duration("1 seconds"), "match hint") { // do not put code outside this method, will run afterwards + @Override protected String match(Object in) { if (in.getClass().equals(CloseTransactionChainReply.SERIALIZABLE_CLASS)) { return "match";