You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by se...@apache.org on 2008/04/23 14:22:13 UTC

svn commit: r650843 - in /jakarta/jmeter/trunk: bin/ docs/ docs/api/ docs/api/org/apache/jmeter/protocol/tcp/sampler/ docs/usermanual/ src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/ xdocs/ xdocs/usermanual/

Author: sebb
Date: Wed Apr 23 05:22:09 2008
New Revision: 650843

URL: http://svn.apache.org/viewvc?rev=650843&view=rev
Log:
The supplied TCPClient implementation no longer treats tcp.eolByte=0 as special.
To skip EOL checking, set tcp.eolByte=1000 (or some other value which is not a valid byte)

Modified:
    jakarta/jmeter/trunk/bin/jmeter.properties
    jakarta/jmeter/trunk/docs/api/index-all.html
    jakarta/jmeter/trunk/docs/api/org/apache/jmeter/protocol/tcp/sampler/TCPClient.html
    jakarta/jmeter/trunk/docs/api/org/apache/jmeter/protocol/tcp/sampler/TCPClientImpl.html
    jakarta/jmeter/trunk/docs/api/org/apache/jmeter/protocol/tcp/sampler/package-summary.html
    jakarta/jmeter/trunk/docs/changes.html
    jakarta/jmeter/trunk/docs/usermanual/component_reference.html
    jakarta/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPClientImpl.java
    jakarta/jmeter/trunk/xdocs/changes.xml
    jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml

Modified: jakarta/jmeter/trunk/bin/jmeter.properties
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/bin/jmeter.properties?rev=650843&r1=650842&r2=650843&view=diff
==============================================================================
--- jakarta/jmeter/trunk/bin/jmeter.properties (original)
+++ jakarta/jmeter/trunk/bin/jmeter.properties Wed Apr 23 05:22:09 2008
@@ -430,7 +430,8 @@
 #tcp.handler=TCPClientImpl
 #
 # eolByte = byte value for end of line
-#tcp.eolByte=0
+# set this to a value outside the range -128 to +127 to skip eol checking
+#tcp.eolByte=1000
 #
 # status.prefix and suffix = strings that enclose the status response code
 #tcp.status.prefix=Status=

Modified: jakarta/jmeter/trunk/docs/api/index-all.html
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/docs/api/index-all.html?rev=650843&r1=650842&r2=650843&view=diff
==============================================================================
--- jakarta/jmeter/trunk/docs/api/index-all.html (original)
+++ jakarta/jmeter/trunk/docs/api/index-all.html Wed Apr 23 05:22:09 2008
@@ -19646,7 +19646,7 @@
 <DT><A HREF="org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.html#TCLogParser(java.lang.String)"><B>TCLogParser(String)</B></A> - 
 Constructor for class org.apache.jmeter.protocol.http.util.accesslog.<A HREF="org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.html" title="class in org.apache.jmeter.protocol.http.util.accesslog">TCLogParser</A>
 <DD>&nbsp;
