RFR: 8295707: Create a regression test for JDK-7184401

Srinivas Mandalika smandalika at openjdk.org
Thu Nov 3 08:11:05 UTC 2022


On Wed, 2 Nov 2022 14:07:02 GMT, lawrence.andrews <duke at 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
>
> test/jdk/java/awt/EventDispatchThread/InterruptEDTTest.java line 92:
> 
>> 90:                 height = frame.getHeight();
>> 91:             });
>> 92:             robot.mouseMove(xLocation + width / 3, yLocation + height / 3);
> 
> Line# 75 robot.mouseMove is called with in EDT? but where as here its not. Is there any reason for not invoking this in EDT ?

Yes.  Lie #75 on EDT via the invokeLater call , followed by the interrupt() call on the EDT is intentional. This mimics the Netbeans actions which caused a failure
1.Widgets are created on EDT; (Frame creation)
2. another code posts some events to them on EDT(Robot actions on Line 75 on EDT via the invokeLater)
 From another thread some code calls explicitly  edt.interrupt().
3. Above steps causes a hang on jdk7u6 build, while the later builds it is passing. 
4. Line# 92 is simply an additional validation of the code not being hanged until now and proceeding ahead in the flow.

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

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



More information about the client-libs-dev mailing list