changeset 11898:bd0fe971e0e6

8046768: com/sun/jndi/ldap/LdapTimeoutTest.java fails intermittently Reviewed-by: vinnie
author robm
date Tue, 25 Aug 2015 14:15:50 +0100
parents b5b00d04e0ad
children 6e54a2f5f6a1
files test/com/sun/jndi/ldap/LdapTimeoutTest.java
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/test/com/sun/jndi/ldap/LdapTimeoutTest.java	Thu Sep 29 14:17:14 2016 +0300
+++ b/test/com/sun/jndi/ldap/LdapTimeoutTest.java	Tue Aug 25 14:15:50 2015 +0100
@@ -83,6 +83,10 @@
         throw new RuntimeException("Test failed");
     }
 
+    public void fail(Exception e) {
+        throw new RuntimeException("Test failed", e);
+    }
+
     boolean shutItDown(InitialContext ctx) {
         try {
             if (ctx != null) ctx.close();
@@ -231,7 +235,7 @@
             // SocketTimeoutException
             pass();
         } else {
-            fail();
+            fail(e);
         }
     }
 }
@@ -268,7 +272,8 @@
     }
 
     public void handleNamingException(NamingException e, long start, long end) {
-        if (NANOSECONDS.toMillis(end - start) < 2_900) {
+        System.out.println("ReadServerTimeoutTest: end-start=" + NANOSECONDS.toMillis(end - start));
+        if (NANOSECONDS.toMillis(end - start) < 2_500) {
             fail();
         } else {
             pass();