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:
parent
3208e3250d
commit
c759a1b212
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user