BUG 1712 - Distributed DataStore does not work properly with Transaction Chains
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / test / java / org / opendaylight / controller / cluster / datastore / ConfigurationImplTest.java
index 17329611b00d6b010302eaa9d9ecf503972eb7e0..8c253596b8b752c264f81cced7090087fc02879b 100644 (file)
@@ -7,6 +7,7 @@ import org.junit.Test;
 
 import java.io.File;
 import java.util.List;
+import java.util.Set;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -83,4 +84,15 @@ public class ConfigurationImplTest {
         File f = new File("./module-shards.conf");
         ConfigFactory.parseFile(f);
     }
+
+    @Test
+    public void testGetAllShardNames(){
+        Set<String> allShardNames = configuration.getAllShardNames();
+
+        assertEquals(4, allShardNames.size());
+        assertTrue(allShardNames.contains("default"));
+        assertTrue(allShardNames.contains("people-1"));
+        assertTrue(allShardNames.contains("cars-1"));
+        assertTrue(allShardNames.contains("test-1"));
+    }
 }