diff --git a/poi/src/test/java/org/apache/poi/hssf/record/TestRecordFactory.java b/poi/src/test/java/org/apache/poi/hssf/record/TestRecordFactory.java index 56ad4027764..a44cce0e42c 100644 --- a/poi/src/test/java/org/apache/poi/hssf/record/TestRecordFactory.java +++ b/poi/src/test/java/org/apache/poi/hssf/record/TestRecordFactory.java @@ -33,10 +33,12 @@ Licensed to the Apache Software Foundation (ASF) under one or more 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 @@ void testMaxNumberOfRecords() { assertEquals(0, RecordFactory.getMaxNumberOfRecords()); // check exception when exceeding the limit + //noinspection resource assertThrows(RecordFormatException.class, () -> HSSFTestDataSamples.openSampleWorkbook("SampleSS.xls")); } finally {