From d1447b47f32f2fb59095246a4d1b5f32ada6d398 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Sun, 12 Aug 2012 11:37:24 +0000 Subject: [PATCH] re-enable test git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1372071 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/test/org/apache/lucene/index/TestReaderClosed.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lucene/core/src/test/org/apache/lucene/index/TestReaderClosed.java b/lucene/core/src/test/org/apache/lucene/index/TestReaderClosed.java index 804e13ce094..c3028d05d20 100644 --- a/lucene/core/src/test/org/apache/lucene/index/TestReaderClosed.java +++ b/lucene/core/src/test/org/apache/lucene/index/TestReaderClosed.java @@ -69,16 +69,12 @@ public class TestReaderClosed extends LuceneTestCase { } // LUCENE-3800 - @BadApple - @AwaitsFix(bugUrl = "LUCENE-4280") public void testReaderChaining() throws Exception { assertTrue(reader.getRefCount() > 0); IndexReader wrappedReader = SlowCompositeReaderWrapper.wrap(reader); wrappedReader = new ParallelAtomicReader((AtomicReader) wrappedReader); - // TODO: LUCENE-4280; this fails: IndexSearcher searcher = newSearcher(wrappedReader); - // but with this it works: IndexSearcher searcher = new IndexSearcher(wrappedReader); TermRangeQuery query = TermRangeQuery.newStringRange("field", "a", "z", true, true); searcher.search(query, 5); @@ -90,6 +86,9 @@ public class TestReaderClosed extends LuceneTestCase { "this IndexReader cannot be used anymore as one of its child readers was closed", ace.getMessage() ); + } finally { + // shutdown executor: in case of wrap-wrap-wrapping + searcher.getIndexReader().close(); } }