8132786: java/security/cert/CertPathValidator/OCSP/AIACheck.java fails intermittently
authorvinnie
Mon, 24 Aug 2015 16:22:37 +0100
changeset 32269 cb52640fd0e8
parent 32268 9fe7ee60d49d
child 32270 6fe05edf9177
8132786: java/security/cert/CertPathValidator/OCSP/AIACheck.java fails intermittently Reviewed-by: mullan
jdk/test/java/security/cert/CertPathValidator/OCSP/AIACheck.java
--- a/jdk/test/java/security/cert/CertPathValidator/OCSP/AIACheck.java	Mon Aug 24 11:00:12 2015 +0200
+++ b/jdk/test/java/security/cert/CertPathValidator/OCSP/AIACheck.java	Mon Aug 24 16:22:37 2015 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,7 +37,7 @@
  */
 
 import java.io.*;
-import java.net.SocketException;
+import java.net.*;
 import java.util.*;
 import java.security.Security;
 import java.security.cert.*;
@@ -94,7 +94,9 @@
             throw new Exception("Successfully validated an invalid path");
 
         } catch (CertPathValidatorException e ) {
-            if (! (e.getCause() instanceof SocketException)) {
+            Throwable rootCause = e.getCause();
+            if (!(rootCause instanceof SocketException ||
+                  rootCause instanceof SocketTimeoutException)) {
                 throw e;
             }