You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2012/10/05 15:38:03 UTC

[jira] [Created] (LUCENE-4460) Test exception handling better/easier than testThreadInterruptDeadlock()

Robert Muir created LUCENE-4460:
-----------------------------------

             Summary: Test exception handling better/easier than testThreadInterruptDeadlock()
                 Key: LUCENE-4460
                 URL: https://issues.apache.org/jira/browse/LUCENE-4460
             Project: Lucene - Core
          Issue Type: Bug
          Components: general/test
            Reporter: Robert Muir


currently the fact that MockDirectoryWrapper has throttlers and such that sleep, combined with the fact this test interrupts, makes a good test for exception handling.

The problem is this is really crappy to debug: things dont reproduce, you have to use hundreds or thousands of iterations, etc etc.

I think it would be better if we made it possible for MockIndexInput to throw random exceptions like MockIndexOutput and had a single threaded test that just threw random exceptions? This way it would reproduce...


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
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-4460) Test exception handling better/easier than testThreadInterruptDeadlock()

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

Michael McCandless commented on LUCENE-4460:
--------------------------------------------

+1
                
> Test exception handling better/easier than testThreadInterruptDeadlock()
> ------------------------------------------------------------------------
>
>                 Key: LUCENE-4460
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4460
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: general/test
>            Reporter: Robert Muir
>
> currently the fact that MockDirectoryWrapper has throttlers and such that sleep, combined with the fact this test interrupts, makes a good test for exception handling.
> The problem is this is really crappy to debug: things dont reproduce, you have to use hundreds or thousands of iterations, etc etc.
> I think it would be better if we made it possible for MockIndexInput to throw random exceptions like MockIndexOutput and had a single threaded test that just threw random exceptions? This way it would reproduce...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
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