poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cen...@apache.org
Subject svn commit: r1659784 - /poi/trunk/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java
Date Sat, 14 Feb 2015 12:46:05 GMT
Author: centic
Date: Sat Feb 14 12:46:04 2015
New Revision: 1659784

URL: http://svn.apache.org/r1659784
Log:
Adjust TestSignatureInfo so junit provides more information if an unexpected exception happens

Modified:
    poi/trunk/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java?rev=1659784&r1=1659783&r2=1659784&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java Sat Feb
14 12:46:04 2015
@@ -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"));
         }
         



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message