-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8239801: [macos] java/awt/Focus/UnaccessibleChoice/AccessibleChoiceTest.java fails #11227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8239801: [macos] java/awt/Focus/UnaccessibleChoice/AccessibleChoiceTest.java fails #11227
Conversation
…visible. Add debug line and image for potential future failures.
|
👋 Welcome back dnguyen! A progress list of the required criteria for merging this PR into |
Webrevs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on Mac and Windows, test works well.
Minor suggestions added.
|
|
||
| // Save image to better debug the status of test when failing | ||
| Rectangle screenRect = new Rectangle(100, 200, | ||
| win.getWidth(), win.getHeight() + 20); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: You can capture the frame as well as window by using the following (it captures the entire testing screen).
GraphicsConfiguration ge = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration();
BufferedImage failImage = robot.createScreenCapture(ge.getBounds());
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can update it to capture the screen instead if that's preferred. I initially had it this way, but I figured it was better to just show the window that is being tested alone. If it's better to capture the whole screen for debugging purposes, I can make this change.
| throw new RuntimeException("Can't create robot"); | ||
| } | ||
| robot.waitForIdle(); | ||
| robot.delay(2000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is such a large delay required here since autoDelay and waitForIdle are also being called?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the proper amount is a delay of 1000. I can reduce this, but I thought it might be best to leave as much unchanged as possible. It does make sense to reduce it to 1000 if possible though.
|
@DamonGuy This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 128 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@azvegint) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
|
/integrate |
|
/sponsor |
|
Going to push as commit b6dddf4.
Your commit was automatically rebased without conflicts. |
|
@alisenchung @DamonGuy Pushed as commit b6dddf4. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
This is an older test that failed intermittently but had a fix specifically for mac systems by adding key presses on mac only. This test still intermittently failed after this fix long ago and was problem listed.
I ran this test 100 times on each OS after applying waitForIdle and delays between all key presses to match the delays previously present in the test.
I also added a debug line and save and image of the failing window upon failure to better debug if/when the test ever fails again. The debug line is to check if the previous fix for mac is relevant in the failure. The image shows the status of the window and what is focused at the time of failure.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/11227/head:pull/11227$ git checkout pull/11227Update a local copy of the PR:
$ git checkout pull/11227$ git pull https://git.openjdk.org/jdk pull/11227/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 11227View PR using the GUI difftool:
$ git pr show -t 11227Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/11227.diff