import akka.actor.ActorSystem;
import akka.actor.Address;
import akka.actor.Props;
-import akka.testkit.JavaTestKit;
import akka.testkit.TestActorRef;
+import akka.testkit.javadsl.TestKit;
import com.typesafe.config.ConfigFactory;
import java.util.Map;
import org.junit.After;
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.RemoteOpsProviderConfig;
import org.opendaylight.controller.remote.rpc.TerminationMonitor;
private Gossiper mockGossiper;
@BeforeClass
- public static void setup() throws InterruptedException {
+ public static void setup() {
system = ActorSystem.create("opendaylight-rpc", ConfigFactory.load().getConfig("unit-test"));
system.actorOf(Props.create(TerminationMonitor.class), "termination-monitor");
@AfterClass
public static void teardown() {
- JavaTestKit.shutdownActorSystem(system);
+ TestKit.shutdownActorSystem(system);
}
@Before
* @return instance of Gossiper class
*/
private static Gossiper createGossiper() {
- final RemoteRpcProviderConfig config =
- new RemoteRpcProviderConfig.Builder("unit-test")
+ final RemoteOpsProviderConfig config =
+ new RemoteOpsProviderConfig.Builder("unit-test")
.withConfigReader(ConfigFactory::load).build();
final Props props = Gossiper.testProps(config);
final TestActorRef<Gossiper> testRef = TestActorRef.create(system, props, "testGossiper");