test/jdk/com/sun/jndi/ldap/DeadSSLLdapTimeoutTest.java
branchJDK-8145252-TLS13-branch
changeset 56588 a725ee6ccaea
parent 47216 71c04702a3d5
child 56800 85305a50b1b4
equal deleted inserted replaced
56587:ca406858595e 56588:a725ee6ccaea
     1 /*
     1 /*
     2  * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    65     }
    65     }
    66 
    66 
    67     public void performOp(InitialContext ctx) throws NamingException {}
    67     public void performOp(InitialContext ctx) throws NamingException {}
    68 
    68 
    69     public void handleNamingException(NamingException e, long start, long end) {
    69     public void handleNamingException(NamingException e, long start, long end) {
    70         if (e.getCause() instanceof SocketTimeoutException) {
    70         if (e.getCause().getCause() instanceof SocketTimeoutException) {
    71             // SSL connect will timeout via readReply using
    71             // SSL connect will timeout via readReply using
    72             // SocketTimeoutException
    72             // SocketTimeoutException
    73             e.printStackTrace();
    73             e.printStackTrace();
    74             pass();
    74             pass();
    75         } else if (e.getCause() instanceof SSLHandshakeException
    75         } else if (e.getCause() instanceof SSLHandshakeException