Migrate to UntypedAbstractActor
[controller.git] / opendaylight / md-sal / sal-remoterpc-connector / src / test / java / org / opendaylight / controller / remote / rpc / RemoteRpcProviderConfigTest.java
index ae75252..41de6a4 100644 (file)
@@ -9,24 +9,20 @@ package org.opendaylight.controller.remote.rpc;
 
 import akka.actor.ActorSystem;
 import akka.actor.Props;
-import akka.actor.UntypedActor;
+import akka.actor.UntypedAbstractActor;
 import akka.testkit.TestActorRef;
 import com.typesafe.config.Config;
 import com.typesafe.config.ConfigFactory;
+import java.util.concurrent.TimeUnit;
 import org.junit.Assert;
 import org.junit.Test;
 import org.opendaylight.controller.cluster.common.actor.AkkaConfigurationReader;
 import scala.concurrent.duration.FiniteDuration;
 
-import java.io.File;
-import java.util.concurrent.TimeUnit;
-
 public class RemoteRpcProviderConfigTest {
 
     @Test
     public void testConfigDefaults() {
-
-        Config c = ConfigFactory.parseFile(new File("application.conf"));
         RemoteRpcProviderConfig config = new RemoteRpcProviderConfig.Builder("unit-test").build();
 
         //Assert on configurations from common config
@@ -45,9 +41,6 @@ public class RemoteRpcProviderConfigTest {
         Assert.assertNotNull(config.getRpcRegistryPath());
         Assert.assertNotNull(config.getAskDuration());
         Assert.assertNotNull(config.getGossipTickInterval());
-
-
-
     }
 
     @Test
@@ -85,22 +78,20 @@ public class RemoteRpcProviderConfigTest {
         Assert.assertEquals(expectedTimeout.toMillis(), config.getMailBoxPushTimeout().toMillis());
     }
 
-    public static class ConfigTestActor extends UntypedActor {
+    public static class ConfigTestActor extends UntypedAbstractActor {
 
-        private Config actorSystemConfig;
+        private final Config actorSystemConfig;
 
         public ConfigTestActor() {
             this.actorSystemConfig = getContext().system().settings().config();
         }
 
         @Override
-        public void onReceive(Object message) throws Exception {
+        public void onReceive(Object message) {
         }
 
         /**
          * Only for testing. NEVER expose actor's internal state like this.
-         *
-         * @return
          */
         public Config getConfig() {
             return actorSystemConfig;
@@ -115,4 +106,4 @@ public class RemoteRpcProviderConfigTest {
 
         }
     }
-}
\ No newline at end of file
+}

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.