aboutsummaryrefslogtreecommitdiffstats
path: root/poi-integration/src/test
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2021-11-07 14:59:48 +0000
committerDominik Stadler <centic@apache.org>2021-11-07 14:59:48 +0000
commit53217e2b1e9d6871b2babfd74fb52129f6cf7461 (patch)
tree6a42fe1a38d03790f30a9bf003852080a82e8ba0 /poi-integration/src/test
parentc2936346f82699d3d2ed5cf1a9c17cc05da9bbcc (diff)
downloadpoi-53217e2b1e9d6871b2babfd74fb52129f6cf7461.tar.gz
poi-53217e2b1e9d6871b2babfd74fb52129f6cf7461.zip
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
Diffstat (limited to 'poi-integration/src/test')
-rw-r--r--poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java9
1 files changed, 8 insertions, 1 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 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<Arguments> 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())) {