From 53217e2b1e9d6871b2babfd74fb52129f6cf7461 Mon Sep 17 00:00:00 2001 From: Dominik Stadler Date: Sun, 7 Nov 2021 14:59:48 +0000 Subject: Use parallel build to speed up building and running tests Enable parallel building and parallel test-execution Provide a configuration to still build/test serially on CI via CI_BUILD=TRUE gradle --no-parallel --max-workers=1 clean build Adjust Jenkins DSL to set CI_BUILD to avoid problems in CI Adjust TestAllFiles to not fail when parallel builds are enabled Reduce memory settings to reduce requirements on build-environments Add gradle plugin to list task-dependencies Thanks to Andreas Reichel for the PR Closes #275 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1894812 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/test/java/org/apache/poi/stress/TestAllFiles.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'poi-integration/src/test/java') 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 30338f0f8b..524ec0a2f2 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,8 @@ import java.util.stream.Stream; import org.apache.poi.hssf.record.crypto.Biff8EncryptionKey; import org.apache.tools.ant.DirectoryScanner; import org.junit.jupiter.api.function.Executable; +import org.junit.jupiter.api.parallel.Execution; +import org.junit.jupiter.api.parallel.ExecutionMode; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -66,7 +68,7 @@ import org.opentest4j.AssertionFailedError; * that we do not remove expected sanity checks. */ // also need to set JVM parameter: -Djunit.jupiter.execution.parallel.enabled=true -//@Execution(ExecutionMode.CONCURRENT) +@Execution(ExecutionMode.CONCURRENT) public class TestAllFiles { private static final String DEFAULT_TEST_DATA_PATH = "test-data"; public static final File ROOT_DIR = new File(System.getProperty("POI.testdata.path", DEFAULT_TEST_DATA_PATH)); @@ -117,6 +119,11 @@ public class TestAllFiles { final List result = new ArrayList<>(100); for (String file : scanner.getIncludedFiles()) { + // avoid running on files leftover from previous failed runs + if(file.endsWith("-saved.xls") || file.endsWith("TestHPSFWritingFunctionality.doc")) { + continue; + } + for (FileHandlerKnown handler : sm.getHandler(file)) { ExcInfo info1 = sm.getExcInfo(file, testName, handler); if (info1 == null || info1.isValid(testName, handler.name())) { -- cgit v1.2.3