From c2e25249c1ca21ca546cd126bc43a12e3b6a218d Mon Sep 17 00:00:00 2001 From: Dominik Stadler Date: Thu, 26 Feb 2015 13:43:10 +0000 Subject: [PATCH] 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 --- .../org/apache/poi/poifs/crypt/TestSignatureInfo.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 -- 2.39.5