mirror of https://github.com/apache/lucene.git
LUCENE-1905: fix bug when instantiating SimpleFSLockFacory with a String and add test
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@813154 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
11d65e5cb0
commit
5bb97b264e
|
@ -77,8 +77,7 @@ public class SimpleFSLockFactory extends FSLockFactory {
|
|||
* @param lockDirName where lock files should be created.
|
||||
*/
|
||||
public SimpleFSLockFactory(String lockDirName) throws IOException {
|
||||
lockDir = new File(lockDirName);
|
||||
setLockDir(lockDir);
|
||||
setLockDir(new File(lockDirName));
|
||||
}
|
||||
|
||||
public Lock makeLock(String lockName) {
|
||||
|
|
|
@ -259,6 +259,11 @@ public class TestLockFactory extends LuceneTestCase {
|
|||
// Cleanup
|
||||
_TestUtil.rmDir(indexDirName);
|
||||
}
|
||||
|
||||
public void testSimpleFSLockFactory() throws IOException {
|
||||
// test string file instantiation
|
||||
new SimpleFSLockFactory("test");
|
||||
}
|
||||
|
||||
// Verify: setDisableLocks works
|
||||
public void testDisableLocks() throws IOException {
|
||||
|
|
Loading…
Reference in New Issue