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
This commit is contained in:
parent
e7615fdd34
commit
e450b8d5e1
@ -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"));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user