diff --git a/run-tests.sh b/run-tests.sh index 23c7edea6..2c3a66e0d 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -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