提交 bda29cc7 编写于 作者: S sjiang

8025204: Intermittent test failure:...

8025204: Intermittent test failure: javax/management/remote/mandatory/connection/IdleTimeoutTest.java
Reviewed-by: dholmes, jbachorik
上级 2344f775
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
/* /*
* @test * @test
* @bug 4886838 4886830 * @bug 4886838 4886830 8025204
* @summary Tests that idle timeouts happen at appropriate times * @summary Tests that idle timeouts happen at appropriate times
* @author Eamonn McManus * @author Eamonn McManus
* @run clean IdleTimeoutTest * @run clean IdleTimeoutTest
...@@ -278,19 +278,11 @@ public class IdleTimeoutTest { ...@@ -278,19 +278,11 @@ public class IdleTimeoutTest {
} }
System.out.println("Waiting for id list to drop ours"); System.out.println("Waiting for id list to drop ours");
deadline = System.currentTimeMillis() + timeout*2 + 10000; // pass or timed out by test harness - see 8025204
while (true) { do {
ids = Arrays.asList(server.getConnectionIds()); Thread.sleep(100);
if (!ids.contains(connId) ids = Arrays.asList(server.getConnectionIds());
|| System.currentTimeMillis() >= deadline) } while (ids.contains(connId));
break;
Thread.sleep(500);
}
if (ids.contains(connId)) {
System.out.println("Client id still in list after " +
"deadline: " + ids);
return false;
}
conn.getDefaultDomain(); conn.getDefaultDomain();
if (connId.equals(client.getConnectionId())) { if (connId.equals(client.getConnectionId())) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册