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

Michael McCandless commented on LUCENE-2349:
--------------------------------------------

{quote}
Uwe had the idea to just change the java.io.tempdir and tempDir sysprops to 
include the unique pattern when doing parallel tests.
{quote}
This sounds good!

We won't create this "temp tempDir" up-front right? Ie the test (if it uses 
temp dir) is responsible for making this parent dir, and then the actual temp 
dir it's trying to use, within that parent dir, right?  We may have to fix some 
tests... (if they assume the parent tempDir already exists).

> Tests should use unique temporary directories
> ---------------------------------------------
>
>                 Key: LUCENE-2349
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2349
>             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: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to