RFR: 8343736: Test java/awt/Focus/UnaccessibleChoice/AccessibleChoiceTest.java failed: Choice can't be controlled by keyboard

Alisen Chung achung at openjdk.org
Wed Nov 27 20:42:40 UTC 2024


On Fri, 22 Nov 2024 19:24:28 GMT, Damon Nguyen <dnguyen at openjdk.org> wrote:

> Test intermittently fails with a few different Exceptions. Initial report shows `Choice can't be controlled by keyboard` when failing. An additional report of an intermittent failure shows `Button does not have focus`.
> 
> Added some stability fixes. Additional delays, removed extraneous window, and added an additional focus check.
> 
> Debugged using additional screenshots during different failure points. Looks like sometimes the focus is still on the button. So, the delay has been added afterwards. Test passes on 22.04 Ubuntu machine with 100 repeats in CI. Also passed testing on all OS's with 50 repeats in CI.

test/jdk/java/awt/Focus/UnaccessibleChoice/AccessibleChoiceTest.java line 49:

> 47:  * @key headful
> 48:  * @summary Tests that Choice can be accessed and controlled by keyboard.
> 49:  */

not sure if this is important but test doesn't have an @run tag which might be good to include

test/jdk/java/awt/Focus/UnaccessibleChoice/AccessibleChoiceTest.java line 53:

> 51: public class AccessibleChoiceTest {
> 52:     //Declare things used in the test, like buttons and labels here
> 53:     Frame frame = new Frame("Accessible Choice Test Frame");

could probably remove the spaces - "AccessibleChoiceTest Frame"

test/jdk/java/awt/Focus/UnaccessibleChoice/AccessibleChoiceTest.java line 131:

> 129:         // Press Down key to select next item in the choice(Motif 2.1)
> 130:         // If bug exists we won't be able to do so
> 131:         robot.keyPress(KeyEvent.VK_DOWN);

delay on line 145 should be moved into the if-statement above it to prevent useless extra delay on non-mac systems

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22333#discussion_r1861218897
PR Review Comment: https://git.openjdk.org/jdk/pull/22333#discussion_r1861219501
PR Review Comment: https://git.openjdk.org/jdk/pull/22333#discussion_r1861221592


More information about the client-libs-dev mailing list