Author: centic
Date: Wed Aug 9 05:44:01 2023
New Revision: 1911562
URL: http://svn.apache.org/viewvc?rev=1911562&view=rev
Log:
Do not disable all files for poi-integration in build.gradle
It seems doing it this way can kick in even when using JDK 11+ due
to the Gradle toolchain.
Let's rather do a more specific exclusion in code to only exclude files
which actually cause JDK 8 to hang.
Modified:
poi/trunk/poi-integration/build.gradle
poi/trunk/poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java
Modified: poi/trunk/poi-integration/build.gradle
URL:
http://svn.apache.org/viewvc/poi/trunk/poi-integration/build.gradle?rev=1911562&r1=1911561&r2=1911562&view=diff
==============================================================================
--- poi/trunk/poi-integration/build.gradle (original)
+++ poi/trunk/poi-integration/build.gradle Wed Aug 9 05:44:01 2023
@@ -139,9 +139,6 @@ artifacts {
test {
// exclude these from the normal test-run
exclude '**/*FileHandler.class'
- if (jdkVersion == 8) {
- exclude '**/*.class'
- }
dependsOn { testJar }
Modified:
poi/trunk/poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java
URL:
http://svn.apache.org/viewvc/poi/trunk/poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java?rev=1911562&r1=1911561&r2=1911562&view=diff
==============================================================================
---
poi/trunk/poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java
(original)
+++
poi/trunk/poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java
Wed Aug 9 05:44:01 2023
@@ -36,6 +36,7 @@ import java.util.stream.Stream;
import org.apache.poi.POIDataSamples;
import org.apache.poi.hssf.record.crypto.Biff8EncryptionKey;
import org.apache.tools.ant.DirectoryScanner;
+import org.junit.jupiter.api.Assumptions;
import org.junit.jupiter.api.function.Executable;
import org.junit.jupiter.api.parallel.Execution;
import org.junit.jupiter.api.parallel.ExecutionMode;
@@ -200,6 +201,13 @@ public class TestAllFiles {
String threadName = Thread.currentThread().getName();
try {
Thread.currentThread().setName("Handle - " + file + " - " +
handler);
+
+ // Some of the tests hang in JDK 8 due to Graphics-Rendering
issues in JDK itself,
+ // therefore we do not run some tests here
+ Assumptions.assumeFalse(isJava8() && (
+ file.endsWith("23884_defense_FINAL_OOimport_edit.ppt")
+ ), "Some files hang in JDK graphics rendering on Java 8 due to a
JDK bug");
+
System.out.println("Running handleFiles on "+file);
FileHandler fileHandler = handler.getHandler();
assertNotNull(fileHandler, "Did not find a handler for file " +
file);
@@ -301,4 +309,8 @@ public class TestAllFiles {
return msg;
}
+
+ private static boolean isJava8() {
+ return System.getProperty("java.version").startsWith("1.8");
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]