LUCENE-6847: sidestep virus checkers until we can do LUCENE-6835

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1709609 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2015-10-20 14:29:03 +00:00
parent 9534904c25
commit 11745211d3
3 changed files with 18 additions and 9 deletions

View File

@ -377,7 +377,7 @@ public class TestBKDTree extends LuceneTestCase {
iwc.setCodec(codec);
Directory dir;
if (lats.length > 100000) {
dir = newFSDirectory(createTempDir("TestBKDTree"));
dir = noVirusChecker(newFSDirectory(createTempDir("TestBKDTree")));
} else {
dir = getDirectory();
}
@ -634,11 +634,14 @@ public class TestBKDTree extends LuceneTestCase {
return new BKDTreeDocValuesFormat(maxPointsInLeaf, maxPointsSortInHeap);
}
private static Directory getDirectory() {
Directory dir = newDirectory();
private static Directory noVirusChecker(Directory dir) {
if (dir instanceof MockDirectoryWrapper) {
((MockDirectoryWrapper) dir).setEnableVirusScanner(false);
}
return dir;
}
private static Directory getDirectory() {
return noVirusChecker(newDirectory());
}
}

View File

@ -369,7 +369,7 @@ public class TestRangeTree extends LuceneTestCase {
iwc.setCodec(codec);
Directory dir;
if (values.length > 100000) {
dir = newFSDirectory(createTempDir("TestRangeTree"));
dir = noVirusChecker(newFSDirectory(createTempDir("TestRangeTree")));
} else {
dir = getDirectory();
}
@ -768,11 +768,14 @@ public class TestRangeTree extends LuceneTestCase {
return new RangeTreeDocValuesFormat(maxPointsInLeaf, maxPointsSortInHeap);
}
private static Directory getDirectory() {
Directory dir = newDirectory();
private static Directory noVirusChecker(Directory dir) {
if (dir instanceof MockDirectoryWrapper) {
((MockDirectoryWrapper) dir).setEnableVirusScanner(false);
}
return dir;
}
private static Directory getDirectory() {
return noVirusChecker(newDirectory());
}
}

View File

@ -923,7 +923,7 @@ public class TestGeo3DPointField extends LuceneTestCase {
iwc.setCodec(codec);
Directory dir;
if (lats.length > 100000) {
dir = newFSDirectory(createTempDir("TestBKDTree"));
dir = noVirusChecker(newFSDirectory(createTempDir("TestBKDTree")));
} else {
dir = getDirectory();
}
@ -1061,11 +1061,14 @@ public class TestGeo3DPointField extends LuceneTestCase {
IOUtils.close(r, dir);
}
private static Directory getDirectory() {
Directory dir = newDirectory();
private static Directory noVirusChecker(Directory dir) {
if (dir instanceof MockDirectoryWrapper) {
((MockDirectoryWrapper) dir).setEnableVirusScanner(false);
}
return dir;
}
private static Directory getDirectory() {
return noVirusChecker(newDirectory());
}
}