You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ho...@apache.org on 2014/01/16 23:38:31 UTC

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

Author: hossman
Date: Thu Jan 16 22:38:30 2014
New Revision: 1558939

URL: http://svn.apache.org/r1558939
Log:
SOLR-5463: more details in case of spooky 'walk already seen' errors

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

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/cloud/DistribCursorPagingTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/cloud/DistribCursorPagingTest.java?rev=1558939&r1=1558938&r2=1558939&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/cloud/DistribCursorPagingTest.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/cloud/DistribCursorPagingTest.java Thu Jan 16 22:38:30 2014
@@ -623,7 +623,16 @@ public class DistribCursorPagingTest ext
       }
       for (SolrDocument doc : docs) {
         int id = ((Integer)doc.get("id")).intValue();
-        assertFalse("walk already seen: " + id, ids.exists(id));
+        if (ids.exists(id)) {
+          String msg = "walk already seen: " + id;
+          try {
+            queryAndCompareShards(params("q","id:"+id));
+          } catch (AssertionError ae) {
+            throw new AssertionError(msg + ", found shard inconsistency that would explain it...", ae);
+          }
+          rsp = cloudClient.query(params("q","id:"+id));
+          throw new AssertionError(msg + ", don't know why; q=id:"+id+" gives: " + rsp.toString());
+        }
         ids.put(id);
         assertFalse("id set bigger then max allowed ("+maxSize+"): " + ids.size(),
                     maxSize < ids.size());