Disable mongod prealloc, wait for it to start
No prealloc should make mongod starts faster, and the while loop will wait it is listening before running the tests. Change-Id: Ia2ff201c0cfa882aa00bb7ce8ce990525f18339e
This commit is contained in:
parent
e84189590e
commit
d2578433b1
11
run-tests.sh
11
run-tests.sh
@ -24,7 +24,16 @@ fi
|
||||
# Main unit tests
|
||||
MONGO_DATA=`mktemp -d`
|
||||
trap "clean_exit" EXIT
|
||||
mongod --maxConns 32 --smallfiles --quiet --noauth --port 29000 --dbpath "${MONGO_DATA}" --bind_ip localhost &
|
||||
mkfifo ${MONGO_DATA}/out
|
||||
mongod --maxConns 32 --noprealloc --smallfiles --quiet --noauth --port 29000 --dbpath "${MONGO_DATA}" --bind_ip localhost &>${MONGO_DATA}/out &
|
||||
MONGO_PID=$!
|
||||
# Wait for Mongo to start listening to connections
|
||||
while read line
|
||||
do
|
||||
echo "$line" | grep -q 'waiting for connections on port' && break
|
||||
done < ${MONGO_DATA}/out
|
||||
# Read the fifo for ever otherwise mongod would block
|
||||
# + that gives us the log on screen
|
||||
cat ${MONGO_DATA}/out &
|
||||
export CEILOMETER_TEST_MONGODB_URL="mongodb://localhost:29000/ceilometer"
|
||||
python setup.py testr --slowest --testr-args="--concurrency=1 $*" $COVERAGE_ARG
|
||||
|
Loading…
Reference in New Issue
Block a user