mirror of
https://github.com/apache/poi.git
synced 2026-02-27 20:40:08 +08:00
Ensure that test which changes static value does not run at the same time as other tests
Otherwise we get strange test-failures in other places. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923066 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0f91df9577
commit
0ab1ccc20a
@ -33,10 +33,12 @@ import org.apache.poi.poifs.filesystem.POIFSFileSystem;
|
||||
import org.apache.poi.util.HexRead;
|
||||
import org.apache.poi.util.RecordFormatException;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.parallel.Isolated;
|
||||
|
||||
/**
|
||||
* Tests the record factory
|
||||
*/
|
||||
@Isolated // changes static values, so other tests should not run at the same time
|
||||
final class TestRecordFactory {
|
||||
|
||||
|
||||
@ -245,6 +247,7 @@ final class TestRecordFactory {
|
||||
assertEquals(0, RecordFactory.getMaxNumberOfRecords());
|
||||
|
||||
// check exception when exceeding the limit
|
||||
//noinspection resource
|
||||
assertThrows(RecordFormatException.class,
|
||||
() -> HSSFTestDataSamples.openSampleWorkbook("SampleSS.xls"));
|
||||
} finally {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user