RFR: 8339233: Test javax/swing/JButton/SwingButtonResizeTestWithOpenGL.java#id failed: Button renderings are different after window resize
Harshitha Onkar
honkar at openjdk.org
Sat Aug 31 00:33:18 UTC 2024
On Thu, 29 Aug 2024 19:07:29 GMT, Manukumar V S <mvs at openjdk.org> wrote:
> This is a highly intermittent failure, and it failed only once in CI on a particular windows machine and passed on all other runs.
>
> Failure reason:
> When the button was displayed for the first time, the focus rectangle drawn on the button text(Button A) was not seen(failure images attached in the bug).
>
> Fix:
> To stabilize the test, I have added a line -> button.setFocusPainted(false), so that the focus rectangle will not be painted
Since the following are on unchanged lines, I'm including it as a consolidated note:
1. robot.setAutoWaitForIdle(true);
robot.setAutoDelay(200);
doesn't change anything as there are no robot mouse or key events so it can be removed.
2. Individual `robot.delay()` can be added after UI creation and when frame state is changed to stabilize the test.
3. Frame is assigned null after disposing which is not required and can be removed.
private void disposeFrame() {
if (frame != null) {
frame.dispose();
frame = null;
}
}
-------------
PR Review: https://git.openjdk.org/jdk/pull/20777#pullrequestreview-2273688593
More information about the client-libs-dev
mailing list