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:
Dominik Stadler 2025-01-11 10:26:07 +00:00
parent 0f91df9577
commit 0ab1ccc20a

View File

@ -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 {