Merge pull request #2852 from weaveworks/assert-no-defunct

Assert no defunct process is generated as a postcondition of all tests.
This commit is contained in:
Bryan Boreham authored and GitHub committed 2017-03-17 11:40:32 +00:00
commit fd0c53b424
1 file changed
+9
+9
View File
@@ -278,7 +278,16 @@ start_suite() {
whitely echo "$@"
}
# Common postconditions to assert on each host, after each test:
assert_common_postconditions() {
# Ensure we do not generate any defunct (a.k.a. zombie) process:
assert "run_on $1 ps aux | grep -c '[d]efunct'" "0"
}
end_suite() {
for host in $HOSTS; do
assert_common_postconditions "$host"
done
whitely assert_end
for host in $HOSTS; do
stop_weave_on $host