poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cen...@apache.org
Subject svn commit: r1662447 - /poi/trunk/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java
Date Thu, 26 Feb 2015 13:43:10 GMT
Author: centic
Date: Thu Feb 26 13:43:10 2015
New Revision: 1662447

URL: http://svn.apache.org/r1662447
Log:
Adjust to provide full exception information for cases where we catch unexpected exceptions

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=1662447&r1=1662446&r2=1662447&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 Thu Feb
26 13:43:10 2015
@@ -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



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


Mime
View raw message