Allow RejectedExecutionException in TestReaderClosed.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1628449 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Adrien Grand 2014-09-30 14:20:58 +00:00
parent 320be558d7
commit 804bd36ad2
1 changed files with 4 additions and 0 deletions

View File

@ -18,6 +18,7 @@ package org.apache.lucene.index;
*/ */
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.RejectedExecutionException;
import org.apache.lucene.analysis.MockAnalyzer; import org.apache.lucene.analysis.MockAnalyzer;
import org.apache.lucene.analysis.MockTokenizer; import org.apache.lucene.analysis.MockTokenizer;
@ -67,6 +68,9 @@ public class TestReaderClosed extends LuceneTestCase {
searcher.search(query, 5); searcher.search(query, 5);
} catch (AlreadyClosedException ace) { } catch (AlreadyClosedException ace) {
// expected // expected
} catch (RejectedExecutionException ree) {
// expected if the searcher has been created with threads since LuceneTestCase
// closes the thread-pool in a reader close listener
} }
} }