diff options
author | lana <none@none> | 2013-10-25 10:39:13 -0700 |
---|---|---|
committer | lana <none@none> | 2013-10-25 10:39:13 -0700 |
commit | 1492287786f2f20c945859b927c66358751c0f8e (patch) | |
tree | 156f552bed21656d7776f5a70e229ee7b86515d5 /test/javax/management/remote/mandatory/connection/BrokenConnectionTest.java | |
parent | a1f7f2b01d84ad0ffaecfa1a6a504abea065a041 (diff) | |
parent | 602fee2588f67fb0d8efc1ee78e3b209e6d1ebe2 (diff) |
Merge
Diffstat (limited to 'test/javax/management/remote/mandatory/connection/BrokenConnectionTest.java')
-rw-r--r-- | test/javax/management/remote/mandatory/connection/BrokenConnectionTest.java | 17 |
1 files changed, 8 insertions, 9 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; |