jmx-dev RFR 7132590: javax/management/remote/mandatory/notif/NotificationAccessControllerTest.java fails in JDK8-B22

Jaroslav Bachorik jaroslav.bachorik at oracle.com
Thu Aug 21 15:13:21 UTC 2014


On 08/21/2014 03:55 PM, shanliang wrote:
> Jaroslav,
>
> The fix should be good to fix the failure.
>
> It makes me think a special case, suppose that the test waits 2
> notifications, but the test might receive one unexpected notification
> with some more waiting, for example, with the old version, 2 expected
> notifications arrive within the first second, and the unexpected arrives
> in the second second, but with your fix the test might end before the
> unexpected notification arrives.

Hm, you mean providing a proof that extraneous notifications are not 
emitted. I'm not really sure you can create such a proof for the 
existing implementation - even if everything is fine within a certain 
time window it does not imply that in the next n seconds an unexpected 
notification wouldn't be delivered.

>
> Not sure that we should take care of this case.

Probably not in this test. This test just asserts that all the expected 
notifications have been emitted.

-JB-

>
> Thanks,
> Shanliang
>
> Jaroslav Bachorik wrote:
>> Please, review the following test change.
>>
>> Issue : https://bugs.openjdk.java.net/browse/JDK-7132590
>> Webrev: http://cr.openjdk.java.net/~jbachorik/7132590/webrev.00
>>
>> Currently, the test waits for an arbitrary time until it gives up on
>> receiving the notifications. This leads to intermittent failures in
>> situations when the execution is slower than anticipated (running
>> against a debug build etc.).
>>
>> The solution is to block the test until all the expected notification
>> had been delivered or the test is timed out by the harness.
>>
>> Thanks,
>>
>> -JB-
>



More information about the jmx-dev mailing list