-<DT><A HREF="org/apache/jmeter/protocol/tcp/sampler/TCPClient.html" title="interface in org.apache.jmeter.protocol.tcp.sampler"><B>TCPClient</B></A> - interface org.apache.jmeter.protocol.tcp.sampler.<A HREF="org/apache/jmeter/protocol/tcp/sampler/TCPClient.html" title="interface in org.apache.jmeter.protocol.tcp.sampler">TCPClient</A>.<DD>&nbsp;<DT><A HREF="org/apache/jmeter/protocol/tcp/sampler/TCPClientImpl.html" title="class in org.apache.jmeter.protocol.tcp.sampler"><B>TCPClientImpl</B></A> - class org.apache.jmeter.protocol.tcp.sampler.<A HREF="org/apache/jmeter/protocol/tcp/sampler/TCPClientImpl.html" title="class in org.apache.jmeter.protocol.tcp.sampler">TCPClientImpl</A>.<DD>&nbsp;<DT><A HREF="org/apache/jmeter/protocol/tcp/sampler/TCPClientImpl.html#TCPClientImpl()"><B>TCPClientImpl()</B></A> - 
+<DT><A HREF="org/apache/jmeter/protocol/tcp/sampler/TCPClient.html" title="interface in org.apache.jmeter.protocol.tcp.sampler"><B>TCPClient</B></A> - interface org.apache.jmeter.protocol.tcp.sampler.<A HREF="org/apache/jmeter/protocol/tcp/sampler/TCPClient.html" title="interface in org.apache.jmeter.protocol.tcp.sampler">TCPClient</A>.<DD>Interface required by TCPSampler for TCPClient implementations.<DT><A HREF="org/apache/jmeter/protocol/tcp/sampler/TCPClientImpl.html" title="class in org.apache.jmeter.protocol.tcp.sampler"><B>TCPClientImpl</B></A> - class org.apache.jmeter.protocol.tcp.sampler.<A HREF="org/apache/jmeter/protocol/tcp/sampler/TCPClientImpl.html" title="class in org.apache.jmeter.protocol.tcp.sampler">TCPClientImpl</A>.<DD>Sample TCPClient implementation<DT><A HREF="org/apache/jmeter/protocol/tcp/sampler/TCPClientImpl.html#TCPClientImpl()"><B>TCPClientImpl()</B></A> - 
 Constructor for class org.apache.jmeter.protocol.tcp.sampler.<A HREF="org/apache/jmeter/protocol/tcp/sampler/TCPClientImpl.html" title="class in org.apache.jmeter.protocol.tcp.sampler">TCPClientImpl</A>
 <DD>&nbsp;
 <DT><A HREF="org/apache/jmeter/protocol/tcp/config/gui/TCPConfigGui.html" title="class in org.apache.jmeter.protocol.tcp.config.gui"><B>TCPConfigGui</B></A> - class org.apache.jmeter.protocol.tcp.config.gui.<A HREF="org/apache/jmeter/protocol/tcp/config/gui/TCPConfigGui.html" title="class in org.apache.jmeter.protocol.tcp.config.gui">TCPConfigGui</A>.<DD>&nbsp;<DT><A HREF="org/apache/jmeter/protocol/tcp/config/gui/TCPConfigGui.html#TCPConfigGui()"><B>TCPConfigGui()</B></A> - 

Modified: jakarta/jmeter/trunk/docs/api/org/apache/jmeter/protocol/tcp/sampler/TCPClient.html
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/docs/api/org/apache/jmeter/protocol/tcp/sampler/TCPClient.html?rev=650843&r1=650842&r2=650843&view=diff
==============================================================================
--- jakarta/jmeter/trunk/docs/api/org/apache/jmeter/protocol/tcp/sampler/TCPClient.html (original)
+++ jakarta/jmeter/trunk/docs/api/org/apache/jmeter/protocol/tcp/sampler/TCPClient.html Wed Apr 23 05:22:09 2008
@@ -92,10 +92,10 @@
 <DT>public interface <B>TCPClient</B></DL>
 
 <P>
-<DL>
-<DT><B>Version:</B></DT>
-  <DD>$Revision: 493789 $ $Date: 2007-01-07 18:10:21 +0000 (Sun, 07 Jan 2007) $</DD>
-</DL>
+Interface required by TCPSampler for TCPClient implementations.
+<P>
+
+<P>
 <HR>
 
 <P>

Modified: jakarta/jmeter/trunk/docs/api/org/apache/jmeter/protocol/tcp/sampler/TCPClientImpl.html
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/docs/api/org/apache/jmeter/protocol/tcp/sampler/TCPClientImpl.html?rev=650843&r1=650842&r2=650843&view=diff
==============================================================================
--- jakarta/jmeter/trunk/docs/api/org/apache/jmeter/protocol/tcp/sampler/TCPClientImpl.html (original)
+++ jakarta/jmeter/trunk/docs/api/org/apache/jmeter/protocol/tcp/sampler/TCPClientImpl.html Wed Apr 23 05:22:09 2008
@@ -96,6 +96,10 @@
 <DT>public class <B>TCPClientImpl</B><DT>extends <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A><DT>implements <A HREF="../../../../../../org/apache/jmeter/protocol/tcp/sampler/TCPClient.html" title="interface in org.apache.jmeter.protocol.tcp.sampler">TCPClient</A></DL>
 
 <P>
