RFR: 8321192 : j.a.PrintJob/ImageTest/ImageTest.java: Fail or skip the test if there's no printer

Alexey Ivanov aivanov at openjdk.org
Mon Feb 12 19:50:07 UTC 2024


On Fri, 9 Feb 2024 14:59:06 GMT, Renjith Kannath Pariyangad <rkannathpari at openjdk.org> wrote:

> Hi Reviewers,
> I have updated the test with 'PassFailJFrame' with programmatically generating image and print , please review and let me know your suggestions.

Changes requested by aivanov (Reviewer).

test/jdk/java/awt/PrintJob/ImageTest/ImageTest.java line 151:

> 149:         if (PrinterJob.lookupPrintServices().length == 0) {
> 150:             throw new SkippedException("Printer not configured or available."
> 151:                     + " Test cannot continue.");

As per the above discussion, fail the test if there's no printer.

Suggestion:

        if (PrinterJob.lookupPrintServices().length == 0) {
            throw new RuntimeException("Printer not configured or available.");

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

PR Review: https://git.openjdk.org/jdk/pull/17790#pullrequestreview-1876061200
PR Review Comment: https://git.openjdk.org/jdk/pull/17790#discussion_r1486688361


More information about the client-libs-dev mailing list