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
This commit is contained in:
Simon Willnauer 2012-01-19 11:21:13 +00:00
parent 52dc6a5908
commit fc0b7cfb59
1 changed files with 6 additions and 6 deletions

View File

@ -695,12 +695,12 @@ public class TestIndexWriterExceptions extends LuceneTestCase {
MockDirectoryWrapper dir = newDirectory(); MockDirectoryWrapper dir = newDirectory();
{ {
final IndexWriter writer = new IndexWriter( final IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig(
dir, TEST_VERSION_CURRENT, analyzer).setMaxBufferedDocs(-1)
newIndexWriterConfig(TEST_VERSION_CURRENT, analyzer). .setMergePolicy(
setMaxBufferedDocs(-1). random.nextBoolean() ? NoMergePolicy.COMPOUND_FILES
setMergePolicy(newLogMergePolicy(10)) : 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; final int finalI = i;
Thread[] threads = new Thread[NUM_THREAD]; Thread[] threads = new Thread[NUM_THREAD];