From 8f2c722fd3818abeaef2aeb72a8e58b29a8dca08 Mon Sep 17 00:00:00 2001 From: Andreas Beeker Date: Sun, 17 Jan 2021 21:20:05 +0000 Subject: [PATCH] Integration tests - try to fix Oracle/OpenJDK vs IBM-JDK error message differences on XXE files git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885625 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/poi/stress/TestAllFiles.java | 4 ++-- test-data/spreadsheet/stress.xls | Bin 38400 -> 37888 bytes 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/integrationtest/org/apache/poi/stress/TestAllFiles.java b/src/integrationtest/org/apache/poi/stress/TestAllFiles.java index 0849f9d989..81c31d3a21 100644 --- a/src/integrationtest/org/apache/poi/stress/TestAllFiles.java +++ b/src/integrationtest/org/apache/poi/stress/TestAllFiles.java @@ -176,11 +176,11 @@ public class TestAllFiles { // with Java 16+ NullPointerExceptions may contain a message ... but apparently not always ?! assertTrue(jreVersion >= 16 || actMsg == null, errPrefix); if (actMsg != null) { - assertTrue(actMsg.startsWith(exMessage), errPrefix + "Message: "+actMsg+" - didn't start with "+exMessage); + assertTrue(actMsg.contains(exMessage), errPrefix + "Message: "+actMsg+" - didn't contain: "+exMessage); } } else { assertNotNull(actMsg, errPrefix); - assertTrue(actMsg.startsWith(exMessage), errPrefix + "Message: "+actMsg+" - didn't start with "+exMessage); + assertTrue(actMsg.contains(exMessage), errPrefix + "Message: "+actMsg+" - didn't contain: "+exMessage); } } else { assertDoesNotThrow(exec, errPrefix); diff --git a/test-data/spreadsheet/stress.xls b/test-data/spreadsheet/stress.xls index 8ebb9f39e7a3b45efe348ae5cd3fa15f23a1aaeb..3d286e5e555fe584d5c1782d70d1dee3189c3067 100644 GIT binary patch delta 440 zcmZoz!_=^XX@UW-I|CF5Ffh1mv^~!x`0xM!{~+uJlmO8llNFioPfTFh#PW}oX^H71 zE)gb)+{t2GzZi8l3vx>^`G_(wBqk@P78fgI7AxfCmnbCW*v` zo1YeYGcw9-HZ0vIx~ZpxS%3v7V`yN&-~gl>o`xNp+|sYWk*<~$CieCk<77n^kiW&lYmZaDw| delta 723 zcmZoz!PKyZX@UW-2LlucFfh1ov^~!x=>in^_y7NY5O#;MJwf!uz}uTx{;@L6Hk-sH z!o;38S&Zu!qxNP&ZV9IPc?=B2$r-7+iSb3LX{kl2dC93(3T}y+IjJcMCHV?Psfj5H z5CsY;`N^fZsd*&|>cL9-ZF1>^W+vg5&A%qFF#`Zv_sz}# -- 2.39.5