RFR: 8325097: [macos14] Test "java/awt/TrayIcon/DisposeInActionEventTest/DisposeInActionEventTest.html" failed on macOS 14.3 aarch64 when double-click with the right button on the tray icon with message: "java.lang.RuntimeException: Event posted on wrong app contex"

Abhishek Kumar abhiscxk at openjdk.org
Thu Feb 15 17:25:55 UTC 2024


On Tue, 13 Feb 2024 21:34:09 GMT, Alisen Chung <achung at openjdk.org> wrote:

> Root cause of the test failure was fixed with https://bugs.openjdk.org/browse/JDK-8316931, updating this test since the other fix also included a test update.

test/jdk/java/awt/TrayIcon/DisposeInActionEventTest/DisposeInActionEventTest.java line 51:

> 49:         String instructions;
> 50:         traySupported = SystemTray.isSupported();
> 51:         if (!traySupported) {

`SystemTray.isSupported()` can be directly evaluated in `if` condition.  `traySupported` variable can be removed.

test/jdk/java/awt/TrayIcon/DisposeInActionEventTest/DisposeInActionEventTest.java line 53:

> 51:         if (!traySupported) {
> 52:             instructions = "The test cannot be run because SystemTray is not supported.\n" +
> 53:                            "Simply press PASS button.";

If systemTray is not supported, is it a good idea to just return and pass or skip the test ?

test/jdk/java/awt/TrayIcon/DisposeInActionEventTest/DisposeInActionEventTest.java line 62:

> 60:             }
> 61: 
> 62:             instructions = "When the test starts, it adds the icon to the tray aread. If you\n" +

Suggestion:

            instructions = "When the test starts, it adds the icon to the tray area. If you\n" +

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17838#discussion_r1491355804
PR Review Comment: https://git.openjdk.org/jdk/pull/17838#discussion_r1491364867
PR Review Comment: https://git.openjdk.org/jdk/pull/17838#discussion_r1491368567


More information about the client-libs-dev mailing list