waiting in a loop

This commit is contained in:
psklenar@redhat.com 2024-06-05 19:23:01 +02:00
commit 192c440049
2 changed files with 7 additions and 2 deletions

View file

@ -9,7 +9,7 @@ recommend:
- cups
- file
- ghostscript
duration: 40m
duration: 66m
enabled: true
tag:
- NoRHEL4

View file

@ -57,7 +57,12 @@ rlJournalStart
for f in $TEXT $PS $PDF $IMAGE
do
rlRun "lp -d $queue $f" 0 "Print a $f on $queue"
sleep 88
rlLog "Waiting for $queue in a loop, test could end here if error, do NOT IGNORE"
while [ `lpstat -o $queue | wc -l` -ne "0" ]
do
sleep 1
done
rlAssertEquals "No hanging jobs" `lpstat -o $queue | wc -l` 0
rlRun "file --mime /tmp/ps | grep charset" 0 "File exists"
rlRun "rm -f /tmp/ps"