[
https://issues.apache.org/jira/browse/LUCENE-5154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dawid Weiss reassigned LUCENE-5154:
-----------------------------------
Assignee: Dawid Weiss
> 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
> Assignee: Dawid Weiss
> 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 was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]