lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <>
Subject [jira] Commented: (LUCENE-2349) Tests should use unique temporary directories
Date Fri, 26 Mar 2010 15:14:27 GMT


Robert Muir commented on LUCENE-2349:

Uwe had the idea to just change the and tempDir sysprops to 
include the unique pattern when doing parallel tests.

This way we just "fix" the problem in ant and do not have to change any tests, seems to work

I will include this in the patch to LUCENE-1709 and resolve this issue when that one is resolved.

> Tests should use unique temporary directories
> ---------------------------------------------
>                 Key: LUCENE-2349
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Test
>          Components: Build
>    Affects Versions: 3.1
>            Reporter: Robert Muir
> We cannot safely use parallel tests (LUCENE-1709) because some test classes try to use
temporary directories with the same name.
> So if these two happen to run at the same time, they conflict.
> For example TestIndexReader has code like this:
> {code}
> File dirFile = new File(TEMP_DIR, "testIndex");
> {code}
> But TestCompoundFile has similar code:
> {code}
> File file = new File(TEMP_DIR, "testIndex");
> {code}
> If both these classes run at the same time, there will be problems.
> If we want to use parallel tests safely, we have to fix this use of the static TEMP_DIR
which does not include any unique name of the test.
> Ideally we can do this without changing a lot of test code, especially backwards.

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