mirror of https://github.com/apache/lucene.git
don't wrap already-atomic readers in crazy hierarchies while Uwe is visiting relatives
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1291999 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d3a7d32385
commit
bde0264a26
|
@ -1351,6 +1351,13 @@ public abstract class LuceneTestCase extends Assert {
|
|||
public static IndexReader maybeWrapReader(IndexReader r) throws IOException {
|
||||
// TODO: remove this, and fix those tests to wrap before putting slow around:
|
||||
final boolean wasOriginallyAtomic = r instanceof AtomicReader;
|
||||
|
||||
if (wasOriginallyAtomic) {
|
||||
// TODO: investigate purging etc of tests making top-level fieldcaches,
|
||||
// something is up if they get a crazy hierarchy
|
||||
return r;
|
||||
}
|
||||
|
||||
if (rarely()) {
|
||||
for (int i = 0, c = random.nextInt(6)+1; i < c; i++) {
|
||||
switch(random.nextInt(4)) {
|
||||
|
|
Loading…
Reference in New Issue