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

8270609: [TESTBUG] java/awt/print/Dialog/DialogCopies.java does not show instruction #4850

Closed
wants to merge 7 commits into from

Conversation

lawrence-andrew
Copy link
Contributor

@lawrence-andrew lawrence-andrew commented Jul 20, 2021

  1. When the test is executed via jtreg user can see only print dialog with no instruction to the user. User has to see the test case to see the instruction and perform the test .
  2. With this fix User is instructed what he/she has to do with the print dialog.
  3. I have added both success instruction as well as failure instruction.

@shurymury


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8270609: [TESTBUG] java/awt/print/Dialog/DialogCopies.java does not show instruction

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/4850/head:pull/4850
$ git checkout pull/4850

Update a local copy of the PR:
$ git checkout pull/4850
$ git pull https://git.openjdk.java.net/jdk pull/4850/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 4850

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/4850.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 20, 2021

👋 Welcome back lawrence-andrew! 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 Jul 20, 2021
@openjdk
Copy link

openjdk bot commented Jul 20, 2021

@lawrence-andrew The following label will be automatically applied to this pull request:

  • awt

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 awt client-libs-dev@openjdk.org label Jul 20, 2021
@mlbridge
Copy link

mlbridge bot commented Jul 21, 2021

Webrevs

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 18, 2021

@lawrence-andrew This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@openjdk openjdk bot added the client client-libs-dev@openjdk.org label Sep 10, 2021
@lawrence-andrew
Copy link
Contributor Author

Commenting to keep the PR open

@aivanov-jdk
Copy link
Member

aivanov-jdk commented Sep 14, 2021

The test is semi-automatic: it is able to determine whether it passes or fails depending on whether the number of copies in the print dialog is modified or not.

Is it possible to complete the test as soon as either OK or Cancel button is clicked on the Print dialog?

@aivanov-jdk
Copy link
Member

/label remove awt
/label add 2d

@openjdk
Copy link

openjdk bot commented Sep 14, 2021

@aivanov-jdk The label awt is not a valid label. These labels are valid:

  • serviceability
  • hotspot
  • hotspot-compiler
  • ide-support
  • kulla
  • i18n
  • shenandoah
  • jdk
  • javadoc
  • security
  • hotspot-runtime
  • jmx
  • build
  • nio
  • client
  • core-libs
  • compiler
  • net
  • hotspot-gc
  • hotspot-jfr

@openjdk
Copy link

openjdk bot commented Sep 14, 2021

@aivanov-jdk The label 2d is not a valid label. These labels are valid:

  • serviceability
  • hotspot
  • hotspot-compiler
  • ide-support
  • kulla
  • i18n
  • shenandoah
  • jdk
  • javadoc
  • security
  • hotspot-runtime
  • jmx
  • build
  • nio
  • client
  • core-libs
  • compiler
  • net
  • hotspot-gc
  • hotspot-jfr

@aivanov-jdk
Copy link
Member

Is it possible to complete the test as soon as either OK or Cancel button is clicked on the Print dialog?

The init() method is run on main thread. It's the thread which creates the Print Dialog. If the user clicks Cancel, the job.printDialog() returns false and the test should fail.

Then if the job.getCopies() == 1, the test also fails with the message that the number of copies wasn't increased.

If job.getCopies() > 1, the test passes automatically.

There's one thing though… I don't have a real printer installed but I have a PDF printer which doesn't allow increasing the number of copies. What should the test do in this case? If I click OK without modifying the number of copies, the test will fail; if I click Cancel, the test will also fail. However, this particular case falls into a category where the prerequisites aren't met.

Probably, the standard machinery with Sysout is an overkill for this simple scenario. You could show the instruction frame with only the text area which contains the instruction text.

@lawrence-andrew
Copy link
Contributor Author

I rewrote the test case to close the test ui if user click the OK or Cancel button & check for job.getCopies() value and make the testcase pass or fail.
You are right even I have the same issue in deciding whether to make the test case pass or fail if prerequisites aren't met. I hope all the client test machines are configured with printer.
Yes, Sysout is overkill, I am working just to show the test instruction in an frame & printDialog.

test/jdk/java/awt/print/Dialog/DialogCopies.java Outdated Show resolved Hide resolved
test/jdk/java/awt/print/Dialog/DialogCopies.java Outdated Show resolved Hide resolved
test/jdk/java/awt/print/Dialog/DialogCopies.java Outdated Show resolved Hide resolved
test/jdk/java/awt/print/Dialog/DialogCopies.java Outdated Show resolved Hide resolved
@openjdk
Copy link

openjdk bot commented Sep 17, 2021

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

8270609: [TESTBUG] java/awt/print/Dialog/DialogCopies.java does not show instruction

Reviewed-by: aivanov

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

  • 2a2e919: 8273685: Remove jtreg tag manual=yesno for java/awt/Graphics/LCDTextAndGraphicsState.java & show test instruction
  • 8302061: 8273774: CDSPluginTest should only expect classes_nocoops.jsa exists on supported 64-bit platforms
  • 2f8c221: 8273681: Add Vector API vs Arrays.mismatch intrinsic benchmark
  • 17f7a45: 8273913: Problem list some headful client jtreg tests that fail on macOS 12
  • 27d747a: 8273877: os::unsetenv unused
  • 35f6f1d: 8273808: Cleanup AddFontsToX11FontPath
  • 1890d85: 8273872: ZGC: Explicitly use 2M large pages
  • 54b4567: 8273880: Zero: Print warnings when unsupported intrinsics are enabled
  • e07ab82: 8273408: java.lang.AssertionError: typeSig ERROR on generated class property of record
  • 8c022e2: 8270434: JDI+UT: Unexpected event in JDI tests
  • ... and 660 more: https://git.openjdk.java.net/jdk/compare/38694aa970be73d269cb444ea80ebe7085bd9e90...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 (@aivanov-jdk) 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 Sep 17, 2021
@lawrence-andrew
Copy link
Contributor Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Sep 17, 2021
@openjdk
Copy link

openjdk bot commented Sep 17, 2021

@lawrence-andrew
Your change (at version 8de5ebf) is now ready to be sponsored by a Committer.

@aivanov-jdk
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Sep 20, 2021

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

  • 544193a: 8247980: Exclusive execution of java/util/stream tests slows down tier1
  • 1f8af52: 8273314: Add tier4 test groups
  • 699865f: 8259039: Passing different version to --release flag than javac version output warning
  • f71df14: 8273187: jtools tests fail with missing markerName check
  • 6f3e40c: 8273825: TestIRMatching.java fails after JDK-8266550
  • a561eac: 8273895: compiler/ciReplay/TestVMNoCompLevel.java fails due to wrong data size with TieredStopAtLevel=2,3
  • d2388b7: 8273959: Some metaspace diagnostic switches should be develop
  • dc7f452: 8273815: move have_special_privileges to os_posix for POSIX platforms
  • 7c9868c: 8273454: C2: Transform (-a)(-b) into ab
  • bb9d142: 8273958: gtest/MetaspaceGtests executes unnecessary tests in debug builds
  • ... and 670 more: https://git.openjdk.java.net/jdk/compare/38694aa970be73d269cb444ea80ebe7085bd9e90...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Sep 20, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and 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 Sep 20, 2021
@openjdk
Copy link

openjdk bot commented Sep 20, 2021

@aivanov-jdk @lawrence-andrew Pushed as commit 4da45c4.

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

@lawrence-andrew lawrence-andrew deleted the 8270609_ws branch September 20, 2021 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awt client-libs-dev@openjdk.org client client-libs-dev@openjdk.org integrated Pull request has been integrated
2 participants