From fc0b7cfb59ee1cfb28f221d81d198760b8105874 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Thu, 19 Jan 2012 11:21:13 +0000 Subject: [PATCH] don't rely on ThreadAffinity in tests git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1233288 13f79535-47bb-0310-9956-ffa450edef68 --- .../lucene/index/TestIndexWriterExceptions.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lucene/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java b/lucene/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java index 04bc77a94e8..403b53b04ba 100644 --- a/lucene/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java +++ b/lucene/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java @@ -695,12 +695,12 @@ public class TestIndexWriterExceptions extends LuceneTestCase { MockDirectoryWrapper dir = newDirectory(); { - final IndexWriter writer = new IndexWriter( - dir, - newIndexWriterConfig(TEST_VERSION_CURRENT, analyzer). - setMaxBufferedDocs(-1). - setMergePolicy(newLogMergePolicy(10)) - ); + final IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig( + TEST_VERSION_CURRENT, analyzer).setMaxBufferedDocs(-1) + .setMergePolicy( + random.nextBoolean() ? NoMergePolicy.COMPOUND_FILES + : NoMergePolicy.NO_COMPOUND_FILES)); + // don't use a merge policy here they depend on the DWPThreadPool and its max thread states etc. final int finalI = i; Thread[] threads = new Thread[NUM_THREAD];