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-Tag: REL_3_12_BETA1~6 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ecb2cac6e6a0a4fd0faca7e6933a63bf50be43be;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")); }