tests: kill all started processes on exit

Just killing MongoDB is not enough, we also need to kill processes such
as the cat ones used to read the fifo.

Change-Id: I3fd99e333e69625e3872e24b9337cad17d46d737
This commit is contained in:
Julien Danjou 2014-01-08 14:48:48 +01:00
parent 3208e3250d
commit c759a1b212
1 changed files with 1 additions and 4 deletions

View File

@ -4,9 +4,7 @@ set -e
function clean_exit(){
local error_code="$?"
rm -rf ${MONGO_DATA}
if [ "$MONGO_PID" ]; then
kill -9 ${MONGO_PID} || true
fi
kill $(jobs -p)
return $error_code
}
@ -33,7 +31,6 @@ then
exit 1
fi
mongod --maxConns 32 --nojournal --noprealloc --smallfiles --quiet --noauth --port ${MONGO_PORT} --dbpath "${MONGO_DATA}" --bind_ip localhost --config /dev/null &>${MONGO_DATA}/out &
MONGO_PID=$!
# Wait for Mongo to start listening to connections
while read line
do