RFR: 8196301: java/awt/print/PrinterJob/Margins.java times out

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

RFR: 8196301: java/awt/print/PrinterJob/Margins.java times out

Prasanta Sadhukhan-2
This test was timing out in windows in mach5 nightly testing. Investigation reveals that 70% of the time, it is failing due to printer being chosen was Microsoft Print to PDF which opens up a File Save Dialog when "OK" was clicked in printer pagedialog. Since no user intervention is done to dismiss the modal filedialog, so subsequent pagedialog was not dismissed resulting in timeout.
Other times, it was found that "One Note" software printer was used as default printerservice which again, opens up a OneNote app which again gets focus and obscure pagedialog so PageDialog did not get dismissed.
Updated test to ignore "Print To PDF", "OneNote" and "XPS Document Writer"(which again opens filedialog like PDF printer) and run it for several iteration in mach5 platforms which is ok. Link in JBS.

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

Commit messages:
 - 8196301: java/awt/print/PrinterJob/Margins.java times out

Changes: https://git.openjdk.java.net/jdk/pull/2598/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2598&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8196301
  Stats: 59 lines in 3 files changed: 39 ins; 18 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2598.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2598/head:pull/2598

PR: https://git.openjdk.java.net/jdk/pull/2598
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8196301: java/awt/print/PrinterJob/Margins.java times out

Alexander Zuev-3
On Wed, 17 Feb 2021 03:21:03 GMT, Prasanta Sadhukhan <[hidden email]> wrote:

> This test was timing out in windows in mach5 nightly testing. Investigation reveals that 70% of the time, it is failing due to printer being chosen was Microsoft Print to PDF which opens up a File Save Dialog when "OK" was clicked in printer pagedialog. Since no user intervention is done to dismiss the modal filedialog, so subsequent pagedialog was not dismissed resulting in timeout.
> Other times, it was found that "One Note" software printer was used as default printerservice which again, opens up a OneNote app which again gets focus and obscure pagedialog so PageDialog did not get dismissed.
> Updated test to ignore "Print To PDF", "OneNote" and "XPS Document Writer"(which again opens filedialog like PDF printer) and run it for several iteration in mach5 platforms which is ok. Link in JBS.

Shouldn't you update copyright years in the header of the test?

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

PR: https://git.openjdk.java.net/jdk/pull/2598
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8196301: java/awt/print/PrinterJob/Margins.java times out

Prasanta Sadhukhan-2
On Wed, 17 Feb 2021 17:34:22 GMT, Alexander Zuev <[hidden email]> wrote:

>> This test was timing out in windows in mach5 nightly testing. Investigation reveals that 70% of the time, it is failing due to printer being chosen was Microsoft Print to PDF which opens up a File Save Dialog when "OK" was clicked in printer pagedialog. Since no user intervention is done to dismiss the modal filedialog, so subsequent pagedialog was not dismissed resulting in timeout.
>> Other times, it was found that "One Note" software printer was used as default printerservice which again, opens up a OneNote app which again gets focus and obscure pagedialog so PageDialog did not get dismissed.
>> Updated test to ignore "Print To PDF", "OneNote" and "XPS Document Writer"(which again opens filedialog like PDF printer) and run it for several iteration in mach5 platforms which is ok. Link in JBS.
>
> Shouldn't you update copyright years in the header of the test?

No, it's not mandatory to update the copyright year as there is script that should update it at end of release.

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

PR: https://git.openjdk.java.net/jdk/pull/2598
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8196301: java/awt/print/PrinterJob/Margins.java times out

Phil Race
In reply to this post by Prasanta Sadhukhan-2
On Wed, 17 Feb 2021 03:21:03 GMT, Prasanta Sadhukhan <[hidden email]> wrote:

> This test was timing out in windows in mach5 nightly testing. Investigation reveals that 70% of the time, it is failing due to printer being chosen was Microsoft Print to PDF which opens up a File Save Dialog when "OK" was clicked in printer pagedialog. Since no user intervention is done to dismiss the modal filedialog, so subsequent pagedialog was not dismissed resulting in timeout.
> Other times, it was found that "One Note" software printer was used as default printerservice which again, opens up a OneNote app which again gets focus and obscure pagedialog so PageDialog did not get dismissed.
> Updated test to ignore "Print To PDF", "OneNote" and "XPS Document Writer"(which again opens filedialog like PDF printer) and run it for several iteration in mach5 platforms which is ok. Link in JBS.

The problem I have with this is that it does not scale.
It is a maintenance nightmare every possible "file printer" on Windows to every test.
and back porting it too ?
removing or disabling one note and the rest s supposed to be part of the set up of the test systems.

And when you say "70%" what is the other 30 % ?

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

PR: https://git.openjdk.java.net/jdk/pull/2598
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8196301: java/awt/print/PrinterJob/Margins.java times out

Prasanta Sadhukhan-2
On Wed, 17 Feb 2021 18:02:49 GMT, Phil Race <[hidden email]> wrote:

>> This test was timing out in windows in mach5 nightly testing. Investigation reveals that 70% of the time, it is failing due to printer being chosen was Microsoft Print to PDF which opens up a File Save Dialog when "OK" was clicked in printer pagedialog. Since no user intervention is done to dismiss the modal filedialog, so subsequent pagedialog was not dismissed resulting in timeout.
>> Other times, it was found that "One Note" software printer was used as default printerservice which again, opens up a OneNote app which again gets focus and obscure pagedialog so PageDialog did not get dismissed.
>> Updated test to ignore "Print To PDF", "OneNote" and "XPS Document Writer"(which again opens filedialog like PDF printer) and run it for several iteration in mach5 platforms which is ok. Link in JBS.
>
> The problem I have with this is that it does not scale.
> It is a maintenance nightmare every possible "file printer" on Windows to every test.
> and back porting it too ?
> removing or disabling one note and the rest s supposed to be part of the set up of the test systems.
>
> And when you say "70%" what is the other 30 % ?

other 30% is mixture of OneNote, XPS being used as printer service and timing issue which is why I moved the Thread start closer to actual pagedialog invocation.

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

PR: https://git.openjdk.java.net/jdk/pull/2598
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8196301: java/awt/print/PrinterJob/Margins.java times out

Prasanta Sadhukhan-2
On Wed, 17 Feb 2021 18:05:41 GMT, Prasanta Sadhukhan <[hidden email]> wrote:

>> The problem I have with this is that it does not scale.
>> It is a maintenance nightmare every possible "file printer" on Windows to every test.
>> and back porting it too ?
>> removing or disabling one note and the rest s supposed to be part of the set up of the test systems.
>>
>> And when you say "70%" what is the other 30 % ?
>
> other 30% is mixture of OneNote, XPS being used as printer service and timing issue which is why I moved the Thread start closer to actual pagedialog invocation.

Maybe @key printer is not being taken seriously during system setup which is why no real printer is being used.

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

PR: https://git.openjdk.java.net/jdk/pull/2598
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8196301: java/awt/print/PrinterJob/Margins.java times out

Phil Race
On Wed, 17 Feb 2021 18:07:27 GMT, Prasanta Sadhukhan <[hidden email]> wrote:

> Maybe @key printer is not being taken seriously during system setup which is why no real printer is being used.

That should be irrelevant. jtreg should only be invoking tests which do NOT have the printer keyword since the test job has this : keywords=headful & !printer which are handed directly to jtreg. In other words it is not filtering on whether there is actually a printer, but on whether the keyword is present.

So if this test is being invoked on tests which specify that then there's something badly wrong with jtreg or the harness is mangling it.

But I think this bug was filed back when this test was MISSING that keyword - it was added here
http://hg.openjdk.java.net/jdk/client/rev/f13dba72a5ea

So likely you should be focused on the timing issue and not the file printers

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

PR: https://git.openjdk.java.net/jdk/pull/2598
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8196301: java/awt/print/PrinterJob/Margins.java times out

Prasanta Sadhukhan-2
On Wed, 17 Feb 2021 18:50:11 GMT, Phil Race <[hidden email]> wrote:

>> Maybe @key printer is not being taken seriously during system setup which is why no real printer is being used.
>
>> Maybe @key printer is not being taken seriously during system setup which is why no real printer is being used.
>
> That should be irrelevant. jtreg should only be invoking tests which do NOT have the printer keyword since the test job has this : keywords=headful & !printer which are handed directly to jtreg. In other words it is not filtering on whether there is actually a printer, but on whether the keyword is present.
>
> So if this test is being invoked on tests which specify that then there's something badly wrong with jtreg or the harness is mangling it.
>
> But I think this bug was filed back when this test was MISSING that keyword - it was added here
> http://hg.openjdk.java.net/jdk/client/rev/f13dba72a5ea
>
> So likely you should be focused on the timing issue and not the file printers

As I told, I already fixed the timing issue too by moving thread start to pass ENTER keypress closer to actual pagedialog invocation and the mach5 job where all the tests passed is there in JBS.

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

PR: https://git.openjdk.java.net/jdk/pull/2598
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8196301: java/awt/print/PrinterJob/Margins.java times out

Prasanta Sadhukhan-2
In reply to this post by Phil Race
On Wed, 17 Feb 2021 18:50:11 GMT, Phil Race <[hidden email]> wrote:

> That should be irrelevant. jtreg should only be invoking tests which do NOT have the printer keyword since the test job has this : keywords=headful & !printer which are handed directly to jtreg. In other words it is not filtering on whether there is actually a printer, but on whether the keyword is present.
>
> So if this test is being invoked on tests which specify that then there's something badly wrong with jtreg or the harness is mangling it.

I have to change script to have keywords=headful & printer as it was not running this test in mach5 without it.

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

PR: https://git.openjdk.java.net/jdk/pull/2598
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8196301: java/awt/print/PrinterJob/Margins.java times out

Prasanta Sadhukhan-2
On Thu, 18 Feb 2021 03:40:24 GMT, Prasanta Sadhukhan <[hidden email]> wrote:

>>> Maybe @key printer is not being taken seriously during system setup which is why no real printer is being used.
>>
>> That should be irrelevant. jtreg should only be invoking tests which do NOT have the printer keyword since the test job has this : keywords=headful & !printer which are handed directly to jtreg. In other words it is not filtering on whether there is actually a printer, but on whether the keyword is present.
>>
>> So if this test is being invoked on tests which specify that then there's something badly wrong with jtreg or the harness is mangling it.
>>
>> But I think this bug was filed back when this test was MISSING that keyword - it was added here
>> http://hg.openjdk.java.net/jdk/client/rev/f13dba72a5ea
>>
>> So likely you should be focused on the timing issue and not the file printers
>
>> That should be irrelevant. jtreg should only be invoking tests which do NOT have the printer keyword since the test job has this : keywords=headful & !printer which are handed directly to jtreg. In other words it is not filtering on whether there is actually a printer, but on whether the keyword is present.
>>
>> So if this test is being invoked on tests which specify that then there's something badly wrong with jtreg or the harness is mangling it.
>
> I have to change script to have keywords=headful & printer as it was not running this test in mach5 without it.

Since this is one of the few printer test which is automated, it will fail locally too if someone has "Print to PDF", "XPS" or "OneNote" printer as default since it will open up filedialog or app which will prevent the focus to be on "OK" button of pagedialog, so the fix is applicable locally too, so I would like this fix to be considered.

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

PR: https://git.openjdk.java.net/jdk/pull/2598
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8196301: java/awt/print/PrinterJob/Margins.java times out

Phil Race
On Fri, 19 Feb 2021 04:03:00 GMT, Prasanta Sadhukhan <[hidden email]> wrote:

> Since this is one of the few printer test which is automated, it will fail locally too if someone has "Print to PDF", "XPS" or "OneNote" printer as default since it will open up filedialog or app which will prevent the focus to be on "OK" button of pagedialog, so the fix is applicable locally too, so I would like this fix to be considered.

There are other automated print tests. I know I used to spit out a bunch of pages just doing PIT. I think this is the wrong approach.
@requires should not be confused with keywords.
The checks for PDF printers are not appropriate.

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

PR: https://git.openjdk.java.net/jdk/pull/2598
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8196301: java/awt/print/PrinterJob/Margins.java times out [v2]

Prasanta Sadhukhan-2
In reply to this post by Prasanta Sadhukhan-2
> This test was timing out in windows in mach5 nightly testing. Investigation reveals that 70% of the time, it is failing due to printer being chosen was Microsoft Print to PDF which opens up a File Save Dialog when "OK" was clicked in printer pagedialog. Since no user intervention is done to dismiss the modal filedialog, so subsequent pagedialog was not dismissed resulting in timeout.
> Other times, it was found that "One Note" software printer was used as default printerservice which again, opens up a OneNote app which again gets focus and obscure pagedialog so PageDialog did not get dismissed.
> Updated test to ignore "Print To PDF", "OneNote" and "XPS Document Writer"(which again opens filedialog like PDF printer) and run it for several iteration in mach5 platforms which is ok. Link in JBS.

Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:

  Remove pdf printer check

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/2598/files
  - new: https://git.openjdk.java.net/jdk/pull/2598/files/d8d6b702..783374c0

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2598&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2598&range=00-01

  Stats: 7 lines in 1 file changed: 0 ins; 7 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2598.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2598/head:pull/2598

PR: https://git.openjdk.java.net/jdk/pull/2598
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8196301: java/awt/print/PrinterJob/Margins.java times out [v2]

Phil Race
On Fri, 19 Feb 2021 04:34:51 GMT, Prasanta Sadhukhan <[hidden email]> wrote:

>> This test was timing out in windows in mach5 nightly testing. Investigation reveals that 70% of the time, it is failing due to printer being chosen was Microsoft Print to PDF which opens up a File Save Dialog when "OK" was clicked in printer pagedialog. Since no user intervention is done to dismiss the modal filedialog, so subsequent pagedialog was not dismissed resulting in timeout.
>> Other times, it was found that "One Note" software printer was used as default printerservice which again, opens up a OneNote app which again gets focus and obscure pagedialog so PageDialog did not get dismissed.
>> Updated test to ignore "Print To PDF", "OneNote" and "XPS Document Writer"(which again opens filedialog like PDF printer) and run it for several iteration in mach5 platforms which is ok. Link in JBS.
>
> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>
>   Remove pdf printer check

Marked as reviewed by prr (Reviewer).

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

PR: https://git.openjdk.java.net/jdk/pull/2598
Reply | Threaded
Open this post in threaded view
|

Integrated: 8196301: java/awt/print/PrinterJob/Margins.java times out

Prasanta Sadhukhan-2
In reply to this post by Prasanta Sadhukhan-2
On Wed, 17 Feb 2021 03:21:03 GMT, Prasanta Sadhukhan <[hidden email]> wrote:

> This test was timing out in windows in mach5 nightly testing. Investigation reveals that 70% of the time, it is failing due to printer being chosen was Microsoft Print to PDF which opens up a File Save Dialog when "OK" was clicked in printer pagedialog. Since no user intervention is done to dismiss the modal filedialog, so subsequent pagedialog was not dismissed resulting in timeout.
> Other times, it was found that "One Note" software printer was used as default printerservice which again, opens up a OneNote app which again gets focus and obscure pagedialog so PageDialog did not get dismissed.
> Updated test to ignore "Print To PDF", "OneNote" and "XPS Document Writer"(which again opens filedialog like PDF printer) and run it for several iteration in mach5 platforms which is ok. Link in JBS.

This pull request has now been integrated.

Changeset: ed93bc9a
Author:    Prasanta Sadhukhan <[hidden email]>
URL:       https://git.openjdk.java.net/jdk/commit/ed93bc9a
Stats:     52 lines in 3 files changed: 32 ins; 18 del; 2 mod

8196301: java/awt/print/PrinterJob/Margins.java times out

Reviewed-by: prr

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

PR: https://git.openjdk.java.net/jdk/pull/2598
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8196301: java/awt/print/PrinterJob/Margins.java times out [v2]

Sergey Bylokhov-2
In reply to this post by Prasanta Sadhukhan-2
On Fri, 19 Feb 2021 04:34:51 GMT, Prasanta Sadhukhan <[hidden email]> wrote:

>> This test was timing out in windows in mach5 nightly testing. Investigation reveals that 70% of the time, it is failing due to printer being chosen was Microsoft Print to PDF which opens up a File Save Dialog when "OK" was clicked in printer pagedialog. Since no user intervention is done to dismiss the modal filedialog, so subsequent pagedialog was not dismissed resulting in timeout.
>> Other times, it was found that "One Note" software printer was used as default printerservice which again, opens up a OneNote app which again gets focus and obscure pagedialog so PageDialog did not get dismissed.
>> Updated test to ignore "Print To PDF", "OneNote" and "XPS Document Writer"(which again opens filedialog like PDF printer) and run it for several iteration in mach5 platforms which is ok. Link in JBS.
>
> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>
>   Remove pdf printer check

test/jdk/java/awt/print/PrinterJob/Margins.java line 78:

> 76:             robot.keyRelease(KeyEvent.VK_ENTER);
> 77:         });
> 78:         t1.start();

Don't you need to wait until the t1(and others) thread completes? You call start() but the actual execution may not start till the end of the test.

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

PR: https://git.openjdk.java.net/jdk/pull/2598