# HG changeset patch # User sjiang # Date 1381420035 -7200 # Node ID d7bfaa88e29052fbdfa721b51840ac6d5fa8f605 # Parent 58e09973dcc16a90388d4550fcce508691f8f613 8025204: Intermittent test failure: javax/management/remote/mandatory/connection/IdleTimeoutTest.java Reviewed-by: dholmes, jbachorik diff -r 58e09973dcc1 -r d7bfaa88e290 jdk/test/javax/management/remote/mandatory/connection/IdleTimeoutTest.java --- a/jdk/test/javax/management/remote/mandatory/connection/IdleTimeoutTest.java Thu Oct 10 12:36:42 2013 +0100 +++ b/jdk/test/javax/management/remote/mandatory/connection/IdleTimeoutTest.java Thu Oct 10 17:47:15 2013 +0200 @@ -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 @@ } 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())) {