kill-on-timeout.should 380 Bytes
Newer Older
Mikael Salson's avatar
Mikael Salson committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14
# when task takes too many time it should be killed by should.py

./should --timeout 1 demo/tests/timeout.should
# Check that the script is not running anymore
ps awux | grep  'seq 1 10.*sleep' | grep -v grep || echo "not found"

$ The task must time out
1: timeout after

$ The elapsed time must be close to the timeout
r1:^1.[0-9]+s

$ The task must not run anymore
1:not found