[jbossws-commits] JBossWS SVN: r3356 - trunk/build/hudson/jboss/bin.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Fri Jun 1 06:58:07 EDT 2007


Author: heiko.braun at jboss.com
Date: 2007-06-01 06:58:04 -0400 (Fri, 01 Jun 2007)
New Revision: 3356

Modified:
   trunk/build/hudson/jboss/bin/http-spider.sh
Log:
Rely on files instead of exit codes. Seems to interfere with hudson

Modified: trunk/build/hudson/jboss/bin/http-spider.sh
===================================================================
--- trunk/build/hudson/jboss/bin/http-spider.sh	2007-06-01 08:22:21 UTC (rev 3355)
+++ trunk/build/hudson/jboss/bin/http-spider.sh	2007-06-01 10:58:04 UTC (rev 3356)
@@ -10,32 +10,37 @@
 #
 # @author Heiko.Braun at jboss.com
 #
-# $Id: $
+# $Revision: $
 #
 #############################################################
 
-TIMEOUT=2           # wget timeout in sec
-SLEEP_TIME=10		# the actual sleep time in between test
-NUM_RETRIES=12 		# equals 120 seconds before exit
+TIMEOUT=10           # wget timeout in sec
+SLEEP_TIME=5			# the actual sleep time in between test
+NUM_RETRIES=2 			# equals 120 seconds before exit
 
 if [ "x$1" = "x" ]; then
-	echo "Usage: http.sh <hostname:port>"
-	exit 0	
+	echo "Usage: http.sh <hostname:port>"		
 fi
 
+# cleanup
+rm ./spider.success 2&>1 /dev/null
+rm ./spider.failed 2&>1 /dev/null
+
 COUNTER=0
 while [  $COUNTER -lt $NUM_RETRIES ]; do
 	if wget --spider --timeout=$TIMEOUT --tries=1 $1 &> /dev/null; then
-		echo "Try $COUNTER: '$1' is available"
+		touch ./spider.success
+		echo "Try $COUNTER: '$1' is available"	> ./spider.success
 		exit 0
 	else
-		echo "Try $COUNTER: '$1' does not respond, wait another $SLEEP_TIME seconds"		
+		echo "Try $COUNTER: '$1' does not respond, wait another $SLEEP_TIME seconds"
 	fi
 	sleep $SLEEP_TIME
 	let COUNTER=COUNTER+1 
 done
 
-echo "Unable to connect to $1, exiting..."
-exit 1
+touch ./spider.failed
+echo "Unable to connect to $1, exiting..." > spider.failed
+exit 0
 
 




More information about the jbossws-commits mailing list