diff options
author | Alex Rudyy <orudyy@apache.org> | 2015-04-20 15:02:40 +0000 |
---|---|---|
committer | Alex Rudyy <orudyy@apache.org> | 2015-04-20 15:02:40 +0000 |
commit | 5fb871ef9a1bd0484831363887168fb4a6d3ac7d (patch) | |
tree | 9d91e3d5badb30ae09247ce4ffa9b19d372c4bfb | |
parent | ea16e50919f21fbab181e20e25b03d1a314634c8 (diff) | |
download | qpid-python-5fb871ef9a1bd0484831363887168fb4a6d3ac7d.tar.gz |
NO-JIRA: Add into ant script for running python tests a condition to wait for a READY entry in Java Broker log file
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1674911 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | qpid/python/qpid-python-test-ant.xml | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/qpid/python/qpid-python-test-ant.xml b/qpid/python/qpid-python-test-ant.xml index a6f6ab5b32..f70e8923ed 100644 --- a/qpid/python/qpid-python-test-ant.xml +++ b/qpid/python/qpid-python-test-ant.xml @@ -46,7 +46,7 @@ <!-- Time to wait for socket to be bound --> <property name="ensurefree.maxwait" value="1000"/> - <property name="start.maxwait" value="10000"/> + <property name="start.maxwait" value="20000"/> <property name="stop.maxwait" value="10000"/> <property name="socket.checkevery" value="1000"/> @@ -79,6 +79,11 @@ </exec> <await-port-bound port="${qpid.port}" maxwait="${start.maxwait}" checkevery="${socket.checkevery}" timeoutproperty="start.timeout"/> + <antcall target="wait-for-broker-ready"/> + </target> + + <target name="wait-for-broker-ready" if="java.broker"> + <await-broker-log path="${test.work.dir}/log/qpid.log" entry="BRK-1004" maxwait="${start.maxwait}" checkevery="${socket.checkevery}" timeoutproperty="start.timeout"/> </target> <target name="stop-broker" depends="init"> @@ -150,7 +155,7 @@ <attribute name="timeoutproperty"/> <attribute name="port"/> <sequential> - <waitfor maxwait="@{maxwait}" maxwaitunit="millisecond" checkevery="@{checkevery}" checkeveryunit="millisecond" timeoutproperty="@timeoutproperty"> + <waitfor maxwait="@{maxwait}" maxwaitunit="millisecond" checkevery="@{checkevery}" checkeveryunit="millisecond" timeoutproperty="@{timeoutproperty}"> <not> <socket server="localhost" port="@{port}"/> </not> @@ -164,9 +169,24 @@ <attribute name="timeoutproperty"/> <attribute name="port"/> <sequential> - <waitfor maxwait="@{maxwait}" maxwaitunit="millisecond" checkevery="@{checkevery}" checkeveryunit="millisecond" timeoutproperty="@timeoutproperty"> + <waitfor maxwait="@{maxwait}" maxwaitunit="millisecond" checkevery="@{checkevery}" checkeveryunit="millisecond" timeoutproperty="@{timeoutproperty}"> <socket server="localhost" port="@{port}"/> </waitfor> </sequential> </macrodef> + + <macrodef name="await-broker-log"> + <attribute name="maxwait"/> + <attribute name="checkevery"/> + <attribute name="timeoutproperty"/> + <attribute name="entry"/> + <attribute name="path"/> + <sequential> + <echo message="Waiting for entry '@{entry}' in '@{path}' "/> + <waitfor maxwait="@{maxwait}" maxwaitunit="millisecond" checkevery="@{checkevery}" checkeveryunit="millisecond" timeoutproperty="@{timeoutproperty}"> + <resourcecontains resource="@{path}" substring="@{entry}"/> + </waitfor> + <echo message="Timeout @{timeoutproperty}"/> + </sequential> + </macrodef> </project> |