Initial support for multiple-shards
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / test / java / org / opendaylight / controller / cluster / datastore / ShardManagerTest.java
index fa436c16053bc42ad9835e7ecbccd1cb202fc4b8..a2f19d8b2b6b2477a2a71749d6c48b766c459afe 100644 (file)
@@ -10,6 +10,8 @@ import org.junit.Test;
 import org.opendaylight.controller.cluster.datastore.messages.FindPrimary;
 import org.opendaylight.controller.cluster.datastore.messages.PrimaryFound;
 import org.opendaylight.controller.cluster.datastore.messages.PrimaryNotFound;
 import org.opendaylight.controller.cluster.datastore.messages.FindPrimary;
 import org.opendaylight.controller.cluster.datastore.messages.PrimaryFound;
 import org.opendaylight.controller.cluster.datastore.messages.PrimaryNotFound;
+import org.opendaylight.controller.cluster.datastore.utils.MockClusterWrapper;
+import org.opendaylight.controller.cluster.datastore.utils.MockConfiguration;
 import scala.concurrent.duration.Duration;
 
 public class ShardManagerTest {
 import scala.concurrent.duration.Duration;
 
 public class ShardManagerTest {
@@ -30,7 +32,7 @@ public class ShardManagerTest {
     public void testOnReceiveFindPrimaryForNonExistentShard() throws Exception {
 
         new JavaTestKit(system) {{
     public void testOnReceiveFindPrimaryForNonExistentShard() throws Exception {
 
         new JavaTestKit(system) {{
-            final Props props = ShardManager.props("config");
+            final Props props = ShardManager.props("config", new MockClusterWrapper(), new MockConfiguration());
             final TestActorRef<ShardManager> subject = TestActorRef.create(system, props);
 
             new Within(duration("1 seconds")) {
             final TestActorRef<ShardManager> subject = TestActorRef.create(system, props);
 
             new Within(duration("1 seconds")) {
@@ -51,7 +53,7 @@ public class ShardManagerTest {
   public void testOnReceiveFindPrimaryForExistentShard() throws Exception {
 
     new JavaTestKit(system) {{
   public void testOnReceiveFindPrimaryForExistentShard() throws Exception {
 
     new JavaTestKit(system) {{
-      final Props props = ShardManager.props("config");
+      final Props props = ShardManager.props("config", new MockClusterWrapper(), new MockConfiguration());
       final TestActorRef<ShardManager> subject = TestActorRef.create(system, props);
 
       // the run() method needs to finish within 3 seconds
       final TestActorRef<ShardManager> subject = TestActorRef.create(system, props);
 
       // the run() method needs to finish within 3 seconds
@@ -67,4 +69,4 @@ public class ShardManagerTest {
       };
     }};
   }
       };
     }};
   }
-}
\ No newline at end of file
+}