lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dawid Weiss (JIRA)" <>
Subject [jira] [Commented] (LUCENE-4047) Cleanup of LuceneTestCase
Date Mon, 14 May 2012 15:27:54 GMT


Dawid Weiss commented on LUCENE-4047:

bq. The DirectoryCloseable won't work: MockDirectoryWrapper checks for index corruption on
we cannot just silently ignore Throwable from here

This only happens if the directory is not closed -- it should always be closed so appropriate
exception would be thrown at that time. I assume the "unclosed directory" exception indicates
more serious flaw in the test and this should be fixed first?

We can change it to propagate both unclosed and any potential other exception but this will
only increase the amount of logs to be reviewed.

Also note that prior to this patch directories were not closed at all if anything failed --
      if (!testsFailed) {

I think this is already better in that resources are always closed, regardless of any previous

> Cleanup of LuceneTestCase
> -------------------------
>                 Key: LUCENE-4047
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Sub-task
>          Components: general/build, general/test
>            Reporter: Dawid Weiss
>            Assignee: Dawid Weiss
>            Priority: Minor
>             Fix For: 4.0
>         Attachments: LUCENE-4047.patch
> functionally split large blocks of code that do logically different things, organize
and order them into rules. Use RandomizedRunner facilities for ensuring scope resources (Directory,
temporary folders) are properly disposed of. Use RandomizedRunner facilities for reporting
reproduce message.
> I have a working branch for this at github. Polishing off the rough edges.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message