https://issues.apache.org/bugzilla/show_bug.cgi?id=50757

           Summary: JMeter Ant task does not set failure property when
                    non-GUI mode port is already in use
           Product: JMeter
           Version: 2.4
          Platform: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
        AssignedTo: [email protected]
        ReportedBy: [email protected]


When running JMeter through an Ant task, and another instance of JMeter
(non-GUI) is running, the failureproperty value is not set to true. This should
be set to true since the test failed to even run.

Method:
1. Start a long test plan in non-gui mode
2. Using Ant, start another test plan
<jmeter jmeterhome="${jmeter-home}" resultlogdir="${logs.dir}"
failureproperty="jmeter.failed" testplan="@{f}">
    <property name="user.dir" value="${basedir}" />
    <jvmarg value="-Dlog_file=${basedir}/jmeter.log"/>
</jmeter>
<!-- The property will be null if it didn't fail, so making it more human
readable. -->
<if>
    <not><istrue value="${jmeter.failed}" /></not>
    <then>
        <var name="jmeter.failed" value="false"/>
    </then>
</if>
<echo>JMeter Failed? :: ${jmeter.failed}</echo>

Results (from Ant):
[jmeter] Executing test plan: /Users/me/Desktop/test.jmx ==>
/Users/me/Desktop/logs/test.jtl
   [jmeter] Created the tree successfully using /Users/me/Desktop/test.jmx
   [jmeter] Starting the test @ Thu Feb 10 10:00:57 PST 2011 (1297360857582)
   [jmeter] Waiting for possible shutdown message on port 4445
   [jmeter] java.net.BindException: Address already in use
   [jmeter]     at java.net.PlainDatagramSocketImpl.bind0(Native Method)
   [jmeter]     at
java.net.PlainDatagramSocketImpl.bind(PlainDatagramSocketImpl.java:82)
   [jmeter]     at java.net.DatagramSocket.bind(DatagramSocket.java:372)
   [jmeter]     at java.net.DatagramSocket.<init>(DatagramSocket.java:211)
   [jmeter]     at java.net.DatagramSocket.<init>(DatagramSocket.java:262)
   [jmeter]     at java.net.DatagramSocket.<init>(DatagramSocket.java:235)
   [jmeter]     at
org.apache.jmeter.engine.StandardJMeterEngine.waitForSignals(StandardJMeterEngine.java:228)
   [jmeter]     at
org.apache.jmeter.engine.StandardJMeterEngine.access$100(StandardJMeterEngine.java:57)
   [jmeter]     at
org.apache.jmeter.engine.StandardJMeterEngine$1.run(StandardJMeterEngine.java:208)
   [jmeter] Tidying up ...    @ Thu Feb 10 10:00:59 PST 2011 (1297360859764)
   [jmeter] ... end of run
     [echo] JMeter Failed? :: false

Expected:
jmeter.failed should be true

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to