Properly handle the case where symlinks are supported, but
the user is not a windows administrator (can throw IOE in this case)
This commit is contained in:
parent
019a9410a3
commit
d1defef69d
|
@ -154,7 +154,7 @@ public class SecurityTests extends ElasticsearchTestCase {
|
|||
Path linkExists = p.resolve("linkExists");
|
||||
try {
|
||||
Files.createSymbolicLink(linkExists, exists);
|
||||
} catch (UnsupportedOperationException e) {
|
||||
} catch (UnsupportedOperationException | IOException e) {
|
||||
assumeNoException("test requires filesystem that supports symbolic links", e);
|
||||
}
|
||||
Security.ensureDirectoryExists(linkExists);
|
||||
|
@ -168,7 +168,7 @@ public class SecurityTests extends ElasticsearchTestCase {
|
|||
Path brokenLink = p.resolve("brokenLink");
|
||||
try {
|
||||
Files.createSymbolicLink(brokenLink, p.resolve("nonexistent"));
|
||||
} catch (UnsupportedOperationException e) {
|
||||
} catch (UnsupportedOperationException | IOException e) {
|
||||
assumeNoException("test requires filesystem that supports symbolic links", e);
|
||||
}
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue