Remove the use of ActorIdentity.getRef() 25/76825/1
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 10 Oct 2018 15:13:42 +0000 (17:13 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 10 Oct 2018 15:13:42 +0000 (17:13 +0200)
This method has been replaced with getActorRef(), which returns
an Optional.

Change-Id: I41e4c8f8ed06de87716c06077201287752c0e327
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/TestActorFactory.java

index ea38c16acc95fc5110165feba04d504f5434fbb0..c71c8b7de4fd8f204aa7667eea5103644527d0d5 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.controller.cluster.raft;
 
 import akka.actor.Actor;
@@ -152,7 +151,7 @@ public class TestActorFactory implements AutoCloseable {
                 ActorSelection actorSelection = system.actorSelection(actorRef.path().toString());
                 Future<Object> future = Patterns.ask(actorSelection, new Identify(""), timeout);
                 ActorIdentity reply = (ActorIdentity)Await.result(future, timeout.duration());
-                Assert.assertNotNull("Identify returned null", reply.getRef());
+                Assert.assertTrue("Identify returned non-present", reply.getActorRef().isPresent());
                 return;
             } catch (Exception | AssertionError e) {
                 Uninterruptibles.sleepUninterruptibly(100, TimeUnit.MILLISECONDS);