Summary: | TCP Sampler handles badly errors | ||
---|---|---|---|
Product: | JMeter - Now in Github | Reporter: | Philippe Mouawad <p.mouawad> |
Component: | Main | Assignee: | JMeter issues mailing list <issues> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | p.mouawad |
Priority: | P2 | ||
Version: | 2.5.1 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Bug Depends on: | |||
Bug Blocks: | 40750 |
Description
Philippe Mouawad
2011-10-27 16:57:04 UTC
Also fixed NPE in TCPSampler: if an exception occurs , setSoTimeout will throw NPE if init fails Date: Thu Oct 27 20:45:11 2011 New Revision: 1190014 URL: http://svn.apache.org/viewvc?rev=1190014&view=rev Log: Bug 52104 - TCP Sampler handles badly errors Modified: jakarta/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/BinaryTCPClientImpl.java jakarta/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/LengthPrefixedBinaryTCPClientImpl.java jakarta/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPClient.java jakarta/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPClientImpl.java jakarta/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java jakarta/jmeter/trunk/xdocs/changes.xml I'm not sure it's the best solution to throw an IOException on read() errors If a response is truncated or otherwise incomplete, it might still contain useful information. This information was previously returned. Maybe there should be some kind of status code returned from read (e.g. Throwable?) Perhaps this could be a separate method (with default implementation in the abstract class). Thoughts? (In reply to comment #2) > I'm not sure it's the best solution to throw an IOException on read() errors > > If a response is truncated or otherwise incomplete, it might still contain > useful information. This information was previously returned. > But Sample was marked OK while it was in Error. > Maybe there should be some kind of status code returned from read (e.g. > Throwable?) I don't understand what you mean. Do you want to provide what was partially read ? > > Perhaps this could be a separate method (with default implementation in the > abstract class). > > Thoughts? Yes, I think it would be useful to provide the partial response, but it should be marked as in error. 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 This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2628 |