diff options
author | Dominik Stadler <centic@apache.org> | 2023-08-09 05:44:01 +0000 |
---|---|---|
committer | Dominik Stadler <centic@apache.org> | 2023-08-09 05:44:01 +0000 |
commit | 543d6ad54b498081537d5c1ad5201fcf4606c784 (patch) | |
tree | 729b0fb4429e4cbfb958425d1b5f8d22a10b9c5e /poi-integration/src/test | |
parent | e706f37170789876a930461924fbe84c34c5dfa8 (diff) | |
download | poi-543d6ad54b498081537d5c1ad5201fcf4606c784.tar.gz poi-543d6ad54b498081537d5c1ad5201fcf4606c784.zip |
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.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911562 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-integration/src/test')
-rw-r--r-- | poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java b/poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java index a9f3b37aee..b636459146 100644 --- a/poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java +++ b/poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java @@ -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"); + } } |