Test suite: If holding supported, add a new print job for cancelling#438
Open
zdohnal wants to merge 1 commit intoOpenPrinting:masterfrom
Open
Test suite: If holding supported, add a new print job for cancelling#438zdohnal wants to merge 1 commit intoOpenPrinting:masterfrom
zdohnal wants to merge 1 commit intoOpenPrinting:masterfrom
Conversation
Member
Author
|
@shirelyhhdl @sp1ritCS please test it and let me know whether it helps. |
michaelrsweet
requested changes
Jul 27, 2022
Member
michaelrsweet
left a comment
There was a problem hiding this comment.
The only problem with this change is that the "ipp-1.1.test" file is also meant to test real printers, many of which will not support job-hold-until. So the use of job-hold-until should be made conditional on whether job-hold-until is supported.
062f126 to
ca93a96
Compare
Member
Author
|
@michaelrsweet I haven't found out how to make a specific attribute optional, so I've added a new print job with job-hold-until if the printer supports it, and adjusted requests count in run-stp-tests.sh accordingly. |
|
I don't know how soon I'm able to test it, but I'll try |
Member
Author
|
@sp1ritCS @shirelyhhdl any updates? @michaelrsweet WDYT about the changes? |
On some quicker machines the print-job operation finishes quicker than we can cancel it in the test - so add job-hold-until job template attribute if the printer supports it, which will hold the job until it is cancelled by the next test. The next test passes because it has both statuses (correct and error one) as expected, but cupsd generates an additional error in log if the job cancelling fails, which would be more dirty to cover in run-stp-test.sh. There is a loophole when the error is still generated - if the printer/machine is quick enough to finish the job, but the machine/printer doesn't support job holding at the same time. IMHO the current patch should cover most cases.
ca93a96 to
851dc81
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On some quicker machines the print-job operation finishes quicker than
we can cancel it in the test - so add job-hold-until job template
attribute if the printer supports it, which will hold the job until it
is cancelled by the next test.
The next test passes because it has both statuses (correct and error one)
as expected, but cupsd generates an additional error in log if the job
cancelling fails, which would be more dirty to cover in run-stp-test.sh.
There is a loophole when the error is still generated - if the printer/machine
is quick enough to finish the job, but the machine/printer doesn't support job
holding at the same time. IMHO the current patch should cover most cases.
Fixes? #155