]> source.dussan.org Git - poi.git/commitdiff
Adjust to provide full exception information for cases where we catch unexpected...
authorDominik Stadler <centic@apache.org>
Thu, 26 Feb 2015 13:43:10 +0000 (13:43 +0000)
committerDominik Stadler <centic@apache.org>
Thu, 26 Feb 2015 13:43:10 +0000 (13:43 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1662447 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java

index fe8ce801119f635128816a82b2f9cd64147b1ae2..d0eeb3d4773b213bf3d85590a7d563b8d19cdac4 100644 (file)
@@ -382,11 +382,13 @@ public class TestSignatureInfo {
             si.confirmSignature();\r
         } catch (RuntimeException e) {\r
             // only allow a ConnectException because of timeout, we see this in Jenkins from time to time...\r
-            assertNotNull("Only allowing ConnectException here, but had: " + e, e.getCause());\r
+            if(e.getCause() == null) {\r
+                throw e;\r
+            }\r
             if(!(e.getCause() instanceof ConnectException)) {\r
                 throw e;\r
             }\r
-            assertTrue("Only allowing ConnectException here, but had: " + e, e.getCause().getMessage().contains("timed out"));\r
+            assertTrue("Only allowing ConnectException with 'timed out' as message here, but had: " + e, e.getCause().getMessage().contains("timed out"));\r
         }\r
         \r
         // verify\r