c.setCellValue(i);
}
- wb = XSSFTestDataSamples.writeOutAndReadBack(wb);
+ // using temp file instead of ByteArrayOutputStream because of OOM in gump run
+ File tmp = TempFile.createTempFile("poi-test", ".bug57880");
+ FileOutputStream fos = new FileOutputStream(tmp);
+ wb.write(fos);
+ fos.close();
+
+ wb.close();
+ fmt = null; s = null; wb = null;
+ // System.gc();
+
+ wb = new XSSFWorkbook(tmp);
fmt = wb.getCreationHelper().createDataFormat();
s = wb.getSheetAt(0);
for (int i=1; i<numStyles; i++) {
assertEquals(164+i, style.getDataFormat()&0xffff);
assertEquals("test"+i, style.getDataFormatString());
}
+ wb.close();
+ tmp.delete();
}
}