You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2013/07/31 05:33:49 UTC

[jira] [Updated] (LUCENE-5154) ban tests from writing to CWD

     [ https://issues.apache.org/jira/browse/LUCENE-5154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Muir updated LUCENE-5154:
--------------------------------

    Attachment: LUCENE-5154.patch

Attached patch. I fixed 2 tests. lucene/ tests are passing. solr/ still needs work.
                
> ban tests from writing to CWD
> -----------------------------
>
>                 Key: LUCENE-5154
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5154
>             Project: Lucene - Core
>          Issue Type: Test
>            Reporter: Robert Muir
>         Attachments: LUCENE-5154.patch
>
>
> Currently each forked jvm has cwd = tempDir = .
> This provides some minimal protection against tests in different jvms from interfering with each other, but we can do much better by splitting these concerns: and setting cwd = . and tempDir = ./temp
> Tests that write files to CWD can confuse IDE users because they can create dirty checkouts or other issues between different runs, and of course can interfere with other tests in the *same* jvm (there are other possible ways to do this to).
> So a test like this should fail with SecurityException, but currently does not.
> {code}
> public void testBogus() throws Exception {
>   File file = new File("foo.txt");
>   FileOutputStream os = new FileOutputStream(file);
>   os.write(1);
>   os.close();
> }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org