[OpenJDK 2D-Dev] [9] RFR JDK-8158520: [TEST_BUG] java/awt/PrintJob/PrinterException.java fails on timeout

prasanta sadhukhan prasanta.sadhukhan at oracle.com
Fri Jun 3 14:07:48 UTC 2016


No, we do not really need to print anything but we need to show the 
printdialog to reproduce the previous bug. But to avoid human 
interaction ,we need to close the dialog so that jtreg should not fail 
in timeout.

I am not sure how to select "Cancel" in the print dialog automatically 
but Print or Cancel does not change the behaviour, so we are just 
pressing "Enter". In windows and linux, the "focus" is on print and in 
osx, the "focus" is on cancel.

Regards
Prasanta
On 6/3/2016 5:31 PM, Sergey Bylokhov wrote:
> Do we really need try to print something or cancel(ESC) will be enough 
> to reproduce the previous bug?
>
> On 03.06.16 14:46, prasanta sadhukhan wrote:
>> Please review a test bug which was added for bug 7161283.
>> Toolkit.getPrintJob() threw a NPE if no printer was available.
>>
>> Although the testcase was working ok in failure case by throwing NPE, in
>> pass case it was waiting for manual intervention causing jtreg to fail
>> on timeout.
>>
>> Made the testcase automated to use Robot to press Enter as the focus in
>> the dialog is in the "Print" button. Using Robot to press Enter closes
>> the dialog without the need for manual intervention.
>>
>> Tested on windows, linux and mac.
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8158520
>>
>> webrev: http://cr.openjdk.java.net/~psadhukhan/8158520/webrev.00/
>>
>>
>> Regards
>>
>> Prasanta
>>
>
>




More information about the 2d-dev mailing list