+Sample TCPClient implementation
+<P>
+
+<P>
 <HR>
 
 <P>

Modified: jakarta/jmeter/trunk/docs/api/org/apache/jmeter/protocol/tcp/sampler/package-summary.html
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/docs/api/org/apache/jmeter/protocol/tcp/sampler/package-summary.html?rev=650843&r1=650842&r2=650843&view=diff
==============================================================================
--- jakarta/jmeter/trunk/docs/api/org/apache/jmeter/protocol/tcp/sampler/package-summary.html (original)
+++ jakarta/jmeter/trunk/docs/api/org/apache/jmeter/protocol/tcp/sampler/package-summary.html Wed Apr 23 05:22:09 2008
@@ -83,7 +83,7 @@
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/jmeter/protocol/tcp/sampler/TCPClient.html" title="interface in org.apache.jmeter.protocol.tcp.sampler">TCPClient</A></B></TD>
-<TD>&nbsp;</TD>
+<TD>Interface required by TCPSampler for TCPClient implementations.</TD>
 </TR>
 </TABLE>
 &nbsp;
@@ -97,7 +97,7 @@
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/jmeter/protocol/tcp/sampler/TCPClientImpl.html" title="class in org.apache.jmeter.protocol.tcp.sampler">TCPClientImpl</A></B></TD>
-<TD>&nbsp;</TD>
+<TD>Sample TCPClient implementation</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/jmeter/protocol/tcp/sampler/TCPSampler.html" title="class in org.apache.jmeter.protocol.tcp.sampler">TCPSampler</A></B></TD>

Modified: jakarta/jmeter/trunk/docs/changes.html
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/docs/changes.html?rev=650843&r1=650842&r2=650843&view=diff
==============================================================================
--- jakarta/jmeter/trunk/docs/changes.html (original)
+++ jakarta/jmeter/trunk/docs/changes.html Wed Apr 23 05:22:09 2008
@@ -245,6 +245,13 @@
 						</li>
 									
 
+												<li	>
+								The supplied TCPClient implementation no longer treats tcp.eolByte=0 as special.
+To skip EOL checking, set tcp.eolByte=1000 (or some other value which is not a valid byte)
+
+						</li>
+									
+
 						</ul>
 							  									 				<h4	>
 								Bug fixes
@@ -545,6 +552,13 @@
 
 												<li	>
 								Mail Reader Sampler now creates a sub-sample for each mail.
+						</li>
+									
+
+												<li	>
+								The supplied TCPClient implementation no longer treats tcp.eolByte=0 as special.
+To skip EOL checking, set tcp.eolByte=1000 (or some other value which is not a valid byte)
+
 						</li>
 									
 

Modified: jakarta/jmeter/trunk/docs/usermanual/component_reference.html
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/docs/usermanual/component_reference.html?rev=650843&r1=650842&r2=650843&view=diff
==============================================================================
--- jakarta/jmeter/trunk/docs/usermanual/component_reference.html (original)
+++ jakarta/jmeter/trunk/docs/usermanual/component_reference.html Wed Apr 23 05:22:09 2008
@@ -3133,7 +3133,10 @@
 									
 			
 												<li	>
-								tcp.eolByte - decimal value. Defines the end of line byte value; used to determine when a response has been received
+								tcp.eolByte - decimal value. Defines the end of line byte value; used to determine when a response has been received.
+			JMeter 2.3.1 and earlier used the value zero (0) to mean don't check for EOL bytes; later versions
+			skip the EOL check if the value is outside the range -128 to +127 (inclusive). Thus zero can now be used as an EOL byte.
+			
 						</li>
 									
 		

