fix a TestEarlyTerminatingSortingCollector.testTerminatedEarly test failure (avoid 1-document/1-unsorted-segment index by adding a 2nd segment/document before calling forceMerge(1) in createRandomIndex)

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1694742 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Christine Poerschke 2015-08-07 20:13:20 +00:00
parent 1f8d9738a7
commit c561e142bc
1 changed files with 2 additions and 0 deletions

View File

@ -115,6 +115,8 @@ public class TestEarlyTerminatingSortingCollector extends LuceneTestCase {
// the index, although want want a sorted segment so it needs to be merged
iw.getReader().close(); // refresh
iw.addDocument(new Document());
iw.commit();
iw.addDocument(new Document());
iw.forceMerge(1);
}
else if (random().nextBoolean()) {