On Mon, 7 Nov 2022 07:28:02 GMT, Srinivas Mandalika <smandal...@openjdk.org> 
wrote:

>> 8295707: Create a regression test for JDK-7184401
>> 
>> JDK-7184401 - JDk7u6 : Missing main menu bar in Netbeans after fix for 
>> 7162144
>> Above bug got introduced due to a fix for 
>> [JDK-7162144](https://bugs.openjdk.java.net/browse/JDK-7162144). 
>> The issue was observed on the netbeans UI. 
>> The test below recreates a standalone test to mimic the failure reported in 
>> Netbeans in [JDK-7184401](https://bugs.openjdk.java.net/browse/JDK-7184401) 
>> and verifies that it is working as expected after it got fixed via 
>> [JDK-7189350](https://bugs.openjdk.java.net/browse/JDK-7189350))
>> 
>> The Test attempts to reproduce specific behavior of NetBeans at the certain 
>> toolbar creation stage. Widgets are created on EDT; Another code posts some 
>> events to them on EDT; From another thread some code calls explicitly 
>> edt.interrupt().
>> Before this got fixed, events from a second code got lost.
>> 
>> This review is for migrating tests from a closed test suite to open.
>> Testing:
>> 1.Tested the code on jdk7u6 to reproduce the issue - the UI hangs when run 
>> on this build.
>> 2. Tested the code on jdk7u361 b01 to validate the fix - the test passed.
>> 3.Mach5 Testing(40 times per platform) in macos x64, linux x64 and windows 
>> x64 - the .results are clean
>
> Srinivas Mandalika has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Fixed Review Comments: Removed redundant code

It is not very clear what the test is really verifying. However, I can confirm 
that the current test hangs in 7u5 and it successfully completes in 7u6 where 
[JDK-7184401](https://bugs.openjdk.org/browse/JDK-7184401) is fixed.

In JDK 7, `Robot.waitForIdle` does not call `SunToolkit.realSync`, therefore 
calling `realSync` is likely required to reproduce the original problem. Since 
JDK 9, `Robot.waitForIdle` calls `realSync` (see 
[JDK-8056911](https://bugs.openjdk.org/browse/JDK-8056911)), therefore it 
should be enough to call `Robot.waitForIdle` and it shouldn't hang.

-------------

PR: https://git.openjdk.org/jdk/pull/10784

Reply via email to