[jira] [Created] (LUCENE-3900) Make BaseTokenStreamTestCase.checkRandomData more debuggable

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (LUCENE-3900) Make BaseTokenStreamTestCase.checkRandomData more debuggable

JIRA jira@apache.org
Make BaseTokenStreamTestCase.checkRandomData more debuggable
------------------------------------------------------------

                 Key: LUCENE-3900
                 URL: https://issues.apache.org/jira/browse/LUCENE-3900
             Project: Lucene - Java
          Issue Type: Task
            Reporter: Robert Muir


This thing has gotten meaner recently, but if it fails, it can be tough to debug.

I feel like usually we just look at whatever analyzer failed, and completely review the code
and look for any smells until it passes :)

So I think instead we can possibly make this easier if this does something like:
{code}
try {
 ...checks...
} catch (Throwable t) {
  BaseTokenException e = new BaseTokenException(randomInputUsed, randomParamter1, randomParameter2);
  e.setInitCause(t);
  throw e;
}
{code}

Then you could have a useful exception with the input string that caused the fail,
information about whether or not charfilter/mockreaderwrapper/whatever were used, etc,
as well as the initial problem as root cause.




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (LUCENE-3900) Make BaseTokenStreamTestCase.checkRandomData more debuggable

JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/LUCENE-3900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13234446#comment-13234446 ]

Michael McCandless commented on LUCENE-3900:
--------------------------------------------

+1!
               

> Make BaseTokenStreamTestCase.checkRandomData more debuggable
> ------------------------------------------------------------
>
>                 Key: LUCENE-3900
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3900
>             Project: Lucene - Java
>          Issue Type: Task
>            Reporter: Robert Muir
>
> This thing has gotten meaner recently, but if it fails, it can be tough to debug.
> I feel like usually we just look at whatever analyzer failed, and completely review the code
> and look for any smells until it passes :)
> So I think instead we can possibly make this easier if this does something like:
> {code}
> try {
>  ...checks...
> } catch (Throwable t) {
>   BaseTokenException e = new BaseTokenException(randomInputUsed, randomParamter1, randomParameter2);
>   e.setInitCause(t);
>   throw e;
> }
> {code}
> Then you could have a useful exception with the input string that caused the fail,
> information about whether or not charfilter/mockreaderwrapper/whatever were used, etc,
> as well as the initial problem as root cause.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]