|
@@ -43,8 +43,8 @@ public class SecurityTests extends ElasticsearchTestCase {
|
|
|
String realTmpDir = System.getProperty("java.io.tmpdir");
|
|
|
Permissions permissions;
|
|
|
try {
|
|
|
- Environment environment = new Environment(settings);
|
|
|
System.setProperty("java.io.tmpdir", fakeTmpDir.toString());
|
|
|
+ Environment environment = new Environment(settings);
|
|
|
permissions = Security.createPermissions(environment);
|
|
|
} finally {
|
|
|
System.setProperty("java.io.tmpdir", realTmpDir);
|
|
@@ -76,9 +76,10 @@ public class SecurityTests extends ElasticsearchTestCase {
|
|
|
Path fakeTmpDir = createTempDir();
|
|
|
String realTmpDir = System.getProperty("java.io.tmpdir");
|
|
|
Permissions permissions;
|
|
|
+ Environment environment;
|
|
|
try {
|
|
|
- Environment environment = new Environment(settings);
|
|
|
System.setProperty("java.io.tmpdir", fakeTmpDir.toString());
|
|
|
+ environment = new Environment(settings);
|
|
|
permissions = Security.createPermissions(environment);
|
|
|
} finally {
|
|
|
System.setProperty("java.io.tmpdir", realTmpDir);
|