This is an automated email from the ASF dual-hosted git repository.
pottlinger 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 1cf5818d RAT-475: Try workaround under linux as well in order to get a
green build@ASF-Jenkins
1cf5818d is described below
commit 1cf5818dd1eb85a447e8fd47e2553697ea21f385
Author: P. Ottlinger <[email protected]>
AuthorDate: Thu Oct 9 18:36:35 2025 +0200
RAT-475: Try workaround under linux as well in order to get a green
build@ASF-Jenkins
---
.../src/test/java/org/apache/rat/anttasks/ReportOptionTest.java | 8 +++++---
1 file changed, 5 insertions(+), 3 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 adc02846..fcebbfea 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
@@ -68,8 +68,9 @@ public class ReportOptionTest {
);
}
- static boolean isRunningOnGitHubAction() {
- return System.getenv("GITHUB_ACTION") != null;
+ static boolean isRunningOnGitHubActionOrLinux() {
+ return System.getenv("GITHUB_ACTION") != null ||
+
System.getProperty("os.name").toLowerCase(Locale.ENGLISH).contains("linux");
}
@AfterAll
@@ -81,7 +82,8 @@ public class ReportOptionTest {
// hacky workaround for windows bug described in RAT-475, try to force
resource cleanup via GC
@EnabledOnOs(OS.WINDOWS)
// GC is also enabled on GitHubAction runs as its JDK is configured to do
I/O stuff lazily, thus a GC forces all resources to be closed
- @EnabledIf("isRunningOnGitHubAction")
+ // Failures happen on ASF Jenkins as well, therefore we call the
workaround under linux as well
+ @EnabledIf("isRunningOnGitHubActionOrLinux")
static void cleanup() {
System.gc();
}