mirror of https://github.com/apache/jmeter.git
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)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/jmeter/trunk@650843 13f79535-47bb-0310-9956-ffa450edef68
Former-commit-id: 1609c89d80
This commit is contained in:
parent
d0f152391f
commit
5b50e2afc3
|
|
@ -430,7 +430,8 @@ wmlParser.types=text/vnd.wap.wml
|
|||
#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=
|
||||
|
|
|
|||
|
|
@ -37,17 +37,23 @@ import org.apache.jorphan.logging.LoggingManager;
|
|||
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 @@ public class TCPClientImpl implements TCPClient {
|
|||
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 class TCPClientImpl implements TCPClient {
|
|||
*/
|
||||
public void setEolByte(byte eolByte) {
|
||||
this.eolByte = eolByte;
|
||||
eolIgnore = false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,6 +93,9 @@ To revert to earlier behaviour, comment or change the properties classfinder.fun
|
|||
<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 @@ As a special case, if the HTTP Sampler path starts with "http://" or "https://"
|
|||
<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>
|
||||
|
|
|
|||
|
|
@ -971,7 +971,10 @@ Currently the only way to changes these is via the SampleResponse methods:
|
|||
<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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue