X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-remoterpc-connector%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fremote%2Frpc%2FActorSystemFactoryTest.java;h=cd1cd918693c15a2f8343ed46e8fba97b50c7a8a;hp=ed5fa6d16e330bbf8907aad6a0341b5d543c1952;hb=2dc333588d0c15eb7f2df6223dcdcc15e05b077e;hpb=5b532dddc709cedef1f064e9cd6700030053135c diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/ActorSystemFactoryTest.java b/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/ActorSystemFactoryTest.java index ed5fa6d16e..cd1cd91869 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/ActorSystemFactoryTest.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/ActorSystemFactoryTest.java @@ -10,9 +10,11 @@ package org.opendaylight.controller.remote.rpc; import akka.actor.ActorSystem; +import com.typesafe.config.ConfigFactory; import junit.framework.Assert; import org.junit.After; import org.junit.Test; +import org.opendaylight.controller.remote.rpc.utils.AkkaConfigurationReader; import org.osgi.framework.Bundle; import org.osgi.framework.BundleContext; @@ -27,13 +29,17 @@ public class ActorSystemFactoryTest { public void testActorSystemCreation(){ BundleContext context = mock(BundleContext.class); when(context.getBundle()).thenReturn(mock(Bundle.class)); - ActorSystemFactory.createInstance(context); + + AkkaConfigurationReader reader = mock(AkkaConfigurationReader.class); + when(reader.read()).thenReturn(ConfigFactory.load()); + + ActorSystemFactory.createInstance(context, reader); system = ActorSystemFactory.getInstance(); Assert.assertNotNull(system); // Check illegal state exception try { - ActorSystemFactory.createInstance(context); + ActorSystemFactory.createInstance(context, reader); fail("Illegal State exception should be thrown, while creating actor system second time"); } catch (IllegalStateException e) { } @@ -45,5 +51,4 @@ public class ActorSystemFactoryTest { system.shutdown(); } } - }