mirror of https://github.com/apache/lucene.git
LUCENE-4469: fix these tests to actually fail if checkindex fails
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1396156 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b032fb49f0
commit
eeb64dca34
|
@ -85,7 +85,6 @@ public class TestPulsingReuse extends LuceneTestCase {
|
||||||
// we always run this test with pulsing codec.
|
// we always run this test with pulsing codec.
|
||||||
Codec cp = _TestUtil.alwaysPostingsFormat(new NestedPulsingPostingsFormat());
|
Codec cp = _TestUtil.alwaysPostingsFormat(new NestedPulsingPostingsFormat());
|
||||||
BaseDirectoryWrapper dir = newDirectory();
|
BaseDirectoryWrapper dir = newDirectory();
|
||||||
dir.setCheckIndexOnClose(false); // will do this ourselves, custom codec
|
|
||||||
RandomIndexWriter iw = new RandomIndexWriter(random(), dir,
|
RandomIndexWriter iw = new RandomIndexWriter(random(), dir,
|
||||||
newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random())).setCodec(cp));
|
newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random())).setCodec(cp));
|
||||||
Document doc = new Document();
|
Document doc = new Document();
|
||||||
|
@ -119,8 +118,6 @@ public class TestPulsingReuse extends LuceneTestCase {
|
||||||
assertEquals(4, allEnums.size());
|
assertEquals(4, allEnums.size());
|
||||||
|
|
||||||
ir.close();
|
ir.close();
|
||||||
CheckIndex ci = new CheckIndex(dir);
|
|
||||||
ci.checkIndex(null);
|
|
||||||
dir.close();
|
dir.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,6 @@ public class Test2BPostings extends LuceneTestCase {
|
||||||
if (dir instanceof MockDirectoryWrapper) {
|
if (dir instanceof MockDirectoryWrapper) {
|
||||||
((MockDirectoryWrapper)dir).setThrottling(MockDirectoryWrapper.Throttling.NEVER);
|
((MockDirectoryWrapper)dir).setThrottling(MockDirectoryWrapper.Throttling.NEVER);
|
||||||
}
|
}
|
||||||
dir.setCheckIndexOnClose(false); // don't double-checkindex
|
|
||||||
|
|
||||||
IndexWriter w = new IndexWriter(dir,
|
IndexWriter w = new IndexWriter(dir,
|
||||||
new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random()))
|
new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random()))
|
||||||
|
@ -80,11 +79,6 @@ public class Test2BPostings extends LuceneTestCase {
|
||||||
}
|
}
|
||||||
w.forceMerge(1);
|
w.forceMerge(1);
|
||||||
w.close();
|
w.close();
|
||||||
CheckIndex ci = new CheckIndex(dir);
|
|
||||||
if (VERBOSE) {
|
|
||||||
ci.setInfoStream(System.out);
|
|
||||||
}
|
|
||||||
ci.checkIndex();
|
|
||||||
dir.close();
|
dir.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue