You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2021/09/27 19:59:26 UTC

[commons-io] branch master updated: This test passes on Windows 10, macOS 11.6, but not Ubuntu within Windows.

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-io.git


The following commit(s) were added to refs/heads/master by this push:
     new 4677906  This test passes on Windows 10, macOS 11.6, but not Ubuntu within Windows.
4677906 is described below

commit 46779065d258bc6429d330843267f1ca3d0ce99d
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Sep 27 15:59:24 2021 -0400

    This test passes on Windows 10, macOS 11.6, but not Ubuntu within
    Windows.
---
 src/test/java/org/apache/commons/io/file/PathUtilsTest.java | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/test/java/org/apache/commons/io/file/PathUtilsTest.java b/src/test/java/org/apache/commons/io/file/PathUtilsTest.java
index ea54292..a56736b 100644
--- a/src/test/java/org/apache/commons/io/file/PathUtilsTest.java
+++ b/src/test/java/org/apache/commons/io/file/PathUtilsTest.java
@@ -21,9 +21,8 @@ import static org.junit.jupiter.api.Assertions.assertArrayEquals;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.junit.jupiter.api.Assumptions.assumeTrue;
+import static org.junit.jupiter.api.Assumptions.assumeFalse;
 
-import java.io.File;
 import java.io.IOException;
 import java.io.OutputStream;
 import java.net.URI;
@@ -46,6 +45,7 @@ import org.apache.commons.io.filefilter.NameFileFilter;
 import org.apache.commons.io.test.TestUtils;
 import org.apache.commons.lang3.ArrayUtils;
 import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.SystemUtils;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.io.TempDir;
 
@@ -257,8 +257,7 @@ public class PathUtilsTest extends TestArguments {
         final Path resolved = tempDir.resolve("testSetReadOnlyFile.txt");
 
         // TEMP HACK
-        assumeTrue(Files.getFileAttributeView(resolved, DosFileAttributeView.class) != null);
-        assumeTrue(Files.getFileAttributeView(resolved, PosixFileAttributeView.class) == null);
+        assumeFalse(SystemUtils.IS_OS_LINUX);
 
         PathUtils.writeString(resolved, "test", StandardCharsets.UTF_8);
         final boolean readable = Files.isReadable(resolved);