about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2015-09-04 11:59:11 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2015-09-04 11:59:11 +0200
commit88ef82a2a8e398728e05ef91decd084de409a796 (patch)
tree578a6de2df718981353857990941886408073877
parent2556453d844f9d5224abd843ea2de3df1e8a0d42 (diff)
downloadnq-88ef82a2a8e398728e05ef91decd084de409a796.tar.gz
nq-88ef82a2a8e398728e05ef91decd084de409a796.tar.xz
nq-88ef82a2a8e398728e05ef91decd084de409a796.zip
tests: try to sleep out some race conditions in the test suite.
-rwxr-xr-xtests2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests b/tests
index 17ce704..0e664ad 100755
--- a/tests
+++ b/tests
@@ -27,6 +27,7 @@ cd test.dir
 printf '# nq tests\n'
 check 'fails with no arguments' ! $NQ
 check 'succeeds enqueuing true' 'f=$($NQ true)'
+sleep 1
 check 'generated a lockfile' test -f $f
 check 'lockfile contains exec line' grep -q exec.*nq.*true $f
 check 'lockfile contains status line' grep -q exited.*status.*0 $f
@@ -96,6 +97,7 @@ check 'killing fourth job' kill ${f4##*.}
 sleep 1
 check 'fq tracks third job' '($FQ ,* & p=$!; sleep 1; kill $p) | sed 3q | grep -q sleep.*300'
 check 'killing third job' kill ${f3##*.}
+sleep 1
 check 'fq outputs last job when no job running' '$FQ ,* | sed 3q | grep -q sleep.*400'
 )