Don't use a SimpleFSLockFactory for RAMDirectoryFactory in Solr (fails tests in trunk)

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1624924 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2014-09-14 23:26:17 +00:00
parent b23b1037a6
commit 3bb1cfb449
2 changed files with 5 additions and 5 deletions

View File

@ -187,10 +187,10 @@ public class CachingDirectoryFactoryTest extends SolrTestCaseJ4 {
if (tracker == null) {
tracker = new Tracker();
tracker.path = path;
tracker.dir = df.get(path, DirContext.DEFAULT, null);
tracker.dir = df.get(path, DirContext.DEFAULT, "single");
dirs.put(path, tracker);
} else {
tracker.dir = df.get(path, DirContext.DEFAULT, null);
tracker.dir = df.get(path, DirContext.DEFAULT, "single");
}
tracker.refCnt.incrementAndGet();
}

View File

@ -43,8 +43,8 @@ public class RAMDirectoryFactoryTest extends LuceneTestCase {
}
};
String path = "/fake/path";
Directory dir1 = factory.get(path, DirContext.DEFAULT, null);
Directory dir2 = factory.get(path, DirContext.DEFAULT, null);
Directory dir1 = factory.get(path, DirContext.DEFAULT, "single");
Directory dir2 = factory.get(path, DirContext.DEFAULT, "single");
assertEquals("RAMDirectoryFactory should not create new instance of RefCntRamDirectory " +
"every time open() is called for the same path", dir1, dir2);
@ -54,7 +54,7 @@ public class RAMDirectoryFactoryTest extends LuceneTestCase {
private void dotestOpenSucceedForEmptyDir() throws IOException {
RAMDirectoryFactory factory = new RAMDirectoryFactory();
Directory dir = factory.get("/fake/path", DirContext.DEFAULT, null);
Directory dir = factory.get("/fake/path", DirContext.DEFAULT, "single");
assertNotNull("RAMDirectoryFactory should create RefCntRamDirectory even if the path doen't lead " +
"to index directory on the file system", dir);
factory.release(dir);