Modified: jakarta/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPClientImpl.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPClientImpl.java?rev=650843&r1=650842&r2=650843&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPClientImpl.java (original)
+++ jakarta/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPClientImpl.java Wed Apr 23 05:22:09 2008
@@ -37,17 +37,23 @@
 import org.apache.log.Logger;
 
 /**
- * 
+ * Sample TCPClient implementation
  * 
  */
 public class TCPClientImpl implements TCPClient {
-	private static Logger log = LoggingManager.getLoggerForClass();
+	private static final Logger log = LoggingManager.getLoggerForClass();
 
-	private byte eolByte = (byte) JMeterUtils.getPropDefault("tcp.eolByte", 0);
+	private int eolInt = JMeterUtils.getPropDefault("tcp.eolByte", 1000);
+	
+	private byte eolByte = (byte) eolInt; // -128 to +127
+	
+	private boolean eolIgnore = eolInt < -128 || eolInt > 127;
 
 	public TCPClientImpl() {
 		super();
-		log.info("Using eolByte=" + eolByte);
+		if (!eolIgnore) {
+		    log.info("Using eolByte=" + eolByte);
+		}
 	}
 
 	/*
@@ -116,7 +122,7 @@
 		try {
 			while ((x = is.read(buffer)) > -1) {
 				w.write(buffer, 0, x);
-				if ((eolByte != 0) && (buffer[x - 1] == eolByte)) {
+				if (!eolIgnore && (buffer[x - 1] == eolByte)) {
 					break;
 				}
 			}
@@ -160,5 +166,6 @@
 	 */
 	public void setEolByte(byte eolByte) {
 		this.eolByte = eolByte;
+		eolIgnore = false;
 	}
 }

Modified: jakarta/jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/changes.xml?rev=650843&r1=650842&r2=650843&view=diff
==============================================================================
--- jakarta/jmeter/trunk/xdocs/changes.xml (original)
+++ jakarta/jmeter/trunk/xdocs/changes.xml Wed Apr 23 05:22:09 2008
@@ -93,6 +93,9 @@
 <li>The reference value parameter for intSum() is now optional. 
 As a consequence, if a variable name is used, it must not be a valid integer.</li>
 <li>The ant-jmeter.jar is no longer shipped with JMeter. See extras/build.xml for how to aquire it.</li>
+<li>The supplied TCPClient implementation no longer treats tcp.eolByte=0 as special.
+To skip EOL checking, set tcp.eolByte=1000 (or some other value which is not a valid byte)
+</li>
 </ul>
 
 <h4>Bug fixes</h4>
@@ -162,6 +165,9 @@
 <li>Added TESTSTART.MS property / variable = test start time in milliseconds</li>
 <li>Add POP3S and IMAPS protocols to Mail Reader Sampler.</li>
 <li>Mail Reader Sampler now creates a sub-sample for each mail.</li>
+<li>The supplied TCPClient implementation no longer treats tcp.eolByte=0 as special.
+To skip EOL checking, set tcp.eolByte=1000 (or some other value which is not a valid byte)
+</li>
 </ul>
 
 <h4>Non-functional changes</h4>

Modified: jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml?rev=650843&r1=650842&r2=650843&view=diff
==============================================================================
--- jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml (original)
+++ jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml Wed Apr 23 05:22:09 2008
@@ -971,7 +971,10 @@
 			<li>tcp.status.suffix - text that follows a status number</li>
 			<li>tcp.status.properties - name of property file to convert status codes to messages</li>
 			<li>tcp.handler - Name of TCP Handler class (default TCPClientImpl)</li>
-			<li>tcp.eolByte - decimal value. Defines the end of line byte value; used to determine when a response has been received</li>
+			<li>tcp.eolByte - decimal value. Defines the end of line byte value; used to determine when a response has been received.
+			JMeter 2.3.1 and earlier used the value zero (0) to mean don't check for EOL bytes; later versions
+			skip the EOL check if the value is outside the range -128 to +127 (inclusive). Thus zero can now be used as an EOL byte.
+			</li>
 		</ul>
 		The class that handles the connection is defined by the property tcp.handler. 
 		If not found, the class is then searched for in the package org.apache.jmeter.protocol.tcp.sampler.



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