Skip to content
This repository has been archived by the owner. It is now read-only.

8015886: java/awt/Focus/DeiconifiedFrameLoosesFocus/DeiconifiedFrameLoosesFocus.java sometimes failed on ubuntu #272

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -79,10 +79,12 @@ void test() {
frame.setExtendedState(Frame.ICONIFIED);

Util.waitForIdle(robot);
robot.delay(200);
Copy link
Member

@mrserb mrserb Jul 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember some similar issues, so I 'grep" our tests. Looks like usually a bigger delay is used, like 500 or even 1 second.

Copy link
Contributor

@prsadhuk prsadhuk Jul 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally we use delay of 1 sec after frame.setvisible and 500ms after events.

Can you also please rectify the wildcard imports? Did you try to give CI job running this test for several iterations in all platforms, if yes, can you post it in JBS?


frame.setExtendedState(Frame.NORMAL);

Util.waitForIdle(robot);
robot.delay(200);

if (!frame.isFocused()) {
throw new TestFailedException("the Frame didn't regain focus after restoring!");