diff options
author | Jan Lehnardt <jan@apache.org> | 2017-10-01 13:14:43 +0200 |
---|---|---|
committer | Joan Touzet <joant@atypical.net> | 2017-10-10 17:23:37 -0400 |
commit | 7da9d8bb7e0b54aad9ddc17681f71c4cf7ec66d7 (patch) | |
tree | a778afd880348104a5472ec4b9ec340625eabf81 | |
parent | b12683ce7a85d28b868128b74eb06f184047c5d2 (diff) | |
download | couchdb-7da9d8bb7e0b54aad9ddc17681f71c4cf7ec66d7.tar.gz |
feat: mango test runner: do not rely on timeout for CouchDB start alone
On slow build nodes, 10 seconds might not be enough of a wait.
-rwxr-xr-x | test/build/test-run-couch-for-mango.sh | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/test/build/test-run-couch-for-mango.sh b/test/build/test-run-couch-for-mango.sh index 6034a794c..0597a8fca 100755 --- a/test/build/test-run-couch-for-mango.sh +++ b/test/build/test-run-couch-for-mango.sh @@ -13,8 +13,17 @@ ./dev/run -n 1 --admin=testuser:testpass & export SERVER_PID=$! -sleep 10 -curl http://dev:15984 + +COUCH_STARTED=-1 +while ( [ $COUCH_STARTED -ne 0 ] ); do + curl -s http://127.0.0.1:15984 + COUCH_STARTED=$? + if [ $COUCH_STARTED -ne 0 ]; then + # do not wait another 5 seconds if couch started now + sleep 5 + fi +done + cd src/mango/ nosetests |