lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <>
Subject [jira] Commented: (LUCENE-2598) allow tests to use different Directory impls
Date Tue, 24 Aug 2010 22:40:17 GMT


Robert Muir commented on LUCENE-2598:

Hoss, I honestly think what you describe is too complex. we need to keep the tests simple.

bq. There are simplifications that can be made - eliminating the marker interfaces and just
having the tests pick concrete classes for example - but ultimately a decision still has to
be made about what to do if "" conflicts with the impl the actual test says
it can/can't work with.

Dude not all tests respect as-is: they dont all use newDirectory(), some instantiate
RAMDirectories themselves still. I only converted the ones that would be easy (and some i
should have left alone, so i hardwired them back to ramdir)

honestly i think if i hardwire TestIndexWriter.testThreadInterruptDeadlock to RAMDirectory,
then all tests will pass with NIOFS and MMAP too, and we can randomly choose whichever we

and we are no worse off than before, last week all these tests ran with RAMDirectory no matter
what. the crazy picky ones can stay that way.

> allow tests to use different Directory impls
> --------------------------------------------
>                 Key: LUCENE-2598
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Test
>          Components: Build
>    Affects Versions: 3.1, 4.0
>            Reporter: Robert Muir
>            Assignee: Robert Muir
>             Fix For: 3.1, 4.0
>         Attachments: LUCENE-2598.patch, LUCENE-2598.patch, LUCENE-2598.patch, LUCENE-2598.patch,
LUCENE-2598.patch, LUCENE-2598.patch, LUCENE-2598.patch
> Now that all tests use MockRAMDirectory instead of RAMDirectory, they are all picky like
windows and force our tests to
> close readers etc before closing the directory.
> I think we should do the following:
> # change new MockRAMDIrectory() in tests to .newDirectory(random)
> # LuceneTestCase[J4] tracks if all dirs are closed at tearDown and also cleans up temp
dirs like solr.
> # factor out the Mockish stuff from MockRAMDirectory into MockDirectoryWrapper
> # allow a -Dtests.directoryImpl or simpler to specify the default Directory to use for
tests: default being "random"
> i think theres a chance we might find some bugs that havent yet surfaced because they
are easier to trigger with FSDir
> Furthermore, this would be beneficial to Directory-implementors as they could run the
entire testsuite against their Directory impl, just like codec-implementors can do now.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

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

View raw message