Skip to content

Conversation

@DamonGuy
Copy link
Contributor

@DamonGuy DamonGuy commented Nov 18, 2022

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

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8239801: [macos] java/awt/Focus/UnaccessibleChoice/AccessibleChoiceTest.java fails

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/11227/head:pull/11227
$ git checkout pull/11227

Update a local copy of the PR:
$ git checkout pull/11227
$ git pull https://git.openjdk.org/jdk pull/11227/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 11227

View PR using the GUI difftool:
$ git pr show -t 11227

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/11227.diff

…visible. Add debug line and image for potential future failures.
@bridgekeeper
Copy link

bridgekeeper bot commented Nov 18, 2022

👋 Welcome back dnguyen! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Nov 18, 2022
@openjdk
Copy link

openjdk bot commented Nov 18, 2022

@DamonGuy The following label will be automatically applied to this pull request:

  • client

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the client client-libs-dev@openjdk.org label Nov 18, 2022
@mlbridge
Copy link

mlbridge bot commented Nov 18, 2022

Webrevs

Copy link
Contributor

@honkar-jdk honkar-jdk left a 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);
Copy link
Contributor

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());

Copy link
Contributor Author

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);
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@openjdk
Copy link

openjdk bot commented Nov 22, 2022

@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:

8239801: [macos] java/awt/Focus/UnaccessibleChoice/AccessibleChoiceTest.java fails

Reviewed-by: honkar, azvegint

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 master branch:

  • 260e4dc: 8295011: EC point multiplication improvement for secp256r1
  • fb6c992: 8296957: One more cast in SAFE_SIZE_NEW_ARRAY2
  • ccc6e16: 8291067: macOS should use O_CLOEXEC instead of FD_CLOEXEC
  • 0ac5b55: 8297349: Parallel: Use correct claim value for CLD oop iteration in PSScavengeCLDClosure
  • 932bf35: 8297333: Parallel: Remove unused methods in PCIterateMarkAndPushClosure
  • 42c2037: 8297382: Test fails to compile after JDK-8288047
  • 6d6046b: 8252713: jtreg time out of CtrlASCII.java seems to hang the Xserver.
  • 88957a7: 8297147: UnexpectedSourceImageSize test times out on slow machines when fastdebug is used
  • 0696854: 8297299: SequenceInputStream should not use Vector
  • f0e99c6: 8297301: Cleanup unused methods in JavaUtilJarAccess
  • ... and 118 more: https://git.openjdk.org/jdk/compare/bd3acbea8c4ac0a9d3827a59bd736f0528b1b12b...master

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 in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Nov 22, 2022
@DamonGuy
Copy link
Contributor Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Nov 22, 2022
@openjdk
Copy link

openjdk bot commented Nov 22, 2022

@DamonGuy
Your change (at version 386edcb) is now ready to be sponsored by a Committer.

@alisenchung
Copy link
Contributor

/sponsor

@openjdk
Copy link

openjdk bot commented Nov 22, 2022

Going to push as commit b6dddf4.
Since your change was applied there have been 128 commits pushed to the master branch:

  • 260e4dc: 8295011: EC point multiplication improvement for secp256r1
  • fb6c992: 8296957: One more cast in SAFE_SIZE_NEW_ARRAY2
  • ccc6e16: 8291067: macOS should use O_CLOEXEC instead of FD_CLOEXEC
  • 0ac5b55: 8297349: Parallel: Use correct claim value for CLD oop iteration in PSScavengeCLDClosure
  • 932bf35: 8297333: Parallel: Remove unused methods in PCIterateMarkAndPushClosure
  • 42c2037: 8297382: Test fails to compile after JDK-8288047
  • 6d6046b: 8252713: jtreg time out of CtrlASCII.java seems to hang the Xserver.
  • 88957a7: 8297147: UnexpectedSourceImageSize test times out on slow machines when fastdebug is used
  • 0696854: 8297299: SequenceInputStream should not use Vector
  • f0e99c6: 8297301: Cleanup unused methods in JavaUtilJarAccess
  • ... and 118 more: https://git.openjdk.org/jdk/compare/bd3acbea8c4ac0a9d3827a59bd736f0528b1b12b...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Nov 22, 2022
@openjdk openjdk bot closed this Nov 22, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Nov 22, 2022
@openjdk
Copy link

openjdk bot commented Nov 22, 2022

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client client-libs-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

4 participants