changeset 40699:df9fab06ba9d

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
author vtewari
date Thu, 01 Sep 2016 15:02:32 +0530
parents a6fd340cc851
children b75806acf716
files jdk/test/javax/management/remote/mandatory/notif/DeadListenerTest.java
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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);