Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-5492: Enabling CustomCollectionTest after removing shards.info test code from it

Shalin Shekhar Mangar0b295b861ef7
diff --git a/solr/core/src/test/org/apache/solr/cloud/CustomCollectionTest.java b/solr/core/src/test/org/apache/solr/cloud/CustomCollectionTest.java
index b5b269605e9..efdc95792ef 100644
--- a/solr/core/src/test/org/apache/solr/cloud/CustomCollectionTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/CustomCollectionTest.java
@@ -69,7 +69,6 @@ import org.junit.Ignore;
* Tests the Custom Sharding API.
*/
@Slow
-@Ignore("I am broken since SOLR-5492")
public class CustomCollectionTest extends AbstractFullDistribZkTestBase {
private static final String DEFAULT_COLLECTION = "collection1";
@@ -247,16 +246,6 @@ public class CustomCollectionTest extends AbstractFullDistribZkTestBase {
assertEquals(0, collectionClient.query(new SolrQuery("*:*").setParam(_ROUTE_,"b")).getResults().getNumFound());
assertEquals(3, collectionClient.query(new SolrQuery("*:*").setParam(_ROUTE_,"a")).getResults().getNumFound());
- // test shards.info with _route_ param
- QueryResponse resp = collectionClient.query(new SolrQuery("*:*").setParam(_ROUTE_, "a").setParam(ShardParams.SHARDS_INFO, true));
- NamedList<?> sinfo = (NamedList<?>) resp.getResponse().get(ShardParams.SHARDS_INFO);
- assertNotNull("missing shard info", sinfo);
- for (Map.Entry<String,?> entry : sinfo) {
- NamedList<?> info = (NamedList<?>) entry.getValue();
- assertTrue("Expected to find numFound in the up shard info",info.get("numFound") != null);
- assertTrue("Expected to find shardAddress in the up shard info",info.get("shardAddress") != null);
- }
-
collectionClient.deleteByQuery("*:*");
collectionClient.commit(true,true);
assertEquals(0, collectionClient.query(new SolrQuery("*:*")).getResults().getNumFound());