couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject [couchdb] branch 749-fix-couch_peruser-app-structure updated: feat: mango test runner: do not rely on timeout for CouchDB start alone
Date Sun, 01 Oct 2017 11:15:21 GMT
This is an automated email from the ASF dual-hosted git repository.

jan pushed a commit to branch 749-fix-couch_peruser-app-structure
in repository https://gitbox.apache.org/repos/asf/couchdb.git


The following commit(s) were added to refs/heads/749-fix-couch_peruser-app-structure by this
push:
     new 81b108e  feat: mango test runner: do not rely on timeout for CouchDB start alone
81b108e is described below

commit 81b108e0078faebc6b656ae978ddb6090dd0a784
Author: Jan Lehnardt <jan@apache.org>
AuthorDate: Sun Oct 1 13:14:43 2017 +0200

    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.
---
 test/build/test-run-couch-for-mango.sh | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/test/build/test-run-couch-for-mango.sh b/test/build/test-run-couch-for-mango.sh
index 3decdec..e837be1 100755
--- a/test/build/test-run-couch-for-mango.sh
+++ b/test/build/test-run-couch-for-mango.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/sh -x
 # Licensed under the Apache License, Version 2.0 (the "License"); you may not
 # use this file except in compliance with the License. You may obtain a copy of
 # the License at
@@ -13,13 +13,22 @@
 
 ./dev/run -n 1 --admin=testuser:testpass &
 export SERVER_PID=$!
-sleep 10
-curl http://dev:15984
-cd src/mango/ 
+
+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
 
 EXIT_STATUS=$?
 if [[ ! -z $SERVER_PID ]]; then
   kill $SERVER_PID
 fi
-exit $EXIT_STATUS
\ No newline at end of file
+exit $EXIT_STATUS

-- 
To stop receiving notification emails like this one, please contact
['"commits@couchdb.apache.org" <commits@couchdb.apache.org>'].

Mime
View raw message