@ sub-do-hold-job-release-job - subroutine to Hold-Job, Release-Job @ Version 1.1 @ Last revised by Xerox Corporation on 12:00:00 99-03-12 PST. # Copyright (c) 1998 by Xerox Corporation. All rights reserved. # User is granted the right to modify this file for use with # the IPP Server Test Tool, as described in the file # LICENSE-IppTest.txt. # Input parameters: # None - except what is defined in MyPrinterDefs.test # # Output parameters: # None # @ @ Test for Section 3.11 - Submit two jobs, then hold the 2nd job @ right away using printer-uri and its job-id. @ no ipp-attribute-fidelity and no Job Template attributes @ Print-Job \ target: $target, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: en-us, \ printer-uri: $target, \ job-name: 'Section 3.11 1st Job',\ requesting-user-name: 'user 1', \ document-name: 'The File To Print', \ document-format: $requested-doc-format \ ) \ ), \ data: $test-print-file Expect Response \ status-code: 0, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: *, \ ... \ ), \ Job: ( \ first-job-id = job-id: *, \ first-job-uri = job-uri: *, \ job-state: pending | processing, \ ... \ ) \ ) Print-Job \ target: $target, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: en-us, \ printer-uri: $target, \ job-name: 'Section 3.11 2nd Job',\ requesting-user-name: 'user 1', \ document-name: 'The File To Print', \ document-format: $requested-doc-format \ ) \ ), \ data: $test-print-file Expect Response \ status-code: 0, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: *, \ ... \ ), \ Job: ( \ first-job-id = job-id: *, \ first-job-uri = job-uri: *, \ job-state: pending, \ ... \ ) \ ) @ @ Now Hold the 2nd job using the Printer-uri and job-id @ Hold-Job \ target: $target, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: en-us, \ printer-uri: $target, \ job-id: $first-job-id, \ ) \ ) Expect Response \ status-code: 0, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: *, \ ... \ ) \ ) Get-Job-Attributes \ target: $target, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: en-us, \ printer-uri: $target, \ job-id: $first-job-id, \ requested-attributes: \ ) \ ) Expect Response \ status-code: 0, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: *, \ ... \ ), \ Job: ( \ job-state: pending-held \ ) \ ) @ @ Now Hold the 2nd job AGAIN using the Printer-uri and job-id @ Holding a held job MUST be successful. @ Hold-Job \ target: $target, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: en-us, \ printer-uri: $target, \ job-id: $first-job-id, \ ) \ ) Expect Response \ status-code: 0, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: *, \ ... \ ) \ ) Get-Job-Attributes \ target: $target, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: en-us, \ printer-uri: $target, \ job-id: $first-job-id, \ requested-attributes: \ ) \ ) Expect Response \ status-code: 0, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: *, \ ... \ ), \ Job: ( \ job-state: pending-held \ ) \ ) @ @ The job should still be in the 'pending-held' job state @ Record the results and behavior in section 4.17. @ @ Now Release the 2nd job using the Printer-uri and job-id @ Release-Job \ target: $target, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: en-us, \ printer-uri: $target, \ job-id: $first-job-id \ ) \ ) Expect Response \ status-code: 0, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: *, \ ... \ ) \ ) Get-Job-Attributes \ target: $target, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: en-us, \ printer-uri: $target, \ job-id: $first-job-id, \ requested-attributes: \ ) \ ) Expect Response \ status-code: 0, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: *, \ ... \ ), \ Job: ( \ job-state: pending \ ) \ ) @ @ The 2nd job should still be in the 'pending' job state @ since the 1st job should still be in the 'processing' state. @ Record the results and behavior in section 4.17. @ @ Section 2.14.1 - Submit a 3rd job, then hold it right away @ using its job-uri. @ no ipp-attribute-fidelity and @ no Job Template attributes Print-Job \ target: $target, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: en-us, \ printer-uri: $target, \ job-name: 'Section 2.14 3rd Job',\ requesting-user-name: 'user 1', \ document-name: 'The File To Print', \ document-format: $requested-doc-format \ ) \ ), \ data: $test-print-file Expect Response \ status-code: 0, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: *, \ ... \ ), \ Job: ( \ first-job-id = job-id: *, \ first-job-uri = job-uri: *, \ job-state: pending, \ ... \ ) \ ) @ @ Now Hold the 3rd job using its job-uri @ Hold-Job \ target: $target, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: en-us, \ job-uri: $first-job-uri \ ) \ ) Expect Response \ status-code: 0, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: *, \ ... \ ) \ ) Get-Job-Attributes \ target: $target, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: en-us, \ printer-uri: $target, \ job-id: $first-job-id, \ requested-attributes: \ ) \ ) Expect Response \ status-code: 0, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: *, \ ... \ ), \ Job: ( \ job-state: pending-held \ ) \ ) @ @ Now REPEAT the same Hold-Job on the held job using its job-uri @ Holding a held job MUST be successful. @ Hold-Job \ target: $target, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: en-us, \ job-uri: $first-job-uri \ ) \ ) Expect Response \ status-code: 0, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: *, \ ... \ ) \ ) Get-Job-Attributes \ target: $target, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: en-us, \ printer-uri: $target, \ job-id: $first-job-id, \ requested-attributes: \ ) \ ) Expect Response \ status-code: 0, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: *, \ ... \ ), \ Job: ( \ job-state: pending-held \ ) \ ) @ @ The 3rd job should still be in the 'pending-held' job state @ @ Now Release the job using the job-uri @ Release-Job \ target: $target, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: en-us, \ job-uri: $first-job-uri \ ) \ ) Expect Response \ status-code: 0, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: *, \ ... \ ) \ ) @ @ The 3rd job should be in either the 'pending' job state @ Get-Job-Attributes \ target: $target, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: en-us, \ printer-uri: $target, \ job-id: $first-job-id, \ requested-attributes: \ ) \ ) Expect Response \ status-code: 0, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: *, \ ... \ ), \ Job: ( \ job-state: pending | processing \ ) \ ) @ @ The 3rd job should be in the 'pending' or 'processing' job state @ @ Submit a 4th job to be held indefinitely @ no ipp-attribute-fidelity and @ with OPTIONAL "job-hold-until"='indefinite' @ Since this operation attribute is OPTIONAL an implementation @ NEED NOT support it so this part of the test MAY fail. Print-Job \ target: $target, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: en-us, \ printer-uri: $target, \ job-name: 'Section 2.6 4th Job', \ document-name: 'The File To Print', \ document-format: $requested-doc-format \ ), \ Job: ( \ job-hold-until: (keyword) indefinite \ ) \ ), \ data: $test-print-file Expect Response \ status-code: 0, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: *, \ ... \ ), \ Job: ( \ first-job-id = job-id: *, \ first-job-uri = job-uri: *, \ job-state: pending-held, \ ... \ ) \ ) @ @ The job should be in the held state indefinitely @ Get-Job-Attributes \ target: $target, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: en-us, \ printer-uri: $target, \ job-id: $first-job-id, \ requested-attributes: \ ) \ ) Expect Response \ status-code: 0, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: *, \ ... \ ), \ Job: ( \ job-state: pending-held \ ) \ ) @ @ The job should still be in the 'pending-held' job state @