Repository: nifi
Updated Branches:
  refs/heads/master 78fed3ed5 -> 913ae9161


Added posix guard to ignore tests on windows

This closes #1259

Signed-off-by: jpercivall <jperciv...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/913ae916
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/913ae916
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/913ae916

Branch: refs/heads/master
Commit: 913ae91614b25dfd3fd668c475acd712d00de5a2
Parents: 78fed3e
Author: Oleg Zhurakousky <o...@suitcase.io>
Authored: Tue Nov 22 16:31:52 2016 -0500
Committer: jpercivall <jperciv...@apache.org>
Committed: Tue Nov 22 17:11:25 2016 -0500

----------------------------------------------------------------------
 .../apache/nifi/processors/standard/TestGetFile.java  | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/913ae916/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestGetFile.java
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestGetFile.java
 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestGetFile.java
index daf807a..baa8919 100644
--- 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestGetFile.java
+++ 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestGetFile.java
@@ -22,6 +22,7 @@ import static org.junit.Assert.fail;
 
 import java.io.File;
 import java.io.IOException;
+import java.nio.file.FileSystems;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.attribute.PosixFilePermission;
@@ -34,6 +35,7 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Locale;
 import java.util.Set;
+
 import org.apache.nifi.flowfile.attributes.CoreAttributes;
 import org.apache.nifi.util.MockFlowFile;
 import org.apache.nifi.util.TestRunner;
@@ -44,6 +46,10 @@ public class TestGetFile {
 
     @Test
     public void testWithInaccessibleDir() throws IOException {
+        // Some systems don't support POSIX (Windows) and will fail if run. 
Should ignore the test in that event
+        if 
(!FileSystems.getDefault().supportedFileAttributeViews().contains("posix")) {
+            return;
+        }
         File inaccessibleDir = new File("target/inaccessible");
         inaccessibleDir.deleteOnExit();
         inaccessibleDir.mkdir();
@@ -62,6 +68,10 @@ public class TestGetFile {
 
     @Test
     public void testWithUnreadableDir() throws IOException {
+        // Some systems don't support POSIX (Windows) and will fail if run. 
Should ignore the test in that event
+        if 
(!FileSystems.getDefault().supportedFileAttributeViews().contains("posix")) {
+            return;
+        }
         File unreadableDir = new File("target/unreadable");
         unreadableDir.deleteOnExit();
         unreadableDir.mkdir();
@@ -86,6 +96,10 @@ public class TestGetFile {
 
     @Test
     public void testWithUnwritableDir() throws IOException {
+        // Some systems don't support POSIX (Windows) and will fail if run. 
Should ignore the test in that event
+        if 
(!FileSystems.getDefault().supportedFileAttributeViews().contains("posix")) {
+            return;
+        }
         File unwritableDir = new File("target/unwritable");
         unwritableDir.deleteOnExit();
         unwritableDir.mkdir();

Reply via email to