Skip to content
Permalink
Browse files
8233567: [TESTBUG] FocusSubRequestTest.java fails on macos
Reviewed-by: azvegint, pbansal
  • Loading branch information
prsadhuk committed Apr 12, 2021
1 parent 125184e commit b90ad76d6b8a4b2096ae096252dead9626d7e09b
Showing with 11 additions and 10 deletions.
  1. +0 −1 test/jdk/ProblemList.txt
  2. +11 −9 test/jdk/java/awt/Focus/FocusSubRequestTest/FocusSubRequestTest.java
@@ -521,7 +521,6 @@ java/awt/Mouse/MouseComboBoxTest/MouseComboBoxTest.java 8233564 macosx-all
java/awt/Modal/NullModalityDialogTest/NullModalityDialogTest.java 8233565 macosx-all
java/awt/keyboard/AllKeyCode/AllKeyCode.java 8242930 macosx-all
java/awt/FullScreen/8013581/bug8013581.java 8169471 macosx-all
java/awt/Focus/FocusSubRequestTest/FocusSubRequestTest.java 8233567 macosx-all
java/awt/event/MouseEvent/RobotLWTest/RobotLWTest.java 8233568 macosx-all
java/awt/event/MouseEvent/MultipleMouseButtonsTest/MultipleMouseButtonsTest.java 8233568 macosx-all
java/awt/event/MouseEvent/ClickDuringKeypress/ClickDuringKeypress.java 8233568 macosx-all
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -62,6 +62,7 @@ public void keyPressed(KeyEvent e) {

try {
robot = new Robot();
robot.setAutoDelay(100);
} catch(Exception e) {
throw new RuntimeException("Error: unable to create robot", e);
}
@@ -77,7 +78,6 @@ public void start() {

robot.delay(100);
robot.keyPress(KeyEvent.VK_K);
robot.delay(100);
robot.keyRelease(KeyEvent.VK_K);

robot.waitForIdle();
@@ -90,14 +90,16 @@ public void start() {
}

private void waitTillShown(Component component) {
while (true) {
Point p = null;
while (p == null) {
try {
Thread.sleep(100);
component.getLocationOnScreen();
break;
} catch(InterruptedException ie) {
throw new RuntimeException(ie);
} catch(IllegalComponentStateException icse) {}
p = component.getLocationOnScreen();
} catch (IllegalStateException e) {
try {
Thread.sleep(500);
} catch (InterruptedException ie) {
}
}
}
}
}

3 comments on commit b90ad76

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot replied Apr 12, 2021

@TheRealMDoerr

This comment has been minimized.

Copy link
Contributor

@TheRealMDoerr TheRealMDoerr replied Oct 21, 2021

/backport jdk11u-dev

@openjdk

This comment has been minimized.

Copy link

@openjdk openjdk bot replied Oct 21, 2021

@TheRealMDoerr @TheRealMDoerr the backport was successfully created on the branch TheRealMDoerr-backport-b90ad76d in my personal fork of openjdk/jdk11u-dev. To create a pull request with this backport targeting openjdk/jdk11u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

this pull request contains a backport of commit b90ad76d from the openjdk/jdk repository.

The commit being backported was authored by Prasanta Sadhukhan on 12 Apr 2021 and was reviewed by Alexander Zvegintsev and Pankaj Bansal.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk11u-dev:

$ git fetch https://github.com/openjdk-bots/jdk11u-dev TheRealMDoerr-backport-b90ad76d:TheRealMDoerr-backport-b90ad76d
$ git checkout TheRealMDoerr-backport-b90ad76d
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk11u-dev TheRealMDoerr-backport-b90ad76d
Please sign in to comment.