<AWT Dev> RFR: 8259511: java/awt/Window/MainKeyWindowTest/TestMainKeyWindow.java failed with "RuntimeException: Test failed: 20 failure(s)"
Sergey Bylokhov
serb at openjdk.java.net
Mon Jan 18 11:24:48 UTC 2021
On Mon, 18 Jan 2021 07:41:12 GMT, Jayathirth D V <jdv at openjdk.org> wrote:
>>> I am trying to verify the fix in my mac, if i simply run the test without any change it is throwing error : "Use -nativepath to specify the location of native code".
>>> Do we need to change anything in the mac preferences to run this test?
>>
>> This test has a native part so you need to specify this option and point it to the built test bundle, or you can run it via make file:
>> `make test TEST="jtreg:open/test/jdk/java/awt/Window/MainKeyWindowTest/TestMainKeyWindow.java"`
>
> Thanks for the clarification.
> I was able to reproduce the issue and change certainly solves the issue when i start the jtreg test from default display (Without external display launching test from retina/ With external display as default and launching jtreg test from external display). But when i run jtreg test from retina and keep external display as default, test still fails with same behaviour as seen without this fix.
The problem in the multiscreen environment was caused by using the wrong NScreen to calculate the "y" coordinate. The "NSScreen mainScreen" returns the "Returns the screen object containing the window with the keyboard focus" actually the window where the terminal is located, not the screeen(0,0) expected by the test.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2113
More information about the awt-dev
mailing list