diff options
Diffstat (limited to 'test/javax/management/remote')
3 files changed, 15 insertions, 24 deletions
diff --git a/test/javax/management/remote/mandatory/connection/BrokenConnectionTest.java b/test/javax/management/remote/mandatory/connection/BrokenConnectionTest.java index 1ada5fb3b..42bed8570 100644 --- a/test/javax/management/remote/mandatory/connection/BrokenConnectionTest.java +++ b/test/javax/management/remote/mandatory/connection/BrokenConnectionTest.java @@ -23,7 +23,7 @@ /* * @test - * @bug 4940957 + * @bug 4940957 8025205 * @summary Tests behaviour when connections break * @author Eamonn McManus * @run clean BrokenConnectionTest @@ -485,14 +485,13 @@ public class BrokenConnectionTest { } if (thisok) { System.out.println("Waiting for failure notif"); - long deadline = System.currentTimeMillis() + 5000; - while (failureListener.count < 1 - && System.currentTimeMillis() < deadline) - Thread.sleep(500); - if (failureListener.count < 1) { - System.out.println("Did not get failure notif!"); - thisok = false; - } else if (failureListener.count > 1) { + // pass or test timeout. see 8025205 + do { + Thread.sleep(100); + } while (failureListener.count < 1); + + Thread.sleep(1000); // if more notif coming ... + if (failureListener.count > 1) { System.out.println("Got too many failure notifs: " + failureListener.count); thisok = false; diff --git a/test/javax/management/remote/mandatory/connection/IdleTimeoutTest.java b/test/javax/management/remote/mandatory/connection/IdleTimeoutTest.java index 854a211a7..9bd9a741c 100644 --- a/test/javax/management/remote/mandatory/connection/IdleTimeoutTest.java +++ b/test/javax/management/remote/mandatory/connection/IdleTimeoutTest.java @@ -23,7 +23,7 @@ /* * @test - * @bug 4886838 4886830 + * @bug 4886838 4886830 8025204 * @summary Tests that idle timeouts happen at appropriate times * @author Eamonn McManus * @run clean IdleTimeoutTest @@ -278,19 +278,11 @@ public class IdleTimeoutTest { } System.out.println("Waiting for id list to drop ours"); - deadline = System.currentTimeMillis() + timeout*2 + 10000; - while (true) { - ids = Arrays.asList(server.getConnectionIds()); - if (!ids.contains(connId) - || System.currentTimeMillis() >= deadline) - break; - Thread.sleep(500); - } - if (ids.contains(connId)) { - System.out.println("Client id still in list after " + - "deadline: " + ids); - return false; - } + // pass or timed out by test harness - see 8025204 + do { + Thread.sleep(100); + ids = Arrays.asList(server.getConnectionIds()); + } while (ids.contains(connId)); conn.getDefaultDomain(); if (connId.equals(client.getConnectionId())) { diff --git a/test/javax/management/remote/mandatory/loading/MissingClassTest.java b/test/javax/management/remote/mandatory/loading/MissingClassTest.java index e70d0adfe..98eead895 100644 --- a/test/javax/management/remote/mandatory/loading/MissingClassTest.java +++ b/test/javax/management/remote/mandatory/loading/MissingClassTest.java @@ -23,7 +23,7 @@ /* * @test - * @bug 4915825 4921009 4934965 4977469 + * @bug 4915825 4921009 4934965 4977469 8019584 * @summary Tests behavior when client or server gets object of unknown class * @author Eamonn McManus * @run clean MissingClassTest SingleClassLoader |