LUCENE-9359: Avoid test failures when the extra file is a dir.

This commit is contained in:
Adrien Grand 2020-06-17 09:35:38 +02:00
parent 6357b3bdaa
commit ea0ad3ec51
1 changed files with 2 additions and 1 deletions

View File

@ -19,6 +19,7 @@ package org.apache.lucene.index;
import org.apache.lucene.codecs.Codec;
import org.apache.lucene.codecs.CodecUtil;
import org.apache.lucene.mockfile.ExtrasFS;
import org.apache.lucene.search.Sort;
import org.apache.lucene.store.BaseDirectoryWrapper;
import org.apache.lucene.store.Directory;
@ -230,7 +231,7 @@ public class TestSegmentInfos extends LuceneTestCase {
// ok
}
corrupt = true;
} else if (slowFileExists(corruptDir, file) == false) { // extraFS
} else if (ExtrasFS.isExtra(file) == false) {
corruptDir.copyFrom(dir, file, file, IOContext.DEFAULT);
}
}