ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <ste...@apache.org>
Subject Re: To check server is down
Date Thu, 10 Feb 2011 11:53:24 GMT
On 04/02/11 15:34, Martin Gainty wrote:
>
> svn:// URLs are on port 3960
> discover-target would need to test netstat output e.g.
> netstat -a | grep 3960>output.file
> a fail message would be no output
> a found message would be the IP:3960 of the server
>
> OR in the case of ssh+svn
> netstat -a | grep 22>output.file
> a fail message would be no output
>
> a found message would be the IP:3960 of the server

There's a risk there that if /etc/services is up to date, the netstat 
won't show 22, it will show svn.

I'd use the <socket>

<fail>
   <condition>
   <not><socket port="3960" server="127.0.0.1" /></not>
  </condition>
  No SVN server
</fail>

I use this kind of check in <waitfor>, blocking for something to go live 
before running the unit tests against it

-steve

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message