Apache Lucene open-source search software
fix test bug
Robert Muir5460fa9008eb
diff --git a/lucene/core/src/test/org/apache/lucene/index/TestCompoundFile.java b/lucene/core/src/test/org/apache/lucene/index/TestCompoundFile.javaindex d07f271c3e4..704131f5633 100644--- a/lucene/core/src/test/org/apache/lucene/index/TestCompoundFile.java+++ b/lucene/core/src/test/org/apache/lucene/index/TestCompoundFile.java@@ -809,6 +809,11 @@ public class TestCompoundFile extends LuceneTestCasepublic void testListAll() throws Exception {Directory dir = newDirectory();+ if (dir instanceof MockDirectoryWrapper) {+ // test lists files manually and tries to verify every .cfs it finds,+ // but a virus scanner could leave some trash.+ ((MockDirectoryWrapper)dir).setEnableVirusScanner(false);+ }// riw should sometimes create docvalues fields, etcRandomIndexWriter riw = new RandomIndexWriter(random(), dir);Document doc = new Document();