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=8a141fb9b35789907b587facdbcda041f376d57e;hb=93e6f3bfc003d4ce2d968761dff963615a0b799d;hp=4ddba2f1b9d773b3c4783d3e401fa7df43d32a0e;hpb=15fa131be8b16703089a6d8508546120cf15d45d;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 4ddba2f1b9..8a141fb9b3 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,23 +11,24 @@ 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; +import org.opendaylight.controller.cluster.raft.utils.DoNothingActor; +import org.opendaylight.controller.cluster.raft.utils.MessageCollectorActor; 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)), new MockClusterWrapper(), new MockConfiguration()); Object messages = testContext - .executeLocalOperation(actorRef, "messages"); + .executeOperation(actorRef, MessageCollectorActor.GET_ALL_MESSAGES); Assert.assertNotNull(messages); Assert.assertTrue(messages instanceof List); - List listMessages = (List) messages; + List listMessages = (List) messages; Assert.assertEquals(1, listMessages.size());