Here what we do:
<waitfor maxwait="300" maxwaitunit="second"
timeoutproperty="server.is.still.running">
<not>
<http url="${server.url}"/>
</not>
</waitfor>
<if>
<isset property="server.is.still.running"/>
<echo> Houston...we have a problem</echo>
</if>
The ${server.url} is the full URL
(http://server.com:port)
Later,
Ninju
--- Ivan Ivanov <[EMAIL PROTECTED]> wrote:
> Well, you can use <sleep> before that condition to
> wait for the server to stop:
>
> <property name="sleep.seconds"
> value="adjust_here_to_suit_your_server"/>
> ...
> <sleep seconds="${sleep.seconds}"/>
> <condition property="server.down">
> ....
>
> HTH Ivan
>
> --- Mark Lybarger <[EMAIL PROTECTED]> wrote:
> > thanks!! i can see how this will help. should i
> > specify a given amount of
> > wait time after the server shutdown to see if the
> > port is not responding, or
> > can i waitfor this condition?
> >
> > On 5/10/05, Ivan Ivanov
> > <[EMAIL PROTECTED]> wrote:
> > >
> > > Hello Mark,
> > >
> > > I think socket condition might help you:
> > >
> > > <project>
> > > <condition property="server.down">
> > > <not>
> > > <socket server="localhost" port="${port}"/>
> > > </not>
> > > </condition>
> > > <echo>$${server.down} is ${server.down}</echo>
> > > </project>
> > >
> > > Here is the output of two checks against bound
> and
> > > unbound ports:
> > > $ ant -f ports.xml -Dport=123
> > > Buildfile: ports.xml
> > > [echo] ${server.down} is true
> > > i.e. there is no one listening in this port
> > >
> > > $ ant -f ports.xml -Dport=22
> > > Buildfile: ports.xml
> > > [echo] ${server.down} is ${server.down}
> > > i.e. port is busy.
> > >
> > > HTH Ivan
> > >
> > > --- Mark Lybarger <[EMAIL PROTECTED]> wrote:
> > > > is there an example for using the waitfor task
> > (or
> > > > is there something else i
> > > > should use?) to wait till a server has
> > > > shutdown/stopped listening to a
> > > > particular port?
> > > >
> > > > thanks!
> > > >
> > >
> > > Yahoo! Mail
> > > Stay connected, organized, and protected. Take
> the
> > tour:
> > > http://tour.mail.yahoo.com/mailtour.html
> > >
> > >
> >
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - You care about security. So do we.
> http://promotions.yahoo.com/new_mail
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>
__________________________________
Do you Yahoo!?
Make Yahoo! your home page
http://www.yahoo.com/r/hs
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]