turn assertingDirectoryReader back on

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1363877 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2012-07-20 17:15:24 +00:00
parent 359850aec5
commit 0ac72088e8
2 changed files with 15 additions and 2 deletions

View File

@ -376,4 +376,17 @@ public class AssertingAtomicReader extends FilterAtomicReader {
return super.hasPayload();
}
}
// this is the same hack as FCInvisible
@Override
public Object getCoreCacheKey() {
return cacheKey;
}
@Override
public Object getCombinedCoreAndDeletesKey() {
return cacheKey;
}
private final Object cacheKey = new Object();
}

View File

@ -1046,9 +1046,9 @@ public abstract class LuceneTestCase extends Assert {
// QueryUtils' reader with a fake cache key, so insanity checker cannot walk
// along our reader:
if (r instanceof AtomicReader) {
r = new FCInvisibleMultiReader(new AssertingAtomicReader((AtomicReader)r));
r = new AssertingAtomicReader((AtomicReader)r);
} else if (r instanceof DirectoryReader) {
r = new FCInvisibleMultiReader((DirectoryReader)r);
r = new AssertingDirectoryReader((DirectoryReader)r);
}
break;
default: