You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Simon Willnauer (JIRA)" <ji...@apache.org> on 2011/04/30 22:51:03 UTC

[jira] [Created] (LUCENE-3057) LuceneTestCase#newFSDirectoryImpl misses to set LockFactory if ctor call throws exception

LuceneTestCase#newFSDirectoryImpl misses to set LockFactory if ctor call throws exception
-----------------------------------------------------------------------------------------

                 Key: LUCENE-3057
                 URL: https://issues.apache.org/jira/browse/LUCENE-3057
             Project: Lucene - Java
          Issue Type: Bug
          Components: Tests
    Affects Versions: 4.0
            Reporter: Simon Willnauer
            Priority: Minor
             Fix For: 4.0


selckin reported on IRC that if you run ant test -Dtestcase=TestLockFactory -Dtestmethod=testNativeFSLockFactoryPrefix -Dtests.directory=FSDirectory the test fails. Since FSDirectory is an abstract class it can not be instantiated so our code falls back to FSDirector.open. yet we miss to set the given lockFactory though.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (LUCENE-3057) LuceneTestCase#newFSDirectoryImpl misses to set LockFactory if ctor call throws exception

Posted by "Simon Willnauer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-3057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13027570#comment-13027570 ] 

Simon Willnauer commented on LUCENE-3057:
-----------------------------------------

bq. Hi Simon, I think you meant to set the lockfactory in the finally block?
thanks robert for catching this I removed the return statement in revision 1098375.

Backported to 3.x in revision 1098505

> LuceneTestCase#newFSDirectoryImpl misses to set LockFactory if ctor call throws exception
> -----------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3057
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3057
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 4.0
>            Reporter: Simon Willnauer
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: LUCENE-3057.patch, LUCENE-3057_bug.patch
>
>
> selckin reported on IRC that if you run ant test -Dtestcase=TestLockFactory -Dtestmethod=testNativeFSLockFactoryPrefix -Dtests.directory=FSDirectory the test fails. Since FSDirectory is an abstract class it can not be instantiated so our code falls back to FSDirector.open. yet we miss to set the given lockFactory though.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (LUCENE-3057) LuceneTestCase#newFSDirectoryImpl misses to set LockFactory if ctor call throws exception

Posted by "Simon Willnauer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-3057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13027471#comment-13027471 ] 

Simon Willnauer commented on LUCENE-3057:
-----------------------------------------

bq. should we backport to 3.x too?!
oh right this stuff is in 3.x too - I will backport tomorrow!

> LuceneTestCase#newFSDirectoryImpl misses to set LockFactory if ctor call throws exception
> -----------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3057
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3057
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 4.0
>            Reporter: Simon Willnauer
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: LUCENE-3057.patch
>
>
> selckin reported on IRC that if you run ant test -Dtestcase=TestLockFactory -Dtestmethod=testNativeFSLockFactoryPrefix -Dtests.directory=FSDirectory the test fails. Since FSDirectory is an abstract class it can not be instantiated so our code falls back to FSDirector.open. yet we miss to set the given lockFactory though.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (LUCENE-3057) LuceneTestCase#newFSDirectoryImpl misses to set LockFactory if ctor call throws exception

Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-3057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13027470#comment-13027470 ] 

Robert Muir commented on LUCENE-3057:
-------------------------------------

should we backport to 3.x too?!

> LuceneTestCase#newFSDirectoryImpl misses to set LockFactory if ctor call throws exception
> -----------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3057
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3057
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 4.0
>            Reporter: Simon Willnauer
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: LUCENE-3057.patch
>
>
> selckin reported on IRC that if you run ant test -Dtestcase=TestLockFactory -Dtestmethod=testNativeFSLockFactoryPrefix -Dtests.directory=FSDirectory the test fails. Since FSDirectory is an abstract class it can not be instantiated so our code falls back to FSDirector.open. yet we miss to set the given lockFactory though.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (LUCENE-3057) LuceneTestCase#newFSDirectoryImpl misses to set LockFactory if ctor call throws exception

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-3057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13027448#comment-13027448 ] 

Michael McCandless commented on LUCENE-3057:
--------------------------------------------

Patch looks great Simon; thanks for catching this selckin!  Maybe you can rip out the random number generator in your machine and donate it to Apache!!!

