Skip to content

Apache Lucene open-source search software

call rmDir() up front to prevent confusing false-positive failures from backwards compatibility unit test

Michael McCandless46489120892d
diff --git a/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java b/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
index f8c01680672..997be3d27e0 100644
--- a/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
+++ b/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
@@ -257,6 +257,8 @@ public class TestBackwardsCompatibility extends TestCase
public void createIndex(String dirName, boolean doCFS) throws IOException {
+ rmDir(dirName);
+
dirName = fullDir(dirName);
Directory dir = FSDirectory.getDirectory(dirName);
@@ -287,6 +289,7 @@ public class TestBackwardsCompatibility extends TestCase
for(int pass=0;pass<2;pass++) {
String outputDir = "lucene.backwardscompat0.index";
+ rmDir(outputDir);
try {
Directory dir = FSDirectory.getDirectory(fullDir(outputDir));