RFR: 8315804: Open source several Swing JTabbedPane JTextArea JTextField tests

Harshitha Onkar honkar at openjdk.org
Fri Sep 15 23:00:42 UTC 2023


On Thu, 14 Sep 2023 16:35:44 GMT, Damon Nguyen <dnguyen at openjdk.org> wrote:

> These are the tests being converted:
> 
> javax/swing/JTabbedPane/4703690/bug4703690.java
> javax/swing/JTabbedPane/GetComponentAt/GetComponentAtTest.java
> javax/swing/JTabbedPane/ReplaceCompTab/ReplaceCompTab.java
> javax/swing/JTextArea/4849868/bug4849868.java
> javax/swing/JTextField/4244613/bug4244613.java

LGTM with some minor nits

test/jdk/javax/swing/JTabbedPane/ReplaceCompTab.java line 46:

> 44:     static JFrame f;
> 45: 
> 46:     public static void main(String[] args) throws InterruptedException,

Generic Exception can be thrown

test/jdk/javax/swing/JTabbedPane/ReplaceCompTab.java line 75:

> 73:                 } catch (Exception e) {
> 74:                     System.out.println(e);
> 75:                     e.printStackTrace();

These lines are not required since RuntimeException is being thrown subsequently.

test/jdk/javax/swing/JTabbedPane/bug4703690.java line 129:

> 127:             robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
> 128: 
> 129:             robot.delay(1000);

Do we require a large amount of delay here?  ideally ~200-300 would work I guess.

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

Marked as reviewed by honkar (Committer).

PR Review: https://git.openjdk.org/jdk/pull/15747#pullrequestreview-1629805315
PR Review Comment: https://git.openjdk.org/jdk/pull/15747#discussion_r1327845819
PR Review Comment: https://git.openjdk.org/jdk/pull/15747#discussion_r1327846278
PR Review Comment: https://git.openjdk.org/jdk/pull/15747#discussion_r1327846856


More information about the client-libs-dev mailing list