Add an actor for entity rpc execution.
[controller.git] / opendaylight / md-sal / eos-dom-akka / src / test / java / org / opendaylight / controller / eos / akka / owner / supervisor / OwnerSupervisorTest.java
index 8a088e3fdbcef8c48ffb115b8d154aa23cf07f4f..4bf68a7ef1a46c0749ad618ba0a21054cc58f03e 100644 (file)
@@ -117,8 +117,8 @@ public class OwnerSupervisorTest extends AbstractNativeEosTest {
         private final Map<DOMEntity, String> currentOwners;
 
         private MockSyncer(final ActorContext<OwnerSupervisorCommand> context,
-                          final Map<DOMEntity, Set<String>> currentCandidates,
-                          final Map<DOMEntity, String> currentOwners) {
+                           final Map<DOMEntity, Set<String>> currentCandidates,
+                           final Map<DOMEntity, String> currentOwners) {
             super(context);
             this.currentCandidates = currentCandidates;
             this.currentOwners = currentOwners;
@@ -139,7 +139,7 @@ public class OwnerSupervisorTest extends AbstractNativeEosTest {
         }
 
         private Behavior<OwnerSupervisorCommand> switchToSupervisor(final InitialCandidateSync message) {
-            return OwnerSupervisor.create(currentCandidates, currentOwners);
+            return OwnerSupervisor.create(currentCandidates, currentOwners, CODEC_CONTEXT.getInstanceIdentifierCodec());
         }
     }
 
@@ -163,12 +163,14 @@ public class OwnerSupervisorTest extends AbstractNativeEosTest {
 
             listenerRegistry = context.spawn(EntityTypeListenerRegistry.create(role), "ListenerRegistry");
             candidateRegistry = context.spawn(CandidateRegistry.create(), "CandidateRegistry");
-            ownerStateChecker = context.spawn(OwnerStateChecker.create(role), "OwnerStateChecker");
 
             final ClusterSingleton clusterSingleton = ClusterSingleton.get(context.getSystem());
             // start the initial sync behavior that switches to the regular one after syncing
             ownerSupervisor = clusterSingleton.init(SingletonActor.of(
                     MockSyncer.create(currentCandidates, currentOwners), "OwnerSupervisor"));
+
+            ownerStateChecker = context.spawn(OwnerStateChecker.create(role, ownerSupervisor, null),
+                    "OwnerStateChecker");
         }
 
         public static Behavior<BootstrapCommand> create(final Map<DOMEntity, Set<String>> currentCandidates,