don't rely upon docid order in this test

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1171868 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2011-09-17 00:09:24 +00:00
parent fca7eb820a
commit ff383452b6
1 changed files with 1 additions and 1 deletions

View File

@ -573,7 +573,7 @@ public class TestSimilarityBase extends LuceneTestCase {
for (SimilarityBase sim : sims) {
searcher.setSimilarityProvider(new BasicSimilarityProvider(sim));
TopDocs topDocs = searcher.search(q, 1000);
assertEquals("Failed: " + sim.toString(), 2, topDocs.scoreDocs[0].doc);
assertEquals("Failed: " + sim.toString(), "2", reader.document(topDocs.scoreDocs[0].doc).get(FIELD_ID));
}
}