<AWT Dev> Review reuest for 8146168: [TEST_BUG] instability of java/awt/Frame/MaximizedToMaximized/MaximizedToMaximized.java

Ambarish Rapte ambarish.rapte at oracle.com
Tue Dec 29 05:27:55 UTC 2015


Hi All,

Please review the fix for JDK9,

Webrev: http://cr.openjdk.java.net/~arapte/8146168/webrev.00/

Bug: https://bugs.openjdk.java.net/browse/JDK-8146168

 

Issue:

                The test fails, on low performance system.

 

Cause:

                The APIs, Frame.setVisible() & Frame.setExtendedState(Frame.MAXIMIZED_BOTH)

                take little more time to finish. Due to which the result verification occurs before above

                mentioned APIs complete.

                These APIs run on toolkit thread, But as the toolkit APIs should not be used by bug:

https://bugs.openjdk.java.net/browse/JDK-8063102

The original test was altered to remove ((SunToolkit) toolkit).realSync();

                

Fix:

                There are two fixes,

1.       Synchronize the calls

This is the fix in webrev.00 provided at above link.

Added ComponentAdapter  to synchronize Frame.setVisible()

Added WindowStateListener to synchronize Frame.setExtendedState(Frame.MAXIMIZED_BOTH)

 

2.       Add delay after call to above APIs

Adding robot.delay(1000) would also solve the issue.

If above fix 1: does not sound good, delay would do the same with lesser code change.

 

 

Merry Christmas,

Ambarish

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20151228/19c6eb70/attachment-0001.html>


More information about the awt-dev mailing list