mirror of https://github.com/apache/lucene.git
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:
parent
b23b1037a6
commit
3bb1cfb449
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue