8164609: javax/management/remote/mandatory/notif/DeadListenerTest.java fails with Assertion Error
Summary: Increased test timeout to ensure test case gets all notifications.
Reviewed-by: dholmes
Contributed-by: amit.sapre@oracle.com
--- a/jdk/test/javax/management/remote/mandatory/notif/DeadListenerTest.java Thu Sep 01 10:30:13 2016 +0200
+++ b/jdk/test/javax/management/remote/mandatory/notif/DeadListenerTest.java Thu Sep 01 15:02:32 2016 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -115,9 +115,8 @@
mbean.sendNotification(notif);
// Make sure notifs are working normally.
- long deadline = System.currentTimeMillis() + 2000;
- while ((count1Val.get() != 1 || count2Val.get() != 1) && System.currentTimeMillis() < deadline) {
- Thread.sleep(10);
+ while ((count1Val.get() != 1 || count2Val.get() != 1) ) {
+ Thread.sleep(20);
}
assertTrue("New value of count1 == 1", count1Val.get() == 1);
assertTrue("Initial value of count2 == 1", count2Val.get() == 1);