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

slachiewicz pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/maven-remote-resources-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new 68b965f  Return instead of Assume in JUnit 3 path tests
68b965f is described below

commit 68b965f9b07c21c3595f8e44ce93beb5a312bc7f
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Wed Oct 28 13:13:37 2026 +0000

    Return instead of Assume in JUnit 3 path tests
    
    RemoteResourcesMojoTest is a JUnit 3 TestCase, which reports an
    AssumptionViolatedException as an error, so Windows runs failed where POSIX
    permissions are unsupported. Use Assume again once #313 moves it to JUnit 5.
---
 .../plugin/resources/remote/RemoteResourcesMojoTest.java   | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git 
a/src/test/java/org/apache/maven/plugin/resources/remote/RemoteResourcesMojoTest.java
 
b/src/test/java/org/apache/maven/plugin/resources/remote/RemoteResourcesMojoTest.java
index ee3f292..0c4d7ba 100644
--- 
a/src/test/java/org/apache/maven/plugin/resources/remote/RemoteResourcesMojoTest.java
+++ 
b/src/test/java/org/apache/maven/plugin/resources/remote/RemoteResourcesMojoTest.java
@@ -56,7 +56,6 @@ import org.codehaus.plexus.util.IOUtil;
 import org.eclipse.aether.DefaultRepositorySystemSession;
 import org.eclipse.aether.internal.impl.SimpleLocalRepositoryManagerFactory;
 import org.eclipse.aether.repository.LocalRepository;
-import org.junit.Assume;
 
 /**
  * RemoteResources plugin Test Case
@@ -128,7 +127,7 @@ public class RemoteResourcesMojoTest extends 
AbstractMojoTestCase {
         try {
             Files.createSymbolicLink(outputDirectory.resolve("external"), 
outsideDirectory);
         } catch (UnsupportedOperationException | IOException e) {
-            Assume.assumeNoException(e);
+            return; // unsupported here; this JUnit 3 test cannot report a skip
         }
 
         File output = outputDirectory.toFile();
@@ -151,7 +150,7 @@ public class RemoteResourcesMojoTest extends 
AbstractMojoTestCase {
             Files.createSymbolicLink(outputDirectory.resolve("inside-link"), 
insideDirectory);
             Files.createSymbolicLink(insideDirectory.resolve("outside-link"), 
outsideDirectory);
         } catch (UnsupportedOperationException | IOException e) {
-            Assume.assumeNoException(e);
+            return; // unsupported here; this JUnit 3 test cannot report a skip
         }
 
         File output = outputDirectory.toFile();
@@ -180,23 +179,20 @@ public class RemoteResourcesMojoTest extends 
AbstractMojoTestCase {
         try {
             originalPermissions = 
EnumSet.copyOf(Files.getPosixFilePermissions(restrictedDirectory));
         } catch (UnsupportedOperationException e) {
-            Assume.assumeNoException(e);
-            return;
+            return; // unsupported here; this JUnit 3 test cannot report a skip
         }
 
         try {
             Files.createSymbolicLink(restrictedDirectory.resolve("external"), 
outsideDirectory);
         } catch (UnsupportedOperationException | IOException e) {
-            Assume.assumeNoException(e);
-            return;
+            return; // unsupported here; this JUnit 3 test cannot report a skip
         }
 
         try {
             Files.setPosixFilePermissions(
                     restrictedDirectory, 
EnumSet.of(PosixFilePermission.OWNER_READ, PosixFilePermission.OWNER_WRITE));
         } catch (UnsupportedOperationException e) {
-            Assume.assumeNoException(e);
-            return;
+            return; // unsupported here; this JUnit 3 test cannot report a skip
         }
 
         try {

Reply via email to