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

Claudenw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/creadur-rat.git


The following commit(s) were added to refs/heads/master by this push:
     new b42c2b61 RAT-555: Configure TempDir deletion strategy to ignore I/O 
failures and skip running on GHA&linux (#662)
b42c2b61 is described below

commit b42c2b61c2618243f7710444bf81ce8a977b52a0
Author: P. Ottlinger <[email protected]>
AuthorDate: Thu May 21 13:40:32 2026 +0200

    RAT-555: Configure TempDir deletion strategy to ignore I/O failures and 
skip running on GHA&linux (#662)
    
    * RAT-555: Configure TempDir deletion strategy to ignore I/O failures
    
    * RAT-555: Try explicit disabling for combination GHA&linux
    
    * RAT-555: Fix typo
    
    * RAT-555: Adapt changelog
    
    * RAT-555: Rename exclusion method and remove unused code
---
 .../java/org/apache/rat/anttasks/ReportOptionTest.java   | 16 ++++++----------
 src/changes/changes.xml                                  |  3 +++
 2 files changed, 9 insertions(+), 10 deletions(-)

diff --git 
a/apache-rat-tasks/src/test/java/org/apache/rat/anttasks/ReportOptionTest.java 
b/apache-rat-tasks/src/test/java/org/apache/rat/anttasks/ReportOptionTest.java
index 9f66bc74..382fe48c 100644
--- 
a/apache-rat-tasks/src/test/java/org/apache/rat/anttasks/ReportOptionTest.java
+++ 
b/apache-rat-tasks/src/test/java/org/apache/rat/anttasks/ReportOptionTest.java
@@ -24,7 +24,6 @@ import java.util.Locale;
 import java.util.Map;
 import java.util.stream.Collectors;
 import org.apache.commons.cli.Option;
-import org.apache.commons.lang3.SystemUtils;
 import org.apache.commons.lang3.tuple.ImmutablePair;
 import org.apache.commons.lang3.tuple.Pair;
 import org.apache.rat.test.AbstractConfigurationOptionsProvider;
@@ -35,8 +34,10 @@ import org.apache.rat.documentation.options.AntOption;
 import org.apache.rat.utils.DefaultLog;
 import org.apache.rat.utils.Log;
 import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.condition.DisabledIf;
 import org.junit.jupiter.api.io.CleanupMode;
 import org.junit.jupiter.api.io.TempDir;
+import org.junit.jupiter.api.io.TempDirDeletionStrategy;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.ArgumentsProvider;
 import org.junit.jupiter.params.provider.ArgumentsSource;
@@ -53,22 +54,17 @@ import static org.junit.jupiter.api.Assertions.fail;
 /**
  * Tests to ensure the option setting works correctly.
  */
+@DisabledIf(value = "isRunningOnGitHubActionAndLinux", disabledReason = 
"RAT-555, RAT-475")
 public class ReportOptionTest  {
     // RAT-475: Do no cleanup in order to prevent random build failures on 
ASF-Linux/GitHub nodes
-    @TempDir(cleanup = CleanupMode.NEVER)
+    // RAT-555: Try out new deletionStrategy without failing the tests.
+    @TempDir(cleanup = CleanupMode.NEVER, deletionStrategy = 
TempDirDeletionStrategy.IgnoreFailures.class)
     static Path testPath;
 
     static ReportConfiguration reportConfiguration;
 
-    static boolean isGitHubLinuxOrWindowsWithJava8() {
+    static boolean isRunningOnGitHubActionAndLinux() {
         return System.getenv("GITHUB_ACTION") != null &&
-                
(System.getProperty("os.name").toLowerCase(Locale.ENGLISH).contains("linux") ||
-                        
(System.getProperty("os.name").toLowerCase(Locale.ENGLISH).contains("windows") 
&& SystemUtils.IS_JAVA_1_8)
-                );
-    }
-
-    static boolean isRunningOnGitHubActionOrLinux() {
-        return System.getenv("GITHUB_ACTION") != null || 
          
System.getProperty("os.name").toLowerCase(Locale.ENGLISH).contains("linux");
     }
 
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index c3cfe025..b7b4cc00 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -68,6 +68,9 @@ in order to be properly linked in site reports.
     </release>
     -->
     <release version="1.0.0-SNAPSHOT" date="xxxx-yy-zz" description="Current 
SNAPSHOT - release to be done">
+      <action issue="RAT-555" type="fix" dev="pottlinger">
+        Explicitly configure TempDir's deletion strategy to ignore failures 
and disable ReportOptionTest on GitHubAction and linux combination.
+      </action>
       <action issue="RAT-502" type="fix" dev="pottlinger">
         Add XSLT (application/xslt+xml) to the files that are scanned for 
licenses, was treated/ignored as binary before.
       </action>

Reply via email to