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" [v5]
Harshitha Onkar
honkar at openjdk.org
Thu Feb 22 20:18:56 UTC 2024
On Tue, 20 Feb 2024 21:01:11 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.
>
> Alisen Chung has updated the pull request incrementally with one additional commit since the last revision:
>
> update test strings and newlines, remove else
Changes requested by honkar (Reviewer).
test/jdk/java/awt/TrayIcon/DisposeInActionEventTest/DisposeInActionEventTest.java line 59:
> 57: " don't see a tray icon, please, make sure that the tray area\n" +
> 58: " (also called Taskbar Status Area on MS Windows, Notification\n" +
> 59: " Area on Gnome or System Tray on KDE) is visible.\n" +
Instructions look more clear with the addition of newlines as below.
Suggestion:
" Area on Gnome or System Tray on KDE) is visible.\n\n" +
test/jdk/java/awt/TrayIcon/DisposeInActionEventTest/DisposeInActionEventTest.java line 63:
> 61: " action event. Brief information about action events is printed\n" +
> 62: " in the frame. After each action event the tray icon is removed from\n" +
> 63: " the tray and then added back in a second.\n" +
Suggestion:
" the tray and then added back in a second.\n\n" +
test/jdk/java/awt/TrayIcon/DisposeInActionEventTest/DisposeInActionEventTest.java line 73:
> 71: .instructions(instructions)
> 72: .testTimeOut(10)
> 73: .rows(10)
Rows can be increased to 15.
Suggestion:
.rows(15)
test/jdk/java/awt/TrayIcon/DisposeInActionEventTest/DisposeInActionEventTest.java line 86:
> 84: textArea = new JTextArea();
> 85: frame.getContentPane().add(textArea);
> 86: frame.setSize(200, 200);
Frame width can be increased since the event details are obscured
test/jdk/java/awt/TrayIcon/DisposeInActionEventTest/DisposeInActionEventTest.java line 87:
> 85: frame.getContentPane().add(textArea);
> 86: frame.setSize(200, 200);
> 87: frame.setVisible(true);
You can remove `frame.setVisible(true);` as it is taken care of PassFailJFrame otherwise it causes the test frame to appear at a different location at starting of test before being moved to the final location.
test/jdk/java/awt/TrayIcon/DisposeInActionEventTest/DisposeInActionEventTest.java line 104:
> 102: trayIcon.setImageAutoSize(true);
> 103: trayIcon.addActionListener(ev -> {
> 104: textArea.append(ev.toString());
Similar changes to other places where textArea.append() is used.
Suggestion:
textArea.append(ev.toString() + "\n");
-------------
PR Review: https://git.openjdk.org/jdk/pull/17838#pullrequestreview-1896839959
PR Review Comment: https://git.openjdk.org/jdk/pull/17838#discussion_r1499880778
PR Review Comment: https://git.openjdk.org/jdk/pull/17838#discussion_r1499880983
PR Review Comment: https://git.openjdk.org/jdk/pull/17838#discussion_r1499881702
PR Review Comment: https://git.openjdk.org/jdk/pull/17838#discussion_r1499875818
PR Review Comment: https://git.openjdk.org/jdk/pull/17838#discussion_r1499868636
PR Review Comment: https://git.openjdk.org/jdk/pull/17838#discussion_r1499874403
More information about the client-libs-dev
mailing list