]> source.dussan.org Git - poi.git/commitdiff
Integration tests - try to fix Oracle/OpenJDK vs IBM-JDK error message differences...
authorAndreas Beeker <kiwiwings@apache.org>
Sun, 17 Jan 2021 21:20:05 +0000 (21:20 +0000)
committerAndreas Beeker <kiwiwings@apache.org>
Sun, 17 Jan 2021 21:20:05 +0000 (21:20 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885625 13f79535-47bb-0310-9956-ffa450edef68

src/integrationtest/org/apache/poi/stress/TestAllFiles.java
test-data/spreadsheet/stress.xls

index 0849f9d989f079fecbc70c445021013f059411f7..81c31d3a21a8e067ddcbd7603d181967c996585c 100644 (file)
@@ -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);
index 8ebb9f39e7a3b45efe348ae5cd3fa15f23a1aaeb..3d286e5e555fe584d5c1782d70d1dee3189c3067 100644 (file)
Binary files a/test-data/spreadsheet/stress.xls and b/test-data/spreadsheet/stress.xls differ