Author: centic
Date: Sat Jan 11 10:26:07 2025
New Revision: 1923066

URL: http://svn.apache.org/viewvc?rev=1923066&view=rev
Log:
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.

Modified:
    
poi/trunk/poi/src/test/java/org/apache/poi/hssf/record/TestRecordFactory.java

Modified: 
poi/trunk/poi/src/test/java/org/apache/poi/hssf/record/TestRecordFactory.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/poi/src/test/java/org/apache/poi/hssf/record/TestRecordFactory.java?rev=1923066&r1=1923065&r2=1923066&view=diff
==============================================================================
--- 
poi/trunk/poi/src/test/java/org/apache/poi/hssf/record/TestRecordFactory.java 
(original)
+++ 
poi/trunk/poi/src/test/java/org/apache/poi/hssf/record/TestRecordFactory.java 
Sat Jan 11 10:26:07 2025
@@ -33,10 +33,12 @@ import org.apache.poi.poifs.filesystem.P
 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 {



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to