RFR: 8316274: javax/swing/ButtonGroup/TestButtonGroupFocusTraversal.java fails in Ubuntu 23.10 with Motif LAF [v2]

Harshitha Onkar honkar at openjdk.org
Mon Oct 27 17:02:43 UTC 2025


On Sat, 25 Oct 2025 02:09:25 GMT, Alexander Zvegintsev <azvegint at openjdk.org> wrote:

>> The test began to fail in Ubuntu 23.10. While investigating, I found and filed two new issues:
>> 
>> * https://bugs.openjdk.org/browse/JDK-8370624 JToggleButton does not display caption if setAction is called
>>  e.g. setAction vs addActionListener 
>> <img width="287" height="86" alt="image" src="https://github.com/user-attachments/assets/28d24449-e5aa-41fb-a5f1-470ab11d6899" /> vs <img width="287" height="86" alt="image" src="https://github.com/user-attachments/assets/04cdd4ed-6ea4-403c-86c3-f60971d16007" />
>> * https://bugs.openjdk.org/browse/JDK-8370627 motif look and feel focus traversal order may vary depending on the system version
>> 
>> 
>> This test fix changes `setAction` to  `addActionListener` and it is to avoid problemlisting the test on Linux.
>> 
>> Testing looks good.
>
> Alexander Zvegintsev has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - title
>  - review comments

Changes requested by honkar (Reviewer).

test/jdk/javax/swing/ButtonGroup/TestButtonGroupFocusTraversal.java line 166:

> 164:                 if (!textFieldFirst.equals(KeyboardFocusManager.getCurrentKeyboardFocusManager()
> 165:                         .getFocusOwner())) {
> 166:                     robot.delay(100);

Test fails intermittently when run on local macOS (15.7.1). Increasing the delay here to 200-300ms seems to work.

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

PR Review: https://git.openjdk.org/jdk/pull/27979#pullrequestreview-3384557560
PR Review Comment: https://git.openjdk.org/jdk/pull/27979#discussion_r2466418972


More information about the client-libs-dev mailing list