aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarius Volkhart <mariusvolkhart@apache.org>2021-03-14 10:42:15 +0000
committerMarius Volkhart <mariusvolkhart@apache.org>2021-03-14 10:42:15 +0000
commit677ae9b8b9a61d642f8f0235e42ac6eaaf113ca0 (patch)
treec1ea4134381d37f67a3b16f83ee108301f60b5ba /src
parent5d77d4e79823380b9c71c65d0754eb0d9d0357aa (diff)
downloadpoi-677ae9b8b9a61d642f8f0235e42ac6eaaf113ca0.tar.gz
poi-677ae9b8b9a61d642f8f0235e42ac6eaaf113ca0.zip
Limit which tests can run in parallel
Some tests modify global resources. Those tests cannot be run in parallel with others, as they cause problems or become flaky. Where possible, indicate to JUnit the resources in contention. Otherwise, mark the tests as needing to run in isolation. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887630 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/testcases/org/apache/poi/hssf/dev/TestEFBiffViewer.java3
-rw-r--r--src/testcases/org/apache/poi/hssf/dev/TestFormulaViewer.java3
-rw-r--r--src/testcases/org/apache/poi/hssf/dev/TestReSave.java8
-rw-r--r--src/testcases/org/apache/poi/hssf/dev/TestRecordLister.java3
4 files changed, 14 insertions, 3 deletions
diff --git a/src/testcases/org/apache/poi/hssf/dev/TestEFBiffViewer.java b/src/testcases/org/apache/poi/hssf/dev/TestEFBiffViewer.java
index a223cc4506..56be2c87af 100644
--- a/src/testcases/org/apache/poi/hssf/dev/TestEFBiffViewer.java
+++ b/src/testcases/org/apache/poi/hssf/dev/TestEFBiffViewer.java
@@ -26,7 +26,10 @@ import org.apache.poi.hssf.record.RecordInputStream;
import org.apache.poi.util.NullPrintStream;
import org.apache.poi.util.RecordFormatException;
import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.parallel.ResourceLock;
+import org.junit.jupiter.api.parallel.Resources;
+@ResourceLock(Resources.SYSTEM_OUT)
class TestEFBiffViewer extends BaseTestIteratingXLS {
@BeforeAll
public static void setup() {
diff --git a/src/testcases/org/apache/poi/hssf/dev/TestFormulaViewer.java b/src/testcases/org/apache/poi/hssf/dev/TestFormulaViewer.java
index 8637c1ab7a..a0cdaddcd2 100644
--- a/src/testcases/org/apache/poi/hssf/dev/TestFormulaViewer.java
+++ b/src/testcases/org/apache/poi/hssf/dev/TestFormulaViewer.java
@@ -27,7 +27,10 @@ import org.apache.poi.hssf.record.RecordInputStream;
import org.apache.poi.util.NullPrintStream;
import org.apache.poi.util.RecordFormatException;
import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.parallel.ResourceLock;
+import org.junit.jupiter.api.parallel.Resources;
+@ResourceLock(Resources.SYSTEM_OUT)
class TestFormulaViewer extends BaseTestIteratingXLS {
@BeforeAll
public static void setup() {
diff --git a/src/testcases/org/apache/poi/hssf/dev/TestReSave.java b/src/testcases/org/apache/poi/hssf/dev/TestReSave.java
index 063e561ba3..868561df21 100644
--- a/src/testcases/org/apache/poi/hssf/dev/TestReSave.java
+++ b/src/testcases/org/apache/poi/hssf/dev/TestReSave.java
@@ -30,10 +30,12 @@ import org.apache.poi.util.RecordFormatException;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.parallel.Execution;
-import org.junit.jupiter.api.parallel.ExecutionMode;
+import org.junit.jupiter.api.parallel.Isolated;
+import org.junit.jupiter.api.parallel.ResourceLock;
+import org.junit.jupiter.api.parallel.Resources;
-@Execution(ExecutionMode.CONCURRENT)
+@Isolated("Modifies the test data directory")
+@ResourceLock(Resources.SYSTEM_OUT)
class TestReSave extends BaseTestIteratingXLS {
@BeforeAll
public static void setup() {
diff --git a/src/testcases/org/apache/poi/hssf/dev/TestRecordLister.java b/src/testcases/org/apache/poi/hssf/dev/TestRecordLister.java
index cec212a9a4..9eb6ebc255 100644
--- a/src/testcases/org/apache/poi/hssf/dev/TestRecordLister.java
+++ b/src/testcases/org/apache/poi/hssf/dev/TestRecordLister.java
@@ -24,7 +24,10 @@ import org.apache.poi.hssf.OldExcelFormatException;
import org.apache.poi.util.NullPrintStream;
import org.apache.poi.util.RecordFormatException;
import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.parallel.ResourceLock;
+import org.junit.jupiter.api.parallel.Resources;
+@ResourceLock(Resources.SYSTEM_OUT)
class TestRecordLister extends BaseTestIteratingXLS {
@BeforeAll
public static void setup() {