do checkReader in newSearcher a lot less often for now

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1459018 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2013-03-20 19:46:12 +00:00
parent 4027f79370
commit 05a1bb2cb9
1 changed files with 3 additions and 1 deletions

View File

@ -1248,7 +1248,9 @@ public abstract class LuceneTestCase extends Assert {
if (maybeWrap) {
r = maybeWrapReader(r);
}
if (rarely() && r instanceof AtomicReader) {
// TODO: this whole check is a coverage hack, we should move it to tests for various filterreaders.
// ultimately whatever you do will be checkIndex'd at the end anyway.
if (random.nextInt(500) == 0 && r instanceof AtomicReader) {
// TODO: not useful to check DirectoryReader (redundant with checkindex)
// but maybe sometimes run this on the other crazy readers maybeWrapReader creates?
_TestUtil.checkReader(r);