mirror of https://github.com/apache/jmeter.git
TCP sampler now calls setupTest() and teardownTest() methods
git-svn-id: https://svn.apache.org/repos/asf/jakarta/jmeter/trunk@711614 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ed49a75e84
commit
d89a1ea71e
|
|
@ -31,8 +31,15 @@ import java.io.OutputStream;
|
|||
* Interface required by TCPSampler for TCPClient implementations.
|
||||
*/
|
||||
public interface TCPClient {
|
||||
|
||||
/**
|
||||
* Versions of JMeter after 2.3.2 invoke this method when the thread starts.
|
||||
*/
|
||||
void setupTest();
|
||||
|
||||
/**
|
||||
* Versions of JMeter after 2.3.2 invoke this method when the thread ends.
|
||||
*/
|
||||
void teardownTest();
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -368,6 +368,9 @@ public class TCPSampler extends AbstractSampler implements ThreadListener {
|
|||
protocolHandler = getProtocol();
|
||||
log.debug("Using Protocol Handler: " + //$NON-NLS-1$
|
||||
(protocolHandler == null ? "NONE" : protocolHandler.getClass().getName())); //$NON-NLS-1$
|
||||
if (protocolHandler != null){
|
||||
protocolHandler.setupTest();
|
||||
}
|
||||
}
|
||||
|
||||
private void closeSocket() {
|
||||
|
|
@ -386,5 +389,8 @@ public class TCPSampler extends AbstractSampler implements ThreadListener {
|
|||
public void threadFinished() {
|
||||
log.debug("Thread Finished"); //$NON-NLS-1$
|
||||
closeSocket();
|
||||
if (protocolHandler != null){
|
||||
protocolHandler.teardownTest();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -145,6 +145,7 @@ These are implemented in the AbstractTestElement class which all elements should
|
|||
<li>CSVSaveService - check for EOF while reading quoted string</li>
|
||||
<li>Bug 46142 - JMS Receiver now uses MessageID</li>
|
||||
<li>Bug 46148 - HTTP sampler fails on SSL requests when logging for jmeter.util is set to DEBUG</li>
|
||||
<li>TCP sampler now calls setupTest() and teardownTest() methods</li>
|
||||
</ul>
|
||||
|
||||
<h3>Improvements</h3>
|
||||
|
|
|
|||
Loading…
Reference in New Issue