Bug 52087 - TCPClient interface does not allow for partial reads
TCPClient interface does not allow for partial reads
Status: RESOLVED FIXED
Product: JMeter
Classification: Unclassified
Component: Main
2.5.1
PC Windows XP
: P2 normal (vote)
: ---
Assigned To: JMeter issues mailing list
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2011-10-25 18:27 UTC by Sebb
Modified: 2011-11-10 08:26 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebb 2011-10-25 18:27:40 UTC
See Bug 52072.

The TCPClient interface does not allow for returning a status from the read (or write) method. There is no way to indicate to the controlling sampler that the connection should be closed regardless of the "re-use connection" setting.

The documentation for TCP Sampler (in component reference) states:

>>
If an error is detected - or "Re-use connection" is not selected - the socket is closed. Another socket will be reopened on the next sample.
<<

This does not currently happen.
Comment 1 Philippe Mouawad 2011-11-05 13:13:16 UTC
With changes in 52104, isn't this one fixed once we add getIncompleteRead method ?
Because now, read/write methods do not catch anymore Exception, so it will flow until sampler which will call closeSocket.
Comment 2 Sebb 2011-11-05 13:34:02 UTC
Yes, this is related to Bug 52104.

When that has been fixed, this will hopefully be fixed.
Comment 3 Philippe Mouawad 2011-11-10 08:26:48 UTC
Date: Thu Nov 10 08:25:32 2011
New Revision: 1200210

URL: http://svn.apache.org/viewvc?rev=1200210&view=rev
Log:
Bug 52104 - TCP Sampler handles badly errors
Bug 52087 - TCPClient interface does not allow for partial reads

Added:
   jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/ReadException.java   (with props)
Modified:
   jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/BinaryTCPClientImpl.java
   jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/LengthPrefixedBinaryTCPClientImpl.java
   jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPClient.java
   jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPClientImpl.java
   jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
   jmeter/trunk/xdocs/changes.xml