RFR: 6854300: [TEST_BUG] java/awt/event/MouseEvent/SpuriousExitEnter/SpuriousExitEnter_3.java fails in jdk6u14 & jdk7

Sergey Bylokhov serb at openjdk.java.net
Thu Oct 28 22:35:09 UTC 2021


On Thu, 28 Oct 2021 20:20:04 GMT, Alexander Zvegintsev <azvegint at openjdk.org> wrote:

> Test trying to call `button.getLocationOnScreen()` when its frame not yet fully configured, so the obtained button location is shifted by window's height. 
> 
> Waiting a bit after `setVisible()` call fixes the issue. Some cleanup was made also. Testing is green on all platforms.

test/jdk/java/awt/event/MouseEvent/SpuriousExitEnter/SpuriousExitEnter_3.java line 97:

> 95:         r.delay(1000);
> 96: 
> 97:         Point centerA = new Point(comp.getLocationOnScreen().x + comp.getWidth() / 2,

I think the comp.getLocationOnScreen() should be moved to the EDT, and probably that will solve the problem even w/o delay?

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

PR: https://git.openjdk.java.net/jdk/pull/6164



More information about the client-libs-dev mailing list