From d1defef69d245daf8a139c2498cce1dde5b75b9c Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Tue, 12 May 2015 00:53:51 -0400 Subject: [PATCH] Properly handle the case where symlinks are supported, but the user is not a windows administrator (can throw IOE in this case) --- src/test/java/org/elasticsearch/bootstrap/SecurityTests.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/elasticsearch/bootstrap/SecurityTests.java b/src/test/java/org/elasticsearch/bootstrap/SecurityTests.java index 1bf833ac25c..a0b2f420330 100644 --- a/src/test/java/org/elasticsearch/bootstrap/SecurityTests.java +++ b/src/test/java/org/elasticsearch/bootstrap/SecurityTests.java @@ -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 {