SOLR-8007: tests: fix TestSearcherReuse by avoiding background merges

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1701291 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2015-09-04 16:44:17 +00:00
parent 51b3c33f82
commit 92d3ef3462
1 changed files with 4 additions and 1 deletions

View File

@ -89,7 +89,10 @@ public class TestSearcherReuse extends SolrTestCaseJ4 {
assertU(commit());
}
}
assertU(commit());
// with random merge policies, a regular commit can cause a segment to be flushed that can kick off a background merge
// that can cause a later commit to actually see changes and open a new searcher. This should not be possible with optimize
assertU(optimize());
// seed a single query into the cache
assertQ(req("*:*"), "//*[@numFound='"+numDocs+"']");