On 14 September 2011 17:33, Philippe Mouawad <philippe.moua...@gmail.com> wrote:
> I think this:
> if (jp1.hashCode() == jp2.hashCode()) {
>            System.out.println("Expected different hashCodes for " +
> jp1.getClass().getName());
>
>        }
>
> should be removed, because code is ok:

agreed, now fixed.

>   - It is not required that if two objects are unequal according to the
>   java.lang.Object.equals(java.lang.Object) method (WHICH IS THE CASE HERE),
>   then calling the hashCode method on each of the two objects must produce
>   distinct integer results. However, the programmer should be aware that
>   producing distinct integer results for unequal objects may improve the
>   performance of hashtables.
>
>
> Regards
> Philippe
> On Wed, Sep 14, 2011 at 6:24 PM, Milamber <milam...@apache.org> wrote:
>
>> Hello,
>>
>> I thinks a warning was introduce when we run "ant tests" since this
>> commit (but not sure)
>>

Yes, sorry forgot about that.

>>     [java] .........................................
>>     [java] ....................................Expected different
>> hashCodes for org.apache.jmeter.testelement.property.LongProperty
>>     [java] .....
>>     [java] .........................................
>>     [java] .......................
>>     [java] Time: 27.152
>>     [java] OK (2032 tests)
>>
>>
>> From :
>> /Jmeter/test/src/org/apache/jmeter/testelement/property/PackageTest.java .?
>>        if (jp1.hashCode() == jp2.hashCode()) {
>>            System.out.println("Expected different hashCodes for " +
>> jp1.getClass().getName());
>>
>>        }
>>
>> Milamber
>>
>> Le 14/09/2011 13:11, s...@apache.org a ecrit :
>> > Author: sebb
>> > Date: Wed Sep 14 13:11:04 2011
>> > New Revision: 1170595
>> >
>> > URL: http://svn.apache.org/viewvc?rev=1170595&view=rev
>> > Log:
>> > Bug 48943 - Functions are invoked additional times when used in
>> combination with a Config Element
>> >
>> > Modified:
>> >     jakarta/jmeter/trunk/bin/testfiles/BatchTestLocal.csv
>> >     jakarta/jmeter/trunk/bin/testfiles/BatchTestLocal.jmx
>> >     jakarta/jmeter/trunk/bin/testfiles/BatchTestLocal.xml
>> >
>> jakarta/jmeter/trunk/src/core/org/apache/jmeter/testelement/property/AbstractProperty.java
>> >     jakarta/jmeter/trunk/xdocs/changes.xml
>> >
>> > Modified: jakarta/jmeter/trunk/bin/testfiles/BatchTestLocal.csv
>> > URL:
>> http://svn.apache.org/viewvc/jakarta/jmeter/trunk/bin/testfiles/BatchTestLocal.csv?rev=1170595&r1=1170594&r2=1170595&view=diff
>> >
>> ==============================================================================
>> > --- jakarta/jmeter/trunk/bin/testfiles/BatchTestLocal.csv (original)
>> > +++ jakarta/jmeter/trunk/bin/testfiles/BatchTestLocal.csv Wed Sep 14
>> 13:11:04 2011
>> > @@ -106,7 +106,7 @@ Java If once 1,,,Thread Group 1-2,,false
>> >  Java If once 2,200,OK,Thread Group 1-2,,true,,0,1,1,null,,1,0
>> >  Java If all 1,,,Thread Group 1-2,,false,,0,1,1,null,,1,1
>> >  Java OK,200,OK,Thread Group 1-2,,true,,0,1,1,null,,1,0
>> > -"HTTP ""Request,",200,OK,Thread Group
>> 2-1,text,true,,122764,1,1,file:testfiles/BatchTestLocal.jmx,,1,0
>> > +"HTTP ""Request,",200,OK,Thread Group
>> 2-1,text,true,,127746,1,1,file:testfiles/BatchTestLocal.jmx,,1,0
>> >  1 1,200,OK,Thread Group 2-1,,true,,0,1,1,null,,1,0
>> >  2 2,200,OK,Thread Group 2-1,,true,,0,1,1,null,,1,0
>> >  3 3,200,OK,Thread Group 2-1,,true,,0,1,1,null,,1,0
>> > @@ -126,4 +126,7 @@ CSV_VAR=2,200,OK,CSV Test 6-1,,true,,0,1
>> >  CSV_VAR=3,200,OK,CSV Test 6-1,,true,,0,1,1,null,,1,0
>> >  CSV_VAR=1,200,OK,CSV Test 6-1,,true,,0,1,1,null,,1,0
>> >  CSV_VAR=2,200,OK,CSV Test 6-1,,true,,0,1,1,null,,1,0
>> > +BSH Counter: 1,200,OK,Bug 48943 7-1,text,true,,0,1,1,null,,1,0
>> > +BSH Counter: 2,200,OK,Bug 48943 7-1,text,true,,0,1,1,null,,1,0
>> > +BSH Counter: 3,200,OK,Bug 48943 7-1,text,true,,0,1,1,null,,1,0
>> >  Post 3,200,OK,Post Thread Group 1-1,,true,,0,1,1,null,,1,0
>> >
>> > Modified: jakarta/jmeter/trunk/bin/testfiles/BatchTestLocal.jmx
>> > URL:
>> http://svn.apache.org/viewvc/jakarta/jmeter/trunk/bin/testfiles/BatchTestLocal.jmx?rev=1170595&r1=1170594&r2=1170595&view=diff
>> >
>> ==============================================================================
>> > --- jakarta/jmeter/trunk/bin/testfiles/BatchTestLocal.jmx (original)
>> > +++ jakarta/jmeter/trunk/bin/testfiles/BatchTestLocal.jmx Wed Sep 14
>> 13:11:04 2011
>> > @@ -2092,6 +2092,103 @@ We use this file, which has eol=LF - but
>> >          </ResultCollector>
>> >          <hashTree/>
>> >        </hashTree>
>> > +      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup"
>> testname="Bug 48943" enabled="true">
>> > +        <stringProp
>> name="ThreadGroup.on_sample_error">continue</stringProp>
>> > +        <elementProp name="ThreadGroup.main_controller"
>> elementType="LoopController" guiclass="LoopControlPanel"
>> testclass="LoopController" testname="Loop Controller" enabled="true">
>> > +          <boolProp
>> name="LoopController.continue_forever">false</boolProp>
>> > +          <stringProp name="LoopController.loops">3</stringProp>
>> > +        </elementProp>
>> > +        <stringProp name="ThreadGroup.num_threads">1</stringProp>
>> > +        <stringProp name="ThreadGroup.ramp_time">1</stringProp>
>> > +        <longProp name="ThreadGroup.start_time">1316002322000</longProp>
>> > +        <longProp name="ThreadGroup.end_time">1316002322000</longProp>
>> > +        <boolProp name="ThreadGroup.scheduler">false</boolProp>
>> > +        <stringProp name="ThreadGroup.duration"></stringProp>
>> > +        <stringProp name="ThreadGroup.delay"></stringProp>
>> > +      </ThreadGroup>
>> > +      <hashTree>
>> > +        <ConfigTestElement guiclass="SimpleConfigGui"
>> testclass="ConfigTestElement" testname="Simple Config Element"
>> enabled="true"/>
>> > +        <hashTree/>
>> > +        <BeanShellSampler guiclass="BeanShellSamplerGui"
>> testclass="BeanShellSampler" testname="BeanShell Sampler" enabled="true">
>> > +          <stringProp
>> name="BeanShellSampler.query">SampleResult.setSampleLabel(&quot;BSH Counter:
>> ${__counter(FALSE)}&quot;);</stringProp>
>> > +          <stringProp name="BeanShellSampler.filename"></stringProp>
>> > +          <stringProp name="BeanShellSampler.parameters"></stringProp>
>> > +          <boolProp
>> name="BeanShellSampler.resetInterpreter">false</boolProp>
>> > +        </BeanShellSampler>
>> > +        <hashTree/>
>> > +        <ResultCollector guiclass="SimpleDataWriter"
>> testclass="ResultCollector" testname="Write XML" enabled="true">
>> > +          <boolProp
>> name="ResultCollector.error_logging">false</boolProp>
>> > +          <objProp>
>> > +            <name>saveConfig</name>
>> > +            <value class="SampleSaveConfiguration">
>> > +              <time>false</time>
>> > +              <latency>false</latency>
>> > +              <timestamp>false</timestamp>
>> > +              <success>true</success>
>> > +              <label>true</label>
>> > +              <code>true</code>
>> > +              <message>true</message>
>> > +              <threadName>true</threadName>
>> > +              <dataType>true</dataType>
>> > +              <encoding>false</encoding>
>> > +              <assertions>true</assertions>
>> > +              <subresults>true</subresults>
>> > +              <responseData>false</responseData>
>> > +              <samplerData>true</samplerData>
>> > +              <xml>true</xml>
>> > +              <fieldNames>true</fieldNames>
>> > +              <responseHeaders>true</responseHeaders>
>> > +              <requestHeaders>true</requestHeaders>
>> > +              <responseDataOnError>false</responseDataOnError>
>> > +
>>  <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
>> > +              <assertionsResultsToSave>0</assertionsResultsToSave>
>> > +              <bytes>true</bytes>
>> > +              <url>true</url>
>> > +              <fileName>true</fileName>
>> > +              <threadCounts>true</threadCounts>
>> > +              <sampleCount>true</sampleCount>
>> > +            </value>
>> > +          </objProp>
>> > +          <stringProp name="filename">BatchTestLocal.xml</stringProp>
>> > +        </ResultCollector>
>> > +        <hashTree/>
>> > +        <ResultCollector guiclass="SimpleDataWriter"
>> testclass="ResultCollector" testname="Write CSV" enabled="true">
>> > +          <boolProp
>> name="ResultCollector.error_logging">false</boolProp>
>> > +          <objProp>
>> > +            <name>saveConfig</name>
>> > +            <value class="SampleSaveConfiguration">
>> > +              <time>false</time>
>> > +              <latency>false</latency>
>> > +              <timestamp>false</timestamp>
>> > +              <success>true</success>
>> > +              <label>true</label>
>> > +              <code>true</code>
>> > +              <message>true</message>
>> > +              <threadName>true</threadName>
>> > +              <dataType>true</dataType>
>> > +              <encoding>false</encoding>
>> > +              <assertions>true</assertions>
>> > +              <subresults>true</subresults>
>> > +              <responseData>false</responseData>
>> > +              <samplerData>true</samplerData>
>> > +              <xml>false</xml>
>> > +              <fieldNames>true</fieldNames>
>> > +              <responseHeaders>true</responseHeaders>
>> > +              <requestHeaders>true</requestHeaders>
>> > +              <responseDataOnError>false</responseDataOnError>
>> > +
>>  <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
>> > +              <assertionsResultsToSave>0</assertionsResultsToSave>
>> > +              <bytes>true</bytes>
>> > +              <url>true</url>
>> > +              <fileName>true</fileName>
>> > +              <threadCounts>true</threadCounts>
>> > +              <sampleCount>true</sampleCount>
>> > +            </value>
>> > +          </objProp>
>> > +          <stringProp name="filename">${__P(CSVFILE)}</stringProp>
>> > +        </ResultCollector>
>> > +        <hashTree/>
>> > +      </hashTree>
>> >        <ResultCollector guiclass="ViewResultsFullVisualizer"
>> testclass="ResultCollector" testname="View Results Tree" enabled="true">
>> >          <boolProp name="ResultCollector.error_logging">false</boolProp>
>> >          <objProp>
>> >
>> > Modified: jakarta/jmeter/trunk/bin/testfiles/BatchTestLocal.xml
>> > URL:
>> http://svn.apache.org/viewvc/jakarta/jmeter/trunk/bin/testfiles/BatchTestLocal.xml?rev=1170595&r1=1170594&r2=1170595&view=diff
>> >
>> ==============================================================================
>> > --- jakarta/jmeter/trunk/bin/testfiles/BatchTestLocal.xml (original)
>> > +++ jakarta/jmeter/trunk/bin/testfiles/BatchTestLocal.xml Wed Sep 14
>> 13:11:04 2011
>> > @@ -653,7 +653,7 @@
>> >    <responseData class="java.lang.String"/>
>> >    <responseFile class="java.lang.String"></responseFile>
>> >  </sample>
>> > -<httpSample s="true" lb="HTTP &quot;Request," rc="200" rm="OK"
>> tn="Thread Group 2-1" dt="text" by="122764" sc="1" ec="0" ng="1" na="1">
>> > +<httpSample s="true" lb="HTTP &quot;Request," rc="200" rm="OK"
>> tn="Thread Group 2-1" dt="text" by="127746" sc="1" ec="0" ng="1" na="1">
>> >    <responseHeader class="java.lang.String"></responseHeader>
>> >    <requestHeader class="java.lang.String"></requestHeader>
>> >    <responseFile class="java.lang.String"></responseFile>
>> > @@ -752,6 +752,24 @@
>> >    <requestHeader class="java.lang.String"></requestHeader>
>> >    <responseFile class="java.lang.String"></responseFile>
>> >  </sample>
>> > +<sample s="true" lb="BSH Counter: 1" rc="200" rm="OK" tn="Bug 48943 7-1"
>> dt="text" by="0" sc="1" ec="0" ng="1" na="1">
>> > +  <responseHeader class="java.lang.String"></responseHeader>
>> > +  <requestHeader class="java.lang.String"></requestHeader>
>> > +  <responseFile class="java.lang.String"></responseFile>
>> > +  <samplerData
>> class="java.lang.String">SampleResult.setSampleLabel(&quot;BSH Counter:
>> 1&quot;);</samplerData>
>> > +</sample>
>> > +<sample s="true" lb="BSH Counter: 2" rc="200" rm="OK" tn="Bug 48943 7-1"
>> dt="text" by="0" sc="1" ec="0" ng="1" na="1">
>> > +  <responseHeader class="java.lang.String"></responseHeader>
>> > +  <requestHeader class="java.lang.String"></requestHeader>
>> > +  <responseFile class="java.lang.String"></responseFile>
>> > +  <samplerData
>> class="java.lang.String">SampleResult.setSampleLabel(&quot;BSH Counter:
>> 2&quot;);</samplerData>
>> > +</sample>
>> > +<sample s="true" lb="BSH Counter: 3" rc="200" rm="OK" tn="Bug 48943 7-1"
>> dt="text" by="0" sc="1" ec="0" ng="1" na="1">
>> > +  <responseHeader class="java.lang.String"></responseHeader>
>> > +  <requestHeader class="java.lang.String"></requestHeader>
>> > +  <responseFile class="java.lang.String"></responseFile>
>> > +  <samplerData
>> class="java.lang.String">SampleResult.setSampleLabel(&quot;BSH Counter:
>> 3&quot;);</samplerData>
>> > +</sample>
>> >  <sample s="true" lb="Post 3" rc="200" rm="OK" tn="Post Thread Group 1-1"
>> dt="" by="0" sc="1" ec="0" ng="1" na="1">
>> >    <responseHeader class="java.lang.String"></responseHeader>
>> >    <requestHeader class="java.lang.String"></requestHeader>
>> >
>> > Modified:
>> jakarta/jmeter/trunk/src/core/org/apache/jmeter/testelement/property/AbstractProperty.java
>> > URL:
>> http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/testelement/property/AbstractProperty.java?rev=1170595&r1=1170594&r2=1170595&view=diff
>> >
>> ==============================================================================
>> > ---
>> jakarta/jmeter/trunk/src/core/org/apache/jmeter/testelement/property/AbstractProperty.java
>> (original)
>> > +++
>> jakarta/jmeter/trunk/src/core/org/apache/jmeter/testelement/property/AbstractProperty.java
>> Wed Sep 14 13:11:04 2011
>> > @@ -197,9 +197,9 @@ public abstract class AbstractProperty i
>> >          if (!name.equals(jpo.getName())) {
>> >              return false;
>> >          }
>> > -        String s1 = getStringValue();
>> > -        String s2 = jpo.getStringValue();
>> > -        return s1 == null ? s2 == null : s1.equals(s2);
>> > +        Object o1 = getObjectValue();
>> > +        Object o2 = jpo.getObjectValue();
>> > +        return o1 == null ? o2 == null : o1.equals(o2);
>> >      }
>> >
>> >      /** {@inheritDoc} */
>> > @@ -207,8 +207,8 @@ public abstract class AbstractProperty i
>> >      public int hashCode() {
>> >          int result = 17;
>> >          result = result * 37 + name.hashCode();// name cannot be null
>> > -        String s = getStringValue();
>> > -        result = result * 37 + (s == null ? 0 : s.hashCode());
>> > +        Object o = getObjectValue();
>> > +        result = result * 37 + (o == null ? 0 : o.hashCode());
>> >          return result;
>> >      }
>> >
>> >
>> > Modified: jakarta/jmeter/trunk/xdocs/changes.xml
>> > URL:
>> http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/changes.xml?rev=1170595&r1=1170594&r2=1170595&view=diff
>> >
>> ==============================================================================
>> > --- jakarta/jmeter/trunk/xdocs/changes.xml (original)
>> > +++ jakarta/jmeter/trunk/xdocs/changes.xml Wed Sep 14 13:11:04 2011
>> > @@ -69,8 +69,10 @@ This can be overridden by setting the JM
>> >
>> >  <h3>HTTP Samplers and Proxy</h3>
>> >  <ul>
>> > +<li>Fix HttpClient 4 sampler so it reuses HttpClient instances and
>> connections where possible.</li>
>> >  <li>Bug 51750 - Retrieve all embedded resources doesn't follow
>> IFRAME</li>
>> >  <li>Change the default so the HttpClient 4 sampler does not retry</li>
>> > +<li>Bug 51752 - HTTP Cache is broken when using "Retrieve all embedded
>> resources" with concurrent pool</li>
>> >  </ul>
>> >
>> >  <h3>Other Samplers</h3>
>> > @@ -95,6 +97,7 @@ This can be overridden by setting the JM
>> >
>> >  <h3>Functions</h3>
>> >  <ul>
>> > +<li>Bug 48943 - Functions are invoked additional times when used in
>> combination with a Config Element</li>
>> >  </ul>
>> >
>> >  <h3>I18N</h3>
>> > @@ -103,7 +106,6 @@ This can be overridden by setting the JM
>> >
>> >  <h3>General</h3>
>> >  <ul>
>> > -<li>Bug 51752 - HTTP Cache is broken when using "Retrieve all embedded
>> resources" with concurrent pool</li>
>> >  </ul>
>> >
>> >  <!-- ==================================================== -->
>> >
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: notifications-unsubscr...@jakarta.apache.org
>> > For additional commands, e-mail: notifications-h...@jakarta.apache.org
>> >
>> >
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscr...@jakarta.apache.org
>> For additional commands, e-mail: dev-h...@jakarta.apache.org
>>
>>
>
>
> --
> Cordialement.
> Philippe Mouawad.
> Ubik-Ingénierie
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: dev-h...@jakarta.apache.org

Reply via email to