You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2014/01/25 07:54:56 UTC

svn commit: r1561271 - /lucene/dev/trunk/solr/core/src/test/org/apache/solr/cloud/CustomCollectionTest.java

Author: shalin
Date: Sat Jan 25 06:54:55 2014
New Revision: 1561271

URL: http://svn.apache.org/r1561271
Log:
SOLR-5492: Enabling CustomCollectionTest after removing shards.info test code from it

Modified:
    lucene/dev/trunk/solr/core/src/test/org/apache/solr/cloud/CustomCollectionTest.java

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/cloud/CustomCollectionTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/cloud/CustomCollectionTest.java?rev=1561271&r1=1561270&r2=1561271&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/cloud/CustomCollectionTest.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/cloud/CustomCollectionTest.java Sat Jan 25 06:54:55 2014
@@ -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 extend
     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());