jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1418667 - in /jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp: config/gui/TCPConfigGui.java sampler/TCPSampler.java
Date Sat, 08 Dec 2012 13:04:23 GMT
Author: sebb
Date: Sat Dec  8 13:04:23 2012
New Revision: 1418667

URL: http://svn.apache.org/viewvc?rev=1418667&view=rev
Log:
Use constant for reuse connection default
Ensure default is correctly applied if omitted from JMX and used in non-GUI test

Modified:
    jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/config/gui/TCPConfigGui.java
    jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java

Modified: jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/config/gui/TCPConfigGui.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/config/gui/TCPConfigGui.java?rev=1418667&r1=1418666&r2=1418667&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/config/gui/TCPConfigGui.java
(original)
+++ jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/config/gui/TCPConfigGui.java
Sat Dec  8 13:04:23 2012
@@ -85,7 +85,7 @@ public class TCPConfigGui extends Abstra
         classname.setText(element.getPropertyAsString(TCPSampler.CLASSNAME));
         serverPanel.setServer(element.getPropertyAsString(TCPSampler.SERVER));
         // Default to original behaviour, i.e. re-use connection
-        reUseConnection.setSelected(element.getPropertyAsBoolean(TCPSampler.RE_USE_CONNECTION,true));
+        reUseConnection.setSelected(element.getPropertyAsBoolean(TCPSampler.RE_USE_CONNECTION,
TCPSampler.RE_USE_CONNECTION_DEFAULT));
         serverPanel.setPort(element.getPropertyAsString(TCPSampler.PORT));
         // filename.setText(element.getPropertyAsString(TCPSampler.FILENAME));
         serverPanel.setResponseTimeout(element.getPropertyAsString(TCPSampler.TIMEOUT));

Modified: jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java?rev=1418667&r1=1418666&r2=1418667&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java (original)
+++ jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java Sat
Dec  8 13:04:23 2012
@@ -82,6 +82,7 @@ public class TCPSampler extends Abstract
     public static final String REQUEST = "TCPSampler.request"; //$NON-NLS-1$
 
     public static final String RE_USE_CONNECTION = "TCPSampler.reUseConnection"; //$NON-NLS-1$
+    public static final boolean RE_USE_CONNECTION_DEFAULT = true;
 
     public static final String CLOSE_CONNECTION = "TCPSampler.closeConnection"; //$NON-NLS-1$
     public static final boolean CLOSE_CONNECTION_DEFAULT = false;
@@ -236,7 +237,7 @@ public class TCPSampler extends Abstract
     }
 
     public boolean isReUseConnection() {
-        return getPropertyAsBoolean(RE_USE_CONNECTION);
+        return getPropertyAsBoolean(RE_USE_CONNECTION, RE_USE_CONNECTION_DEFAULT);
     }
 
     public void setCloseConnection(String close) {



Mime
View raw message