]> source.dussan.org Git - poi.git/commitdiff
Adjust TestSignatureInfo so junit provides more information if an unexpected exceptio...
authorDominik Stadler <centic@apache.org>
Sat, 14 Feb 2015 12:46:04 +0000 (12:46 +0000)
committerDominik Stadler <centic@apache.org>
Sat, 14 Feb 2015 12:46:04 +0000 (12:46 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1659784 13f79535-47bb-0310-9956-ffa450edef68

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

index e469f9c3efef17ca49b5541f2cee22b4ca6e98fc..ded14dfba9662167c25768ae437146b15b1d0458 100644 (file)
@@ -383,7 +383,9 @@ public class TestSignatureInfo {
         } 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
-            assertTrue("Only allowing ConnectException here, but had: " + e, e.getCause() instanceof ConnectException);\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
         }\r
         \r