From: Dominik Stadler Date: Thu, 26 Feb 2015 13:43:10 +0000 (+0000) Subject: Adjust to provide full exception information for cases where we catch unexpected... X-Git-Tag: REL_3_12_FINAL~103 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c2e25249c1ca21ca546cd126bc43a12e3b6a218d;p=poi.git Adjust to provide full exception information for cases where we catch unexpected exceptions git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1662447 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 fe8ce80111..d0eeb3d477 100644 --- a/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java +++ b/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java @@ -382,11 +382,13 @@ public class TestSignatureInfo { si.confirmSignature(); } 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()); + if(e.getCause() == null) { + throw e; + } if(!(e.getCause() instanceof ConnectException)) { throw e; } - assertTrue("Only allowing ConnectException here, but had: " + e, e.getCause().getMessage().contains("timed out")); + assertTrue("Only allowing ConnectException with 'timed out' as message here, but had: " + e, e.getCause().getMessage().contains("timed out")); } // verify