This is an automated email from the ASF dual-hosted git repository.
pjfanning pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/poi.git
The following commit(s) were added to refs/heads/trunk by this push:
new a203637dbe Add @Isolated to test classes that mutate static limits
(#1094)
a203637dbe is described below
commit a203637dbef96ce0b8a8c42a1fb7c586a77484bd
Author: PJ Fanning <[email protected]>
AuthorDate: Wed May 27 16:48:14 2026 +0100
Add @Isolated to test classes that mutate static limits (#1094)
Co-authored-by: copilot-swe-agent[bot]
<[email protected]>
---
poi-ooxml/src/test/java/org/apache/poi/xwpf/usermodel/TestXWPFBugs.java | 2 ++
.../src/test/java/org/apache/poi/hslf/record/TestExOleObjStg.java | 2 ++
.../org/apache/poi/hslf/usermodel/TestMetafileInflateSizeLimit.java | 2 ++
.../src/test/java/org/apache/poi/hwpf/usermodel/TestPictures.java | 2 ++
poi/src/test/java/org/apache/poi/ddf/TestEscherMetafileBlip.java | 2 ++
5 files changed, 10 insertions(+)
diff --git
a/poi-ooxml/src/test/java/org/apache/poi/xwpf/usermodel/TestXWPFBugs.java
b/poi-ooxml/src/test/java/org/apache/poi/xwpf/usermodel/TestXWPFBugs.java
index 4846e7a402..e0b917a5a7 100644
--- a/poi-ooxml/src/test/java/org/apache/poi/xwpf/usermodel/TestXWPFBugs.java
+++ b/poi-ooxml/src/test/java/org/apache/poi/xwpf/usermodel/TestXWPFBugs.java
@@ -35,8 +35,10 @@ import org.apache.poi.util.Units;
import org.apache.poi.xwpf.XWPFTestDataSamples;
import org.apache.poi.xwpf.usermodel.XWPFRun.FontCharRange;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.parallel.Isolated;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTAbstractNum;
+@Isolated // this test changes global static limits (ZipArchiveFakeEntry,
IOUtils, ZipInputStreamZipEntrySource)
class TestXWPFBugs {
@Test
void bug55802() throws Exception {
diff --git
a/poi-scratchpad/src/test/java/org/apache/poi/hslf/record/TestExOleObjStg.java
b/poi-scratchpad/src/test/java/org/apache/poi/hslf/record/TestExOleObjStg.java
index 0ab526f969..760bbc203f 100644
---
a/poi-scratchpad/src/test/java/org/apache/poi/hslf/record/TestExOleObjStg.java
+++
b/poi-scratchpad/src/test/java/org/apache/poi/hslf/record/TestExOleObjStg.java
@@ -35,10 +35,12 @@ import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.parallel.Isolated;
/**
* Tests that {@link ExOleObjStg} works properly
*/
+@Isolated // this test changes global static MAX_RECORD_LENGTH
public final class TestExOleObjStg {
// From a real file (embedded SWF control)
diff --git
a/poi-scratchpad/src/test/java/org/apache/poi/hslf/usermodel/TestMetafileInflateSizeLimit.java
b/poi-scratchpad/src/test/java/org/apache/poi/hslf/usermodel/TestMetafileInflateSizeLimit.java
index 63de4660dc..70c153d7c1 100644
---
a/poi-scratchpad/src/test/java/org/apache/poi/hslf/usermodel/TestMetafileInflateSizeLimit.java
+++
b/poi-scratchpad/src/test/java/org/apache/poi/hslf/usermodel/TestMetafileInflateSizeLimit.java
@@ -34,12 +34,14 @@ import org.apache.poi.util.RecordFormatException;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.parallel.Isolated;
/**
* Tests that WMF, EMF, and PICT inflate operations respect the
* {@link Metafile#getMaxRecordLength()} size limit to prevent zip-bomb
* style decompression attacks.
*/
+@Isolated // this test changes global static MAX_RECORD_LENGTH
public class TestMetafileInflateSizeLimit {
private static final POIDataSamples SLIDE_TESTS =
POIDataSamples.getSlideShowInstance();
diff --git
a/poi-scratchpad/src/test/java/org/apache/poi/hwpf/usermodel/TestPictures.java
b/poi-scratchpad/src/test/java/org/apache/poi/hwpf/usermodel/TestPictures.java
index cf126133be..85629d824f 100644
---
a/poi-scratchpad/src/test/java/org/apache/poi/hwpf/usermodel/TestPictures.java
+++
b/poi-scratchpad/src/test/java/org/apache/poi/hwpf/usermodel/TestPictures.java
@@ -43,12 +43,14 @@ import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.parallel.Isolated;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;
/**
* Test the picture handling
*/
+@Isolated // this test changes global static MAX_RECORD_LENGTH
public final class TestPictures {
private int savedMaxRecordLength;
diff --git a/poi/src/test/java/org/apache/poi/ddf/TestEscherMetafileBlip.java
b/poi/src/test/java/org/apache/poi/ddf/TestEscherMetafileBlip.java
index 1e48327719..012d893101 100644
--- a/poi/src/test/java/org/apache/poi/ddf/TestEscherMetafileBlip.java
+++ b/poi/src/test/java/org/apache/poi/ddf/TestEscherMetafileBlip.java
@@ -32,11 +32,13 @@ import org.apache.poi.util.RecordFormatException;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.parallel.Isolated;
/**
* Tests for {@link EscherMetafileBlip}, including the inflation size guard
* against zip-bomb style payloads.
*/
+@Isolated // this test changes global static MAX_RECORD_LENGTH
class TestEscherMetafileBlip {
private int savedMaxRecordLength;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]