Browse Source

Merge pull request #1025 from appropriate/improve-test-retries

Improve test retry output
Tianon Gravi 10 years ago
parent
commit
117fba937d

+ 1 - 0
test/tests/docker-dind/run.sh

@@ -29,6 +29,7 @@ while ! docker_ version &> /dev/null; do
 		docker_ version # to hopefully get a useful error message
 		false
 	fi
+	echo >&2 -n .
 	sleep 2
 done
 

+ 4 - 1
test/tests/jetty-hello-web/run.sh

@@ -33,9 +33,12 @@ while [ "$tried" -ge 0 -a "$(_request GET / --output /dev/null || echo $?)" = 7
 
 	if [ "$tried" -le 0 ]; then
 		echo >&2 "Unable to connect to Jetty. Aborting."
-		exit 1
+		( set -x && docker logs "$cid" ) >&2 || true
+		false
 	fi
 
+	echo >&2 -n .
+
 	sleep "$duration"
 done
 

+ 2 - 0
test/tests/mongo-basics/run.sh

@@ -20,9 +20,11 @@ while ! mongo_eval 'quit(db.stats().ok ? 0 : 1);' &> /dev/null; do
 	(( tries-- ))
 	if [ $tries -le 0 ]; then
 		echo >&2 'mongod failed to accept connections in a reasonable amount of time!'
+		( set -x && docker logs "$cid" ) >&2 || true
 		mongo --eval 'db.stats();' # to hopefully get a useful error message
 		false
 	fi
+	echo >&2 -n .
 	sleep 2
 done
 

+ 1 - 0
test/tests/mysql-basics/run.sh

@@ -42,6 +42,7 @@ while ! echo 'SELECT 1' | mysql &> /dev/null; do
 		echo 'SELECT 1' | mysql # to hopefully get a useful error message
 		false
 	fi
+	echo >&2 -n .
 	sleep 2
 done
 

+ 1 - 0
test/tests/mysql-initdb/run.sh

@@ -44,6 +44,7 @@ while ! echo 'SELECT 1' | mysql &> /dev/null; do
 		echo 'SELECT 1' | mysql # to hopefully get a useful error message
 		false
 	fi
+	echo >&2 -n .
 	sleep 2
 done
 

+ 1 - 0
test/tests/postgres-basics/run.sh

@@ -32,6 +32,7 @@ while ! echo 'SELECT 1' | psql &> /dev/null; do
 	(( tries-- ))
 	if [ $tries -le 0 ]; then
 		echo >&2 'postgres failed to accept connections in a reasonable amount of time!'
+		( set -x && docker logs "$cid" ) >&2 || true
 		echo 'SELECT 1' | psql # to hopefully get a useful error message
 		false
 	fi

+ 1 - 0
test/tests/postgres-initdb/run.sh

@@ -41,6 +41,7 @@ while ! echo 'SELECT 1' | psql &> /dev/null; do
 	(( tries-- ))
 	if [ $tries -le 0 ]; then
 		echo >&2 'postgres failed to accept connections in a reasonable amount of time!'
+		( set -x && docker logs "$cid" ) >&2 || true
 		echo 'SELECT 1' | psql # to hopefully get a useful error message
 		false
 	fi