From e450b8d5e10d792d3ec21d0b5de361c52d67bdea Mon Sep 17 00:00:00 2001 From: Dominik Stadler Date: Sat, 14 Feb 2015 12:46:04 +0000 Subject: [PATCH] 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 --- .../org/apache/poi/poifs/crypt/TestSignatureInfo.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 e469f9c3e..ded14dfba 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")); }