diff options
author | Dominik Stadler <centic@apache.org> | 2016-06-03 06:01:27 +0000 |
---|---|---|
committer | Dominik Stadler <centic@apache.org> | 2016-06-03 06:01:27 +0000 |
commit | 5ae4dc25ab826ed1f018f4fbbaaac12a8ce938e9 (patch) | |
tree | 4fba213c0d4794ef3831b30cfe29fa6e7e5196c0 /src/ooxml/testcases/org/apache/poi/poifs/crypt | |
parent | 81e694bbff44431f084030cc0f915dde5f86281c (diff) | |
download | poi-5ae4dc25ab826ed1f018f4fbbaaac12a8ce938e9.tar.gz poi-5ae4dc25ab826ed1f018f4fbbaaac12a8ce938e9.zip |
Try to not fail if the time-webservice is offline temporarily
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1746671 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/ooxml/testcases/org/apache/poi/poifs/crypt')
-rw-r--r-- | src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java | 10 |
1 files changed, 7 insertions, 3 deletions
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 e6f181259c..889b0dd1ab 100644 --- a/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java +++ b/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java @@ -388,11 +388,15 @@ public class TestSignatureInfo { if(e.getCause() == null) {
throw e;
}
- if(!(e.getCause() instanceof ConnectException) && !(e.getCause() instanceof SocketTimeoutException)) {
+ if((e.getCause() instanceof ConnectException) || (e.getCause() instanceof SocketTimeoutException)) {
+ assertTrue("Only allowing ConnectException with 'timed out' as message here, but had: " + e,
+ e.getCause().getMessage().contains("timed out"));
+ } else if (e.getCause() instanceof RuntimeException) {
+ assertTrue("Only allowing RuntimeException with 'This site is cur' as message here, but had: " + e,
+ e.getCause().getMessage().contains("This site is cur"));
+ } else {
throw e;
}
- assertTrue("Only allowing ConnectException with 'timed out' as message here, but had: " + e,
- e.getCause().getMessage().contains("timed out"));
}
// verify
|