From: Dominik Stadler Date: Sat, 14 Feb 2015 12:46:04 +0000 (+0000) Subject: Adjust TestSignatureInfo so junit provides more information if an unexpected exceptio... X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e450b8d5e10d792d3ec21d0b5de361c52d67bdea;p=poi.git Adjust TestSignatureInfo so junit provides more information if an unexpected exception happens git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1659784 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java b/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java index e469f9c3ef..ded14dfba9 100644 --- a/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java +++ b/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java @@ -383,7 +383,9 @@ public class TestSignatureInfo { } catch (RuntimeException e) { // only allow a ConnectException because of timeout, we see this in Jenkins from time to time... assertNotNull("Only allowing ConnectException here, but had: " + e, e.getCause()); - assertTrue("Only allowing ConnectException here, but had: " + e, e.getCause() instanceof ConnectException); + if(!(e.getCause() instanceof ConnectException)) { + throw e; + } assertTrue("Only allowing ConnectException here, but had: " + e, e.getCause().getMessage().contains("timed out")); }