import java.io.File;
import java.io.PrintStream;
-import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import org.apache.poi.util.NullPrintStream;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.parallel.Isolated;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
+@Isolated // this test changes global static BYTE_ARRAY_MAX_OVERRIDE
public abstract class BaseTestPPTIterating {
protected static final Set<String> OLD_FILES = new HashSet<>();
static {
private final PrintStream save = System.out;
@BeforeEach
- void setUpBase() throws UnsupportedEncodingException {
+ void setUpBase() {
// set a higher max allocation limit as some test-files require more
IOUtils.setByteArrayMaxOverride(5*1024*1024);
import org.apache.poi.hslf.HSLFTestDataSamples;
import org.apache.poi.util.IOUtils;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.parallel.Isolated;
+@Isolated // this test changes global static BYTE_ARRAY_MAX_OVERRIDE
public class TestSlideShowDumper extends BaseTestPPTIterating {
private static final Set<String> FAILING = new HashSet<>();
static {
private static void throwRFE(long length, int maxLength) {
throw new RecordFormatException(String.format(Locale.ROOT, "Tried to allocate an array of length %,d" +
- ", but the maximum lenght for this record type is %,d.\n" +
+ ", but the maximum length for this record type is %,d.\n" +
"If the file is not corrupt, please open an issue on bugzilla to request \n" +
"increasing the maximum allowable size for this record type.\n"+
"As a temporary workaround, consider setting a higher override value with " +
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.parallel.Isolated;
+@Isolated // this test changes global static BYTE_ARRAY_MAX_OVERRIDE
final class TestIOUtils {
private static File TMP;
private static final long LENGTH = 300 + new Random().nextInt(9000);
}
}
- public class NullInputStream extends InputStream {
+ public static class NullInputStream extends InputStream {
private final int bytes;
private final boolean exception;