Navigation Menu

Skip to content
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

8293811: Provide a reason for PassFailJFrame.forceFail #10269

Closed

Conversation

aivanov-jdk
Copy link
Member

@aivanov-jdk aivanov-jdk commented Sep 14, 2022

Add forceFail implementation which allows passing the reason why the test is failed.

I used the newly added method forceFail(reason) instead of throwing an exception in PrintAllPagesTest. When the test is run outside of jtreg and printing is cancelled, the the test UI becomes “hung”: clicking Pass or Fail or closing windows does not stop the test.

I also converted the ret field to local variable.

In addition to this, I reduced the size of the test frame, its size of 1000×800 doesn't fit even full HD screens when positioned close to the instruction frame.


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-8293811: Provide a reason for PassFailJFrame.forceFail

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 10269

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

Using diff file

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

Use forceFail(reason) instead of throwing an exception
in PrintAllPagesTest. This prevents the test UI from becoming hung
when it's run outside of jtreg.
The test frame of 1000×800 doesn't fit the screen when positioned
along the instruction frame. The test doesn't depend on it being
so large.
@bridgekeeper
Copy link

bridgekeeper bot commented Sep 14, 2022

👋 Welcome back aivanov! 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 Sep 14, 2022
@openjdk
Copy link

openjdk bot commented Sep 14, 2022

@aivanov-jdk 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 Sep 14, 2022
@mlbridge
Copy link

mlbridge bot commented Sep 14, 2022

Webrevs

@lawrence-andrew
Copy link
Contributor

LGTM

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.

Addition of reason to force fail test makes it more clear. Changes look good.

Copy link
Member

@jayathirthrao jayathirthrao left a comment

Choose a reason for hiding this comment

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

If there are other tests where we can use PassFailJFrame.forceFail(String) instead of throwing RuntimeException, we should raise a bug and keep it for tracking.

LGTM.

@openjdk
Copy link

openjdk bot commented Sep 15, 2022

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

8293811: Provide a reason for PassFailJFrame.forceFail

Reviewed-by: honkar, jdv

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 6 new commits pushed to the master branch:

  • eeb625e: 8290169: adlc: Improve child constraints for vector unary operations
  • 2057070: 8293815: P11PSSSignature.engineUpdate should not print debug messages during normal operation
  • 7376c55: 8293769: RISC-V: Add a second temporary register for BarrierSetAssembler::load_at
  • d191e47: 8293768: Add links to JLS 19 and 20 from SourceVersion enum constants
  • a75ddb8: 8293122: (fs) Use file cloning in macOS version of Files::copy method
  • 95c7c55: 8293402: hs-err file printer should reattempt stack trace printing if it fails

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
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.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 15, 2022
@aivanov-jdk
Copy link
Member Author

If there are other tests where we can use PassFailJFrame.forceFail(String) instead of throwing RuntimeException, we should raise a bug and keep it for tracking.

LGTM.

That's the only test I know about.

jtreg handles it gracefully, so it's not a very big issue. At the same time, we should handle the case where exception is thrown from the code which prepares the test. It is one of problems to be addressed.

@aivanov-jdk
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Sep 19, 2022

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

  • f91762f: 8293965: Code signing warnings after JDK-8293550
  • 8082c24: 8054572: [macosx] JComboBox paints the border incorrectly
  • b920d29: 8271328: User is able to choose the color after disabling the color chooser.
  • 5725a93: 8293879: Remove unnecessary castings in jdk.hotspot.agent
  • ab7f58a: 6286501: JTabbedPane throws NPE from its stateChanged listener in particular case
  • d41f69f: 8293849: PrintIdealPhase in compiler directives file is ignored when used with other compile commands
  • 471e2f1: 8292088: C2: assert(is_OuterStripMinedLoop()) failed: invalid node class: IfTrue
  • a93cf92: 8293920: G1: Add index based heap region iteration
  • 36c9034: 8293808: mscapi destroyKeyContainer enhance KeyStoreException: Access is denied exception
  • cbd0688: 8293851: hs_err should print more stack in hex dump
  • ... and 42 more: https://git.openjdk.org/jdk/compare/211fab8d361822bbd1a34a88626853bf4a029af5...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Sep 19, 2022

@aivanov-jdk Pushed as commit 64b96e5.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@aivanov-jdk aivanov-jdk deleted the 8293811-forceFail-reason branch September 26, 2022 16:07
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
4 participants