X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FConfigurationImplTest.java;h=afc060318ce783a8a8041e4b38c008181df3e16f;hb=9c34ce103df5efac991297dc25a64c9b8d6019f3;hp=17329611b00d6b010302eaa9d9ecf503972eb7e0;hpb=bc7b4edec3c868a14e0a0de3a3b8e1af2406448b;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ConfigurationImplTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ConfigurationImplTest.java index 17329611b0..afc060318c 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ConfigurationImplTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ConfigurationImplTest.java @@ -1,16 +1,15 @@ package org.opendaylight.controller.cluster.datastore; -import com.typesafe.config.ConfigFactory; -import junit.framework.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -import java.io.File; -import java.util.List; - import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; +import com.typesafe.config.ConfigFactory; +import java.io.File; +import java.util.List; +import java.util.Set; +import org.junit.Assert; +import org.junit.BeforeClass; +import org.junit.Test; public class ConfigurationImplTest { @@ -83,4 +82,15 @@ public class ConfigurationImplTest { File f = new File("./module-shards.conf"); ConfigFactory.parseFile(f); } + + @Test + public void testGetAllShardNames(){ + Set 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")); + } }