RFR: 8325097: [macos14] DisposeInActionEventTest.html failed with message: "Event posted on wrong app contex" [v8]

Alexey Ivanov aivanov at openjdk.org
Wed Feb 28 14:39:55 UTC 2024


On Wed, 28 Feb 2024 11:12:48 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> @alisenchung  Since the trayicon is added back after removal and PassFailJFrame handles disposal of test windows only, Aleksei is suggesting we handle the removal of trayicon explicitly (when test is run outside of jtreg) something like below. You probably want to move `systemTray` and `trayIcon` vars accordingly.
>> 
>> 
>> try {
>>     PassFailJFrame.builder()
>>                   .title("Event Message Display")
>>                   .instructions(instructions)
>>                   .testTimeOut(5)
>>                   .rows(15)
>>                   .columns(45)
>>                   .testUI(DisposeInActionEventTest::showFrameAndIcon)
>>                   .build()
>>                   .awaitAndCheck();
>> } finally {
>>      systemTray.remove(trayIcon);
>> }
>
> That's correct! Otherwise, the orphan icon is left the system tray. When the test is run without jtreg, it doesn't terminate because the tray icon doesn't allow EDT to stop.

Alternatively, you can remove the system tray icon in `windowClosing` or `windowClosed` event of `WindowListener` associated with the frame.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17838#discussion_r1506043061


More information about the client-libs-dev mailing list