Skip to content

Commit

Permalink
Ensure that test which changes static value does not run at the same …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
centic9 committed Jan 11, 2025
1 parent 0f91df9 commit 0ab1ccc
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {


Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 0ab1ccc

Please sign in to comment.