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%2Futils%2FTestUtils.java;h=a2c44b063091fd45829624cde07230e325222336;hb=1e25f44b70aab9998f33b2136a0cf628821cd2dc;hp=bb881d532263384a5828fdd5ec31b32040835242;hpb=8a31e147100aa64b6090d856b2efe7ef50021555;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/utils/TestUtils.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/utils/TestUtils.java index bb881d5322..a2c44b0630 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/utils/TestUtils.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/utils/TestUtils.java @@ -11,24 +11,22 @@ package org.opendaylight.controller.cluster.datastore.utils; import akka.actor.ActorRef; import akka.actor.ActorSystem; import akka.actor.Props; -import junit.framework.Assert; - import java.util.List; +import org.junit.Assert; public class TestUtils { - public static void assertFirstSentMessage(ActorSystem actorSystem, ActorRef actorRef, Class clazz){ + public static void assertFirstSentMessage(final ActorSystem actorSystem, final ActorRef actorRef, final Class clazz){ ActorContext testContext = new ActorContext(actorSystem, actorSystem.actorOf( - Props.create(DoNothingActor.class))); + Props.create(DoNothingActor.class)), new MockClusterWrapper(), new MockConfiguration()); Object messages = testContext - .executeLocalOperation(actorRef, "messages", - ActorContext.ASK_DURATION); + .executeOperation(actorRef, "messages"); Assert.assertNotNull(messages); Assert.assertTrue(messages instanceof List); - List listMessages = (List) messages; + List listMessages = (List) messages; Assert.assertEquals(1, listMessages.size());