> LuceneTestCase#newFSDirectoryImpl misses to set LockFactory if ctor call throws exception
> -----------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3057
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3057
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 4.0
>            Reporter: Simon Willnauer
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: LUCENE-3057.patch
>
>
> selckin reported on IRC that if you run ant test -Dtestcase=TestLockFactory -Dtestmethod=testNativeFSLockFactoryPrefix -Dtests.directory=FSDirectory the test fails. Since FSDirectory is an abstract class it can not be instantiated so our code falls back to FSDirector.open. yet we miss to set the given lockFactory though.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Updated] (LUCENE-3057) LuceneTestCase#newFSDirectoryImpl misses to set LockFactory if ctor call throws exception

Posted by "Simon Willnauer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-3057?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Willnauer updated LUCENE-3057:
------------------------------------

    Attachment: LUCENE-3057.patch

here is a patch

> LuceneTestCase#newFSDirectoryImpl misses to set LockFactory if ctor call throws exception
> -----------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3057
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3057
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 4.0
>            Reporter: Simon Willnauer
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: LUCENE-3057.patch
>
>
> selckin reported on IRC that if you run ant test -Dtestcase=TestLockFactory -Dtestmethod=testNativeFSLockFactoryPrefix -Dtests.directory=FSDirectory the test fails. Since FSDirectory is an abstract class it can not be instantiated so our code falls back to FSDirector.open. yet we miss to set the given lockFactory though.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Updated] (LUCENE-3057) LuceneTestCase#newFSDirectoryImpl misses to set LockFactory if ctor call throws exception

Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-3057?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Muir updated LUCENE-3057:
--------------------------------

    Attachment: LUCENE-3057_bug.patch

Hi Simon, I think you meant to set the lockfactory in the finally block?

currently, if there is no exception instantiated the requested directory impl via the ctor (e.g. NIOFSDirectory), then the lockfactory parameter is never set.

> LuceneTestCase#newFSDirectoryImpl misses to set LockFactory if ctor call throws exception
> -----------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3057
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3057
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 4.0
>            Reporter: Simon Willnauer
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: LUCENE-3057.patch, LUCENE-3057_bug.patch
>
>
> selckin reported on IRC that if you run ant test -Dtestcase=TestLockFactory -Dtestmethod=testNativeFSLockFactoryPrefix -Dtests.directory=FSDirectory the test fails. Since FSDirectory is an abstract class it can not be instantiated so our code falls back to FSDirector.open. yet we miss to set the given lockFactory though.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (LUCENE-3057) LuceneTestCase#newFSDirectoryImpl misses to set LockFactory if ctor call throws exception

Posted by "Simon Willnauer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-3057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13027469#comment-13027469 ] 

Simon Willnauer commented on LUCENE-3057:
-----------------------------------------

bq. Maybe you can rip out the random number generator in your machine and donate it to Apache!!!

+1 :) thanks for running tests that is of great value!

> LuceneTestCase#newFSDirectoryImpl misses to set LockFactory if ctor call throws exception
> -----------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3057
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3057
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 4.0
>            Reporter: Simon Willnauer
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: LUCENE-3057.patch
>
>
> selckin reported on IRC that if you run ant test -Dtestcase=TestLockFactory -Dtestmethod=testNativeFSLockFactoryPrefix -Dtests.directory=FSDirectory the test fails. Since FSDirectory is an abstract class it can not be instantiated so our code falls back to FSDirector.open. yet we miss to set the given lockFactory though.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Resolved] (LUCENE-3057) LuceneTestCase#newFSDirectoryImpl misses to set LockFactory if ctor call throws exception

Posted by "Simon Willnauer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-3057?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Willnauer resolved LUCENE-3057.
-------------------------------------

    Resolution: Fixed

Committed revision 1098367.

> LuceneTestCase#newFSDirectoryImpl misses to set LockFactory if ctor call throws exception
> -----------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3057
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3057
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 4.0
>            Reporter: Simon Willnauer
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: LUCENE-3057.patch
>
>
> selckin reported on IRC that if you run ant test -Dtestcase=TestLockFactory -Dtestmethod=testNativeFSLockFactoryPrefix -Dtests.directory=FSDirectory the test fails. Since FSDirectory is an abstract class it can not be instantiated so our code falls back to FSDirector.open. yet we miss to set the given lockFactory though.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org