You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2017/01/19 17:11:07 UTC

svn commit: r1779498 - in /jmeter/trunk: ./ bin/testfiles/ src/protocol/http/org/apache/http/impl/conn/ src/protocol/http/org/apache/jmeter/protocol/http/sampler/ xdocs/

Author: pmouawad
Date: Thu Jan 19 17:11:07 2017
New Revision: 1779498

URL: http://svn.apache.org/viewvc?rev=1779498&view=rev
Log:
Bug 60607 - DNS Cache Manager configuration is ignored
Bugzilla Id: 60607

Added:
    jmeter/trunk/bin/testfiles/Bug60607.csv
    jmeter/trunk/bin/testfiles/Bug60607.jmx
    jmeter/trunk/bin/testfiles/Bug60607.xml   (with props)
Modified:
    jmeter/trunk/build.xml
    jmeter/trunk/src/protocol/http/org/apache/http/impl/conn/JMeterPoolingClientConnectionManager.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/MeasuringConnectionManager.java
    jmeter/trunk/xdocs/changes.xml

Added: jmeter/trunk/bin/testfiles/Bug60607.csv
URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/testfiles/Bug60607.csv?rev=1779498&view=auto
==============================================================================
--- jmeter/trunk/bin/testfiles/Bug60607.csv (added)
+++ jmeter/trunk/bin/testfiles/Bug60607.csv Thu Jan 19 17:11:07 2017
@@ -0,0 +1,2 @@
+label,responseCode,responseMessage,threadName,dataType,success
+HTTP Request,Non HTTP response code: java.net.UnknownHostException,Non HTTP response message: Failed to resolve host name: jmeter.apache.org,Thread Group 1-1,text,true

Added: jmeter/trunk/bin/testfiles/Bug60607.jmx
URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/testfiles/Bug60607.jmx?rev=1779498&view=auto
==============================================================================
--- jmeter/trunk/bin/testfiles/Bug60607.jmx (added)
+++ jmeter/trunk/bin/testfiles/Bug60607.jmx Thu Jan 19 17:11:07 2017
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jmeterTestPlan version="1.2" properties="3.2" jmeter="3.2-SNAPSHOT.20170119">
+  <hashTree>
+    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
+      <stringProp name="TestPlan.comments"></stringProp>
+      <boolProp name="TestPlan.functional_mode">false</boolProp>
+      <boolProp name="TestPlan.serialize_threadgroups">true</boolProp>
+      <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
+        <collectionProp name="Arguments.arguments"/>
+      </elementProp>
+      <stringProp name="TestPlan.user_define_classpath"></stringProp>
+    </TestPlan>
+    <hashTree>
+      <DNSCacheManager guiclass="DNSCachePanel" testclass="DNSCacheManager" testname="DNS Cache Manager" enabled="true">
+        <collectionProp name="DNSCacheManager.servers">
+          <stringProp name="-658686236">20.0.118.11</stringProp>
+        </collectionProp>
+        <boolProp name="DNSCacheManager.clearEachIteration">true</boolProp>
+        <boolProp name="DNSCacheManager.isCustomResolver">true</boolProp>
+      </DNSCacheManager>
+      <hashTree/>
+      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group" 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">1</stringProp>
+        </elementProp>
+        <stringProp name="ThreadGroup.num_threads">1</stringProp>
+        <stringProp name="ThreadGroup.ramp_time">1</stringProp>
+        <longProp name="ThreadGroup.start_time">1484844562000</longProp>
+        <longProp name="ThreadGroup.end_time">1484844562000</longProp>
+        <boolProp name="ThreadGroup.scheduler">false</boolProp>
+        <stringProp name="ThreadGroup.duration"></stringProp>
+        <stringProp name="ThreadGroup.delay"></stringProp>
+      </ThreadGroup>
+      <hashTree>
+        <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="HTTP Request" enabled="true">
+          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
+            <collectionProp name="Arguments.arguments"/>
+          </elementProp>
+          <stringProp name="HTTPSampler.domain">jmeter.apache.org</stringProp>
+          <stringProp name="HTTPSampler.port"></stringProp>
+          <stringProp name="HTTPSampler.protocol">http</stringProp>
+          <stringProp name="HTTPSampler.contentEncoding"></stringProp>
+          <stringProp name="HTTPSampler.path">/</stringProp>
+          <stringProp name="HTTPSampler.method">GET</stringProp>
+          <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
+          <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
+          <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
+          <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
+          <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
+          <stringProp name="HTTPSampler.connect_timeout">5000</stringProp>
+          <stringProp name="HTTPSampler.response_timeout">30000</stringProp>
+        </HTTPSamplerProxy>
+        <hashTree>
+          <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
+            <collectionProp name="Asserion.test_strings">
+              <stringProp name="-1998142061">Non HTTP response message: Failed to resolve host name: jmeter.apache.org</stringProp>
+            </collectionProp>
+            <stringProp name="Assertion.test_field">Assertion.response_message</stringProp>
+            <boolProp name="Assertion.assume_success">true</boolProp>
+            <intProp name="Assertion.test_type">16</intProp>
+          </ResponseAssertion>
+          <hashTree/>
+          <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
+            <collectionProp name="Asserion.test_strings">
+              <stringProp name="-1844187635">Non HTTP response code: java.net.UnknownHostException</stringProp>
+            </collectionProp>
+            <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
+            <boolProp name="Assertion.assume_success">true</boolProp>
+            <intProp name="Assertion.test_type">16</intProp>
+          </ResponseAssertion>
+          <hashTree/>
+        </hashTree>
+      </hashTree>
+      <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" 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>false</samplerData>
+            <xml>false</xml>
+            <fieldNames>true</fieldNames>
+            <responseHeaders>false</responseHeaders>
+            <requestHeaders>false</requestHeaders>
+            <responseDataOnError>false</responseDataOnError>
+            <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
+            <assertionsResultsToSave>0</assertionsResultsToSave>
+          </value>
+        </objProp>
+        <stringProp name="filename">Bug60607.csv</stringProp>
+      </ResultCollector>
+      <hashTree/>
+      <ResultCollector guiclass="SimpleDataWriter" testclass="ResultCollector" testname="Simple Data Writer" 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>false</samplerData>
+            <xml>true</xml>
+            <fieldNames>false</fieldNames>
+            <responseHeaders>false</responseHeaders>
+            <requestHeaders>false</requestHeaders>
+            <responseDataOnError>false</responseDataOnError>
+            <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
+            <assertionsResultsToSave>0</assertionsResultsToSave>
+            <bytes>true</bytes>
+          </value>
+        </objProp>
+        <stringProp name="filename">Bug60607.xml</stringProp>
+      </ResultCollector>
+      <hashTree/>
+    </hashTree>
+  </hashTree>
+</jmeterTestPlan>

Added: jmeter/trunk/bin/testfiles/Bug60607.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/testfiles/Bug60607.xml?rev=1779498&view=auto
==============================================================================
--- jmeter/trunk/bin/testfiles/Bug60607.xml (added)
+++ jmeter/trunk/bin/testfiles/Bug60607.xml Thu Jan 19 17:11:07 2017
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<testResults version="1.2">
+<httpSample s="true" lb="HTTP Request" rc="Non HTTP response code: java.net.UnknownHostException" rm="Non HTTP response message: Failed to resolve host name: jmeter.apache.org" tn="Thread Group 1-1" dt="text" by="1947">
+  <assertionResult>
+    <name>Response Assertion</name>
+    <failure>false</failure>
+    <error>false</error>
+  </assertionResult>
+  <assertionResult>
+    <name>Response Assertion</name>
+    <failure>false</failure>
+    <error>false</error>
+  </assertionResult>
+</httpSample>
+
+</testResults>

Propchange: jmeter/trunk/bin/testfiles/Bug60607.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: jmeter/trunk/build.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/build.xml?rev=1779498&r1=1779497&r2=1779498&view=diff
==============================================================================
--- jmeter/trunk/build.xml (original)
+++ jmeter/trunk/build.xml Thu Jan 19 17:11:07 2017
@@ -2703,6 +2703,10 @@ run JMeter unless all the JMeter jars ar
       <param name="batchtest.name" value="TEST_HTTPS"/>
       <param name="skip.batchtest" value="${skip.test_https}" />
     </antcall>
+  	
+    <antcall target="batchtest">
+      <param name="batchtest.name" value="Bug60607"/>
+    </antcall>
   </target>
 
   <!-- Run all batch tests; used by test target -->

Modified: jmeter/trunk/src/protocol/http/org/apache/http/impl/conn/JMeterPoolingClientConnectionManager.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/http/impl/conn/JMeterPoolingClientConnectionManager.java?rev=1779498&r1=1779497&r2=1779498&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/http/impl/conn/JMeterPoolingClientConnectionManager.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/http/impl/conn/JMeterPoolingClientConnectionManager.java Thu Jan 19 17:11:07 2017
@@ -347,5 +347,12 @@ public class JMeterPoolingClientConnecti
         return this.pool.getStats(route);
     }
 
+    /**
+     * @return the dnsResolver
+     */
+    protected DnsResolver getDnsResolver() {
+        return dnsResolver;
+    }
+
 }
 

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/MeasuringConnectionManager.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/MeasuringConnectionManager.java?rev=1779498&r1=1779497&r2=1779498&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/MeasuringConnectionManager.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/MeasuringConnectionManager.java Thu Jan 19 17:11:07 2017
@@ -72,7 +72,7 @@ public class MeasuringConnectionManager
     @Override
     protected ClientConnectionOperator createConnectionOperator(
             SchemeRegistry schreg) {
-        return new JMeterClientConnectionOperator(schreg);
+        return new JMeterClientConnectionOperator(schreg, getDnsResolver());
     }
 
 

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1779498&r1=1779497&r2=1779498&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml [utf-8] (original)
+++ jmeter/trunk/xdocs/changes.xml [utf-8] Thu Jan 19 17:11:07 2017
@@ -199,6 +199,7 @@ JMeter now requires Java 8. Ensure you u
 <ul>
     <li><bug>60438</bug><pr>235</pr>Clear old variables before extracting new ones in JSON Extractor.
     Based on a patch by Qi Chen (qi.chensh at ele.me)</li>
+    <li><bug>60607</bug>DNS Cache Manager configuration is ignored</li>
 </ul>
 
 <h3>Functions</h3>