Skip to content

Apache Lucene open-source search software

Fixed to not create files in home directory.

Doug Cutting0d9b89865c89
diff --git a/src/test/org/apache/lucene/search/TestMultiSearcher.java b/src/test/org/apache/lucene/search/TestMultiSearcher.java
index 058fd4ff70f..47e77f87a8a 100644
--- a/src/test/org/apache/lucene/search/TestMultiSearcher.java
+++ b/src/test/org/apache/lucene/search/TestMultiSearcher.java
@@ -62,11 +62,11 @@ import org.apache.lucene.index.IndexWriter;
import org.apache.lucene.index.Term;
import org.apache.lucene.queryParser.QueryParser;
import org.apache.lucene.search.Searcher;
-import org.apache.lucene.store.FSDirectory;
+import org.apache.lucene.store.Directory;
+import org.apache.lucene.store.RAMDirectory;
import junit.framework.TestCase;
-import java.io.File;
import java.io.IOException;
/**
@@ -84,13 +84,9 @@ public class TestMultiSearcher extends TestCase
public void testEmptyIndex()
throws Exception
{
- // creating file's for the FSDirectories
- File a = new File(System.getProperty("user.home"), "indexStoreA");
- File b = new File(System.getProperty("user.home"), "indexStoreB");
-
// creating two directories for indices
- FSDirectory indexStoreA = FSDirectory.getDirectory(a, true);
- FSDirectory indexStoreB = FSDirectory.getDirectory(b, true);
+ Directory indexStoreA = new RAMDirectory();
+ Directory indexStoreB = new RAMDirectory();
// creating a document to store
Document lDoc = new Document();