diff --git a/lucene/core/src/test/org/apache/lucene/search/TestLRUQueryCache.java b/lucene/core/src/test/org/apache/lucene/search/TestLRUQueryCache.java index b3e1ed3eacd..8443d86700d 100644 --- a/lucene/core/src/test/org/apache/lucene/search/TestLRUQueryCache.java +++ b/lucene/core/src/test/org/apache/lucene/search/TestLRUQueryCache.java @@ -1605,7 +1605,10 @@ public class TestLRUQueryCache extends LuceneTestCase { public void testBulkScorerLocking() throws Exception { Directory dir = newDirectory(); - IndexWriterConfig iwc = newIndexWriterConfig().setMergePolicy(NoMergePolicy.INSTANCE); + IndexWriterConfig iwc = newIndexWriterConfig() + .setMergePolicy(NoMergePolicy.INSTANCE) + // the test framework sometimes sets crazy low values, prevent this since we are indexing many docs + .setMaxBufferedDocs(-1); IndexWriter w = new IndexWriter(dir, iwc); final int numDocs = atLeast(10);