summaryrefslogtreecommitdiff
path: root/java/test-profiles
diff options
context:
space:
mode:
authorRajith Muditha Attapattu <rajith@apache.org>2010-05-07 19:29:01 +0000
committerRajith Muditha Attapattu <rajith@apache.org>2010-05-07 19:29:01 +0000
commit7ee6302f7208d2ae2c4957cc9b9ff0691a175c72 (patch)
tree334212aff284f0860fdb5e095414b9db92f9f754 /java/test-profiles
parentd4afc17724be6d7ab839e7486ea4d4a031bf266f (diff)
downloadqpid-python-7ee6302f7208d2ae2c4957cc9b9ff0691a175c72.tar.gz
Added a timeout when checking for broker start.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@942187 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/test-profiles')
-rwxr-xr-xjava/test-profiles/start-broker9
1 files changed, 8 insertions, 1 deletions
diff --git a/java/test-profiles/start-broker b/java/test-profiles/start-broker
index 1dc9cd4336..e0bbb89d87 100755
--- a/java/test-profiles/start-broker
+++ b/java/test-profiles/start-broker
@@ -23,7 +23,14 @@
# The entire broker command is passed as an argument.
-waitfor() { until grep -a -l "$2" $1 >/dev/null 2>&1 ; do sleep 1 ; done ; }
+waitfor() {
+ until grep -a -l "$2" $1 >/dev/null 2>&1
+ do
+ if [ $count == 10 ]; then return; fi;
+ sleep 1 ;
+ count=`expr $count + 1`;
+ done
+ }
sh $BROKER_CMD --log-to-file /tmp/broker.log &
waitfor /tmp/broker.log $BROKER_READY