RFR: 8320608: Many jtreg printing tests are missing the @printer keyword

Alexey Ivanov aivanov at openjdk.org
Thu Nov 23 20:42:04 UTC 2023


On Thu, 23 Nov 2023 11:27:08 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> Many printing tests do not have the @printer keyword. This adds them to those that need it.
>> I also found one test that has nothing to do with printing in the print folder and moved it out.
>
> test/jdk/java/awt/print/PageFormat/SetOrient.java line 28:
> 
>> 26:  * @summary Confirm that the clip and transform of the Graphics2D is
>> 27:  *          affected by the landscape orientation of the PageFormat.
>> 28:  */
> 
> Since this test calls `pjob.print();`, it requires a printer. Indeed, it fails without a printer:
> 
> 
> runner starting test: java/awt/print/PageFormat/SetOrient.html
> runner finished test: java/awt/print/PageFormat/SetOrient.html
> Failed. Execution failed: Applet thread threw exception:
>         java.lang.RuntimeException: No print service found.
> Test results: failed: 1

I see `SetOrient.java` has its sibling `SetOrient.html` where you added `@key printer`.

Since both files contain all the tags except for `@test` in the .java file, you should not remove the `@run` tag from the .java file and add `@key printer` to it.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16785#discussion_r1403712328


More information about the client-libs-dev mailing list