You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2014/08/30 10:54:06 UTC
svn commit: r1621433 - in /lucene/dev/branches/branch_4x: ./ lucene/
lucene/test-framework/
lucene/test-framework/src/java/org/apache/lucene/index/BaseIndexFileFormatTestCase.java
Author: mikemccand
Date: Sat Aug 30 08:54:06 2014
New Revision: 1621433
URL: http://svn.apache.org/r1621433
Log:
don't let virus checker run when testing merge stability
Modified:
lucene/dev/branches/branch_4x/ (props changed)
lucene/dev/branches/branch_4x/lucene/ (props changed)
lucene/dev/branches/branch_4x/lucene/test-framework/ (props changed)
lucene/dev/branches/branch_4x/lucene/test-framework/src/java/org/apache/lucene/index/BaseIndexFileFormatTestCase.java
Modified: lucene/dev/branches/branch_4x/lucene/test-framework/src/java/org/apache/lucene/index/BaseIndexFileFormatTestCase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/test-framework/src/java/org/apache/lucene/index/BaseIndexFileFormatTestCase.java?rev=1621433&r1=1621432&r2=1621433&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/test-framework/src/java/org/apache/lucene/index/BaseIndexFileFormatTestCase.java (original)
+++ lucene/dev/branches/branch_4x/lucene/test-framework/src/java/org/apache/lucene/index/BaseIndexFileFormatTestCase.java Sat Aug 30 08:54:06 2014
@@ -36,6 +36,7 @@ import org.apache.lucene.codecs.sep.IntI
import org.apache.lucene.document.Document;
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.IndexInput;
+import org.apache.lucene.store.MockDirectoryWrapper;
import org.apache.lucene.util.CloseableThreadLocal;
import org.apache.lucene.util.DoubleBarrelLRUCache;
import org.apache.lucene.util.InfoStream;
@@ -89,7 +90,7 @@ abstract class BaseIndexFileFormatTestCa
this.root = root;
}
- public long accumulateObject(Object o, long shallowSize, java.util.Map<Field, Object> fieldValues, java.util.Collection<Object> queue) {
+ public long accumulateObject(Object o, long shallowSize, Map<Field, Object> fieldValues, Collection<Object> queue) {
for (Class<?> clazz = o.getClass(); clazz != null; clazz = clazz.getSuperclass()) {
if (EXCLUDED_CLASSES.contains(clazz) && o != root) {
return 0;
@@ -173,6 +174,11 @@ abstract class BaseIndexFileFormatTestCa
/** The purpose of this test is to make sure that bulk merge doesn't accumulate useless data over runs. */
public void testMergeStability() throws Exception {
Directory dir = newDirectory();
+ if (dir instanceof MockDirectoryWrapper) {
+ // Else, the virus checker may prevent deletion of files and cause
+ // us to see too many bytes used by extension in the end:
+ ((MockDirectoryWrapper) dir).setEnableVirusScanner(false);
+ }
// do not use newMergePolicy that might return a MockMergePolicy that ignores the no-CFS ratio
// do not use RIW which will change things up!
MergePolicy mp = newTieredMergePolicy();
@@ -191,6 +197,11 @@ abstract class BaseIndexFileFormatTestCa
IndexReader reader = DirectoryReader.open(dir);
Directory dir2 = newDirectory();
+ if (dir2 instanceof MockDirectoryWrapper) {
+ // Else, the virus checker may prevent deletion of files and cause
+ // us to see too many bytes used by extension in the end:
+ ((MockDirectoryWrapper) dir2).setEnableVirusScanner(false);
+ }
mp = newTieredMergePolicy();
mp.setNoCFSRatio(0);
cfg = new IndexWriterConfig(Version.LATEST, new MockAnalyzer(random())).setUseCompoundFile(false).setMergePolicy(mp);