--- old/test/javax/management/remote/mandatory/notif/EmptyDomainNotificationTest.java 2016-11-04 02:14:10.453805727 +0530 +++ new/test/javax/management/remote/mandatory/notif/EmptyDomainNotificationTest.java 2016-11-04 02:14:10.197806378 +0530 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -103,14 +103,9 @@ mbsc.invoke(mbean, "emitNotification", null, null); System.out.println("EmptyDomainNotificationTest-main: waiting notif..."); - final long stopTime = System.currentTimeMillis() + 2000; synchronized(li) { - long toWait = stopTime - System.currentTimeMillis(); - - while (li.received < 1 && toWait > 0) { - li.wait(toWait); - - toWait = stopTime - System.currentTimeMillis(); + while (li.received < 1) { + li.wait(100); } }