SOLR-9132: RulesTest must tear down collections at the end of each test

This commit is contained in:
Alan Woodward 2016-10-05 15:18:46 +01:00
parent b6610b9f04
commit d398617be8
1 changed files with 10 additions and 0 deletions

View File

@ -80,6 +80,8 @@ public class RulesTest extends SolrCloudTestCase {
CollectionAdminRequest.createShard(rulesColl, "shard2").process(cluster.getSolrClient());
CollectionAdminRequest.addReplicaToShard(rulesColl, "shard2").process(cluster.getSolrClient());
CollectionAdminRequest.deleteCollection(rulesColl).process(cluster.getSolrClient());
}
@Test
@ -102,6 +104,8 @@ public class RulesTest extends SolrCloudTestCase {
list = (List) rulesCollection.get("snitch");
assertEquals(1, list.size());
assertEquals ( "ImplicitSnitch", ((Map)list.get(0)).get("class"));
CollectionAdminRequest.deleteCollection(rulesColl).process(cluster.getSolrClient());
}
@Test
@ -129,6 +133,8 @@ public class RulesTest extends SolrCloudTestCase {
list = (List) rulesCollection.get("snitch");
assertEquals(1, list.size());
assertEquals("ImplicitSnitch", list.get(0).get("class"));
CollectionAdminRequest.deleteCollection(rulesColl).process(cluster.getSolrClient());
}
@ -151,6 +157,8 @@ public class RulesTest extends SolrCloudTestCase {
.setSnitch("class:ImplicitSnitch")
.process(cluster.getSolrClient());
CollectionAdminRequest.deleteCollection(rulesColl).process(cluster.getSolrClient());
}
@ -192,5 +200,7 @@ public class RulesTest extends SolrCloudTestCase {
list = (List) rulesCollection.get("snitch");
assertEquals(1, list.size());
assertEquals("ImplicitSnitch", ((Map) list.get(0)).get("class"));
CollectionAdminRequest.deleteCollection(rulesColl).process(cluster.getSolrClient());
}
}