Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test suite: If holding supported, add a new print job for cancelling #438

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zdohnal
Copy link
Member

@zdohnal zdohnal commented Jul 27, 2022

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

@zdohnal
Copy link
Member Author

zdohnal commented Jul 27, 2022

@shirelyhhdl @sp1ritCS please test it and let me know whether it helps.

Copy link
Member

@michaelrsweet michaelrsweet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@zdohnal zdohnal force-pushed the s390x_test_failures branch from 062f126 to ca93a96 Compare July 27, 2022 17:09
@zdohnal zdohnal changed the title Test suite: Hold the job for cancelling Test suite: If holding supported, add a new print job for cancelling Jul 27, 2022
@zdohnal
Copy link
Member Author

zdohnal commented Jul 27, 2022

@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.

@zdohnal zdohnal requested a review from michaelrsweet July 27, 2022 17:30
@sp1ritCS
Copy link

I don't know how soon I'm able to test it, but I'll try

@zdohnal
Copy link
Member Author

zdohnal commented May 31, 2023

@sp1ritCS @shirelyhhdl any updates?

@michaelrsweet WDYT about the changes?

@zdohnal zdohnal added this to the v2.4.x milestone May 31, 2023
@michaelrsweet michaelrsweet modified the milestones: v2.4.x, v2.5 Jun 2, 2023
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.
@zdohnal zdohnal force-pushed the s390x_test_failures branch from ca93a96 to 851dc81 Compare January 26, 2024 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants