Bug 5740: Configure control-aware mailbox
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / test / java / org / opendaylight / controller / cluster / raft / AbstractRaftActorIntegrationTest.java
index eb5c9e5e91974e7b042e44867a9fbc69ec18bd47..5959df768fc6bd3359edfef777331b8bbcc9bb24 100644 (file)
@@ -16,6 +16,7 @@ import akka.actor.InvalidActorNameException;
 import akka.actor.PoisonPill;
 import akka.actor.Terminated;
 import akka.dispatch.Dispatchers;
+import akka.dispatch.Mailboxes;
 import akka.testkit.JavaTestKit;
 import akka.testkit.TestActorRef;
 import akka.util.Timeout;
@@ -261,7 +262,8 @@ public abstract class AbstractRaftActorIntegrationTest extends AbstractActorTest
         InvalidActorNameException lastEx = null;
         for (int i = 0; i < 10; i++) {
             try {
-                return factory.createTestActor(builder.props().withDispatcher(Dispatchers.DefaultDispatcherId()), id);
+                return factory.createTestActor(builder.props().withDispatcher(Dispatchers.DefaultDispatcherId())
+                        .withMailbox(Mailboxes.DefaultMailboxId()), id);
             } catch (InvalidActorNameException e) {
                 lastEx = e;
                 Uninterruptibles.sleepUninterruptibly(100, TimeUnit.MILLISECONDS);
@@ -287,7 +289,6 @@ public abstract class AbstractRaftActorIntegrationTest extends AbstractActorTest
             msg -> msg.getToIndex() == expIndex);
     }
 
-    @SuppressWarnings("unchecked")
     protected void verifySnapshot(String prefix, Snapshot snapshot, long lastAppliedTerm,
             long lastAppliedIndex, long lastTerm, long lastIndex)
                     throws Exception {