-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
8270312: Error: Not a test or directory containing tests: java/awt/print/PrinterJob/XparColor.java #4769
Conversation
…int/PrinterJob/XparColor.java
Hi @lawrence-andrew, welcome to this OpenJDK project and thanks for contributing! We do not recognize you as Contributor and need to ensure you have signed the Oracle Contributor Agreement (OCA). If you have not signed the OCA, please follow the instructions. Please fill in your GitHub username in the "Username" field of the application. Once you have signed the OCA, please let us know by writing If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please use "Add GitHub user lawrence-andrew" as summary for the issue. If you are contributing this work on behalf of your employer and your employer has signed the OCA, please let us know by writing |
@lawrence-andrew The following label will be automatically applied to this pull request:
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. |
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.
I guess for applet/manual=yesno cases, it was decided not to tackle individual tests but to use some standard machinery for all such tests..Not sure if such idea has been dropped
May @prrace can throw some idea.
Otherwise it looks good...BTW, it does not timeout and hangs infinitely if left alone..it should timeout after sometime..did you check that case...
You can modify the copyright year too..
@prsadhuk , thanks for reviewing the test case. Yes, I checked for timeout tag but when I went though the jtreg documentation https://openjdk.java.net/jtreg/tag-spec.html under /manual[=(yesno|done)] found that we cannot add both /manual and /timeout together . According to the documentation "The /manual option may not be given in conjunction with the /timeout option." I even tried an run the test case and got the following error so decided not to add timeout. |
Since you mentioned about using metal rendering path to verify things. We need to pass -Dsun.java2d.metal=true as of now to run this test case using metal. We can add additional @run with metal enabled for this use case. |
Now this test will be executed both on metal and opengl |
@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:
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 392 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 (@prsadhuk, @jayathirthrao) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
/integrate |
@lawrence-andrew |
//Timed out, so fail the test | ||
throw new RuntimeException("Timed out after " + sleepTime / 1000 + " seconds"); | ||
} catch (InterruptedException e) { | ||
if (!testGeneratedInterrupt) throw e; |
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 guess timeout code is there here but for somehow it is not working as expected..Could you check?
Otherwise there are other ways of handling user interaction done in
java/awt/print/PrinterJob/BannerTest.java
java/awt/print/PrinterJob/TestSaveFileWithoutPrinter.java
Rewrote the code so that test can be started after pressing startTest button and now timeout is taken care. |
} | ||
|
||
private static void createAndShowTestDialog() { | ||
String testInstruction = "This testcase will be launched twice, once for opengl and once for metal.\n" + |
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.
The test is supposed to be run in all platforms, not only in mac. Since the default pipeline is not opengl in non-mac platform and also metal is not supported in non-mac platform, so this test instruction that it will run in opengl and metal is wrong in non-mac platform.
You probably need to modify to say it will be run in default pipeline for a particular platform and metal and subsequently check if the platform is non-mac and bail out if metal=true system property is set and inform user that metal cannot be run in present non-mac platform
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.
Thanks @prsadhuk, will modify the instruction
Fixed test instruction & add changes to execute the testcase on mac with default and metal pipeline and for non mac execute the testcase with default pipeline. |
|
||
private static void createAndShowTestDialog() { | ||
String testInstruction = "This testcase will be launched twice on mac platform and once on non mac platform.\n" + | ||
"On Mac once with default pipeline and once again with Metal pipeline.\n" + |
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 think it will be better to rephrase this line with "This test will be run with default pipeline in all OS and additionally with metal pipeline only in macOS"
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.
although I am not sure why it is important to run in metal pipeline. I don't think metal has any effect on printing par se.
Removed running the testcase in metal pipeline and corrected the instruction as per above comments. |
failButton.setEnabled(false); | ||
failButton.addActionListener((e) -> { | ||
dialog.dispose(); | ||
fail("PrinterException thrown."); |
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.
Looks ok now.. Just this minor thing of failure message should be corrected as PrinterException is not actually being thrown when it fails...probably the message should be "transparent ring colors are not printed correctly"
Fixed the exception string. |
/integrate |
@lawrence-andrew |
/sponsor |
Going to push as commit c5c84b8.
Your commit was automatically rebased without conflicts. |
@prsadhuk @lawrence-andrew Pushed as commit c5c84b8. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
@shurymury
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/4769/head:pull/4769
$ git checkout pull/4769
Update a local copy of the PR:
$ git checkout pull/4769
$ git pull https://git.openjdk.java.net/jdk pull/4769/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 4769
View PR using the GUI difftool:
$ git pr show -t 4769
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/4769.diff