SOLR-5463: more details in case of spooky 'walk already seen' errors

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1558939 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Chris M. Hostetter 2014-01-16 22:38:30 +00:00
parent 26070d936d
commit a6b1c654d1
1 changed files with 10 additions and 1 deletions

View File

@ -623,7 +623,16 @@ public class DistribCursorPagingTest extends AbstractFullDistribZkTestBase {
}
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());