On Tue, 21 Oct 2025 14:14:46 GMT, Anass Baya <[email protected]> wrote:

> The tests : 
>   test/jdk/java/awt/print/PrinterJob/PolylinePrintingTest.java
>   test/jdk/java/awt/print/PrinterJob/PageRanges.java      
>   
>   were failing because the Argument yesno to 'manual' option is invalid 
> the fix is as follow : 
> - Removed yesno
> - Used PassFailJFrame manual test framework 
> - add the missing keyboard  'test' to PolylinePrintingTest.java

Changes requested by aivanov (Reviewer).

test/jdk/java/awt/print/PrinterJob/PageRanges.java line 24:

> 22:  */
> 23: 
> 24: /**

Suggestion:

/*

Avoid using javadoc syntax for jtreg tags.

test/jdk/java/awt/print/PrinterJob/PageRanges.java line 26:

> 24: /**
> 25:  * @test
> 26:  * @bug 6575331 8320677

Bug id that don't modify the product code (JDK) aren't added to the list.

test/jdk/java/awt/print/PrinterJob/PageRanges.java line 51:

> 49:     public static void main(String args[]) throws Exception {
> 50:         PassFailJFrame passFailJFrame = new PassFailJFrame(INSTRUCTIONS);
> 51:         passFailJFrame.positionTestWindow(null, 
> PassFailJFrame.Position.HORIZONTAL);

Use `PassFailJFrame.builder()` to configure and create an instance of 
`PassFailJFrame`.

test/jdk/java/awt/print/PrinterJob/PageRanges.java line 57:

> 55:             System.out.println("No printer available");
> 56:             PassFailJFrame.forcePass();
> 57:         }

This is an anti-pattern, although it was used previously.

The test has `@key printer`, you can expect a printer is available. It's 
appropriate to fail the test in this case.

Alternatively, throw `jtreg.SkippedException` if printer is not available. Do 
it before you start creating `PassFailJFrame`.

test/jdk/java/awt/print/PrinterJob/PolylinePrintingTest.java line 24:

> 22:  */
> 23: 
> 24: /**

Suggestion:

/*

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

PR Review: https://git.openjdk.org/jdk/pull/27916#pullrequestreview-3361888951
PR Review Comment: https://git.openjdk.org/jdk/pull/27916#discussion_r2449143980
PR Review Comment: https://git.openjdk.org/jdk/pull/27916#discussion_r2449130033
PR Review Comment: https://git.openjdk.org/jdk/pull/27916#discussion_r2449132706
PR Review Comment: https://git.openjdk.org/jdk/pull/27916#discussion_r2449139704
PR Review Comment: https://git.openjdk.org/jdk/pull/27916#discussion_r2449144363

Reply via email to