<AWT Dev> RFR: 8213126: java/awt/Window/MainKeyWindow/TestMainKeyWindow.java time-out on mac10.13
Sergey Bylokhov
serb at openjdk.java.net
Mon Jan 4 08:32:05 UTC 2021
On Mon, 4 Jan 2021 06:36:24 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:
>> Initially, this bug was filed because the test was run via jtreg without passing '-nativepath' option(the make file pass this option automatically). So we could just de-problem list the test, but on the macOS Catalina the "System Preferences.app" was moved so the test cannot run it. As a fix, I suggest running the java app via a separate process instead of "System Preferences.app".
>>
>> The test still fails before JDK-8194327, and passed after.
>
> test/jdk/java/awt/Window/MainKeyWindowTest/TestMainKeyWindow.java line 31:
>
>> 29: * @bug 8194327
>> 30: * @summary [macosx] AWT windows have incorrect main/key window behaviors
>> 31: * @author Alan Snyder
>
> I guess we need to remove @author tag
I have left it to make credit an external contributor
> test/jdk/java/awt/Window/MainKeyWindowTest/TestMainKeyWindow.java line 397:
>
>> 395: Thread.sleep(20_000);
>> 396: System.exit(0);
>> 397: return;
>
> Can you please explain the reasoning for this snippet where we exit the test. What extra args can be passed? I guess it will exit the whole jtreg vm process cancelling all other tests that are to be run later if we call System.exit?!! or is this only for standalone execution?
This part of the code is executed by the test itself see this code above
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
TestMainKeyWindow.class.getSimpleName(), "mark");
return ProcessTools.startProcess("Other frame", pb);
-------------
PR: https://git.openjdk.java.net/jdk/pull/941
More information about the awt-dev
mailing list