From ecb2cac6e6a0a4fd0faca7e6933a63bf50be43be 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 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")); } -- 2.39.5