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
This commit is contained in:
parent
66afa6d09b
commit
b57a4f04e3
@ -382,11 +382,13 @@ public class TestSignatureInfo {
|
|||||||
si.confirmSignature();
|
si.confirmSignature();
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
// only allow a ConnectException because of timeout, we see this in Jenkins from time to time...
|
// 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)) {
|
if(!(e.getCause() instanceof ConnectException)) {
|
||||||
throw e;
|
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
|
// verify
|
||||||
|
Loading…
Reference in New Issue
Block a user