mirror of https://github.com/apache/poi.git
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
This commit is contained in:
parent
5d77d4e798
commit
677ae9b8b9
|
@ -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() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue