tests: fix TEST-03-JOBS

We have

JOB UNIT                     TYPE  STATE
  1 testsuite.target         start waiting
 81 end.service              start waiting
187 sleep.service            start waiting
136 hello.service            start waiting
 82 testsuite.service        start running
135 hello-after-sleep.target start waiting

sometimes
This commit is contained in:
Evgeny Vereshchagin 2016-01-17 03:21:52 +00:00
parent 98ca53dac2
commit b46f4ef107

View file

@ -4,9 +4,12 @@
# installed job.
systemctl start --no-block hello-after-sleep.target
# sleep is now running, hello/start is waiting. Verify that:
systemctl list-jobs > /root/list-jobs.txt
grep 'sleep\.service.*running' /root/list-jobs.txt || exit 1
while ! grep 'sleep\.service.*running' /root/list-jobs.txt; do
systemctl list-jobs > /root/list-jobs.txt
done
grep 'hello\.service.*waiting' /root/list-jobs.txt || exit 1
# This is supposed to finish quickly, not wait for sleep to finish.