Author: pmouawad
Date: Wed Mar  2 21:19:46 2016
New Revision: 1733369

URL: http://svn.apache.org/viewvc?rev=1733369&view=rev
Log:
Bug 59103 - HTTP Request Java Implementation: Change default 
"http.java.sampler.retries" to align it on HttpClient behaviour and make it 
meaningful
Bugzilla Id: 59103

Modified:
    jmeter/trunk/bin/jmeter.properties
    
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPJavaImpl.java
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/bin/jmeter.properties
URL: 
http://svn.apache.org/viewvc/jmeter/trunk/bin/jmeter.properties?rev=1733369&r1=1733368&r2=1733369&view=diff
==============================================================================
--- jmeter/trunk/bin/jmeter.properties (original)
+++ jmeter/trunk/bin/jmeter.properties Wed Mar  2 21:19:46 2016
@@ -359,8 +359,8 @@ log_level.jorphan=INFO
 #---------------------------------------------------------------------------
 
 # Number of connection retries performed by HTTP Java sampler before giving up
-#http.java.sampler.retries=10
-# 0 now means don't retry connection (in 2.3 and before it meant no tries at 
all!)
+# 0 means no retry since version 3.0
+#http.java.sampler.retries=0
 
 #---------------------------------------------------------------------------
 # Commons HTTPClient configuration

Modified: 
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPJavaImpl.java
URL: 
http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPJavaImpl.java?rev=1733369&r1=1733368&r2=1733369&view=diff
==============================================================================
--- 
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPJavaImpl.java
 (original)
+++ 
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPJavaImpl.java
 Wed Mar  2 21:19:46 2016
@@ -59,7 +59,7 @@ public class HTTPJavaImpl extends HTTPAb
 
     private static final int MAX_CONN_RETRIES =
         JMeterUtils.getPropDefault("http.java.sampler.retries" // $NON-NLS-1$
-                ,10); // Maximum connection retries
+                ,0); // Maximum connection retries
 
     static {
         log.info("Maximum connection retries = "+MAX_CONN_RETRIES); // 
$NON-NLS-1$
@@ -472,9 +472,9 @@ public class HTTPJavaImpl extends HTTPAb
         try {
             // Sampling proper - establish the connection and read the 
response:
             // Repeatedly try to connect:
-            int retry = 0;
-            // Start with 0 so tries at least once, and retries at most 
MAX_CONN_RETRIES times
-            for (; retry <= MAX_CONN_RETRIES; retry++) {
+            int retry = -1;
+            // Start with -1 so tries at least once, and retries at most 
MAX_CONN_RETRIES times
+            for (; retry < MAX_CONN_RETRIES; retry++) {
                 try {
                     conn = setupConnection(url, method, res);
                     // Attempt the connection:

Modified: jmeter/trunk/xdocs/changes.xml
URL: 
http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1733369&r1=1733368&r2=1733369&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Wed Mar  2 21:19:46 2016
@@ -102,7 +102,8 @@ Summary
     <li>JMS Subscriber will consider sample in error if number of received 
messages is not equals to expected number of messages. It previously considerer 
sample OK if only 1 message was received. See <bugzilla>58980</bugzilla></li>
     <li>Since version 3.0, HTTP(S) Test Script recorder uses default port 8888 
as configured when using Recording Template. See <bugzilla>59006</bugzilla></li>
     <li>Since version 3.0, the parser for embedded ressources (replaced since 
2.10 by Lagarto based implementation) relying on htmlparser library 
(HtmlParserHTMLParser) has been dropped as long as its dependencies.</li>
-    <li>Since version 3.0, the support for reading old Avalon format JTL 
(result) files has been removed, see <bugzilla>59064</bugzilla></li>     
+    <li>Since version 3.0, the support for reading old Avalon format JTL 
(result) files has been removed, see <bugzilla>59064</bugzilla></li>
+    <li>Since version 3.0, default property's value 
<code>http.java.sampler.retries</code> has been switched to 0 to avoid any 
retry by default to align it on HttpClient4 default value and behaviour. See 
<bugzilla>59103</bugzilla></li>     
 </ul>
 
 <!-- =================== Improvements =================== -->
@@ -128,6 +129,7 @@ Summary
     <li><bug>59036</bug>FormCharSetFinder : Use JSoup instead of deprecated 
HTMLParser</li>
     <li><bug>59034</bug>Parallel downloads connection management is not 
realistic. Contributed by Benoit Wiart (benoit dot wiart at gmail.com) and 
Philippe Mouawad</li>
     <li><bug>59060</bug>HTTP Request GUI : Move File Upload to a new Tab to 
have more space for parameters and prevent incoherent configuration. 
Contributed by Benoit Wiart (benoit dot wiart at gmail.com)</li>
+    <li><bug>59103</bug>HTTP Request Java Implementation: Change default 
"http.java.sampler.retries" to align it on HttpClient behaviour and make it 
meaningful</li>
 </ul>
 
 <h3>Other samplers</h3>


Reply via email to