ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 10401] New: - waitfor task doesn't shut off socket conditions in every case
Date Tue, 02 Jul 2002 12:03:19 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10401>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10401

waitfor task doesn't shut off socket conditions in every case

           Summary: waitfor task doesn't shut off socket conditions in every
                    case
           Product: Ant
           Version: 1.5Beta3
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: Core tasks
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: wtff@freenet.de


I am very happy that the 1.5 version of ant contains network monitoring 
capabilities (socket and http conditions).

I tried to write scripts that test socket conditions using waitfor tasks with a 
certain maywait limit, but in certain cases, the waitfor tasks does not 
terminate the socket conditions.
If the socket condition tests a certain port an an existing ip address then the 
network interface of the destination machine can report back that this port is 
unused. But if the socket condition points to a nonexistent ip address, then 
the socket condition waits for approx 40 seconds or whatever the standard 
socket connect timeout is an a specific java platform, even if I specify a 
waitfor-maxwait timeout of 3 seconds.

Here is an example script:

<project name="monitor" basedir="." default="all">
    <target name="socketcheck" depends="">
        <waitfor timeoutproperty="socket.unavail.3302" maxwait="3" 
maxwaitunit="second">
            <not><socket server="1.1.1.1" port="3302"/></not>
        </waitfor>
    </target>
	
    <target name="all" depends="socketcheck">
        <echo>
	    Socket unavail:3302 : ${socket.unavail.3302}
        </echo>
    </target>
</project>

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message