X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-remoterpc-connector%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fremote%2Frpc%2Fregistry%2Fgossip%2FGossiperTest.java;h=54b09bfce74bf2fb2880807faa2628d2db486924;hb=refs%2Fchanges%2F62%2F27562%2F9;hp=e61b54f067e7bcba09a0ef7d476f7cd3b04c938d;hpb=ca350882dfe7f0f8c5ac2b8a82c8441258f960a9;p=controller.git diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/registry/gossip/GossiperTest.java b/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/registry/gossip/GossiperTest.java index e61b54f067..54b09bfce7 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/registry/gossip/GossiperTest.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/registry/gossip/GossiperTest.java @@ -7,34 +7,33 @@ */ package org.opendaylight.controller.remote.rpc.registry.gossip; +import static org.mockito.Matchers.any; +import static org.mockito.Matchers.anyMap; +import static org.mockito.Mockito.doNothing; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.reset; +import static org.mockito.Mockito.spy; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.opendaylight.controller.remote.rpc.registry.gossip.Messages.GossiperMessages.GossipEnvelope; +import static org.opendaylight.controller.remote.rpc.registry.gossip.Messages.GossiperMessages.GossipStatus; import akka.actor.ActorSystem; import akka.actor.Address; import akka.actor.Props; import akka.testkit.TestActorRef; import com.typesafe.config.ConfigFactory; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Map; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; +import org.opendaylight.controller.remote.rpc.RemoteRpcProviderConfig; import org.opendaylight.controller.remote.rpc.TerminationMonitor; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -import static org.mockito.Matchers.any; -import static org.mockito.Matchers.anyMap; -import static org.mockito.Mockito.doNothing; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.reset; -import static org.mockito.Mockito.spy; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.opendaylight.controller.remote.rpc.registry.gossip.Messages.GossiperMessages.GossipEnvelope; -import static org.opendaylight.controller.remote.rpc.registry.gossip.Messages.GossiperMessages.GossipStatus; - public class GossiperTest { @@ -71,7 +70,7 @@ public class GossiperTest { @Test public void testReceiveGossipTick_WhenNoRemoteMemberShouldIgnore(){ - mockGossiper.setClusterMembers(Collections.EMPTY_LIST); + mockGossiper.setClusterMembers(Collections.
emptyList()); doNothing().when(mockGossiper).getLocalStatusAndSendTo(any(Address.class)); mockGossiper.receiveGossipTick(); verify(mockGossiper, times(0)).getLocalStatusAndSendTo(any(Address.class)); @@ -121,7 +120,7 @@ public class GossiperTest { */ private static Gossiper createGossiper(){ - final Props props = Props.create(Gossiper.class, false); + final Props props = Props.create(Gossiper.class, false, new RemoteRpcProviderConfig(system.settings().config())); final TestActorRef testRef = TestActorRef.create(system, props, "testGossiper"); return testRef.underlyingActor();