In fact I don't know :-)

In case of exception, connectEnd won't be called so for example, if issue
is due to timeout, value will not be equal to timeout.
Should we put it in a try/finally arount getSocket ?
Thanks

On Tue, Mar 22, 2016 at 8:29 PM, Felix Schumacher <
[email protected]> wrote:

>
>
> Am 22. März 2016 20:22:22 MEZ, schrieb Philippe Mouawad <
> [email protected]>:
> >Hi Felix,
> >Do you think it is ok in case of Connection error ?
>
> Yes,  that is why I put connectEnd there. But feel free to place it
> somewhere else. I wouldn't be angry.
>
> Regards,
> Felix
>
> >
> >Thank you
> >Regards
> >
> >On Mon, Mar 21, 2016 at 7:17 PM, <[email protected]> wrote:
> >
> >> Author: fschumacher
> >> Date: Mon Mar 21 18:17:03 2016
> >> New Revision: 1736072
> >>
> >> URL: http://svn.apache.org/viewvc?rev=1736072&view=rev
> >> Log:
> >> TCP Sampler: Set connect time in sampler when connection is
> >established.
> >>
> >> Bugzilla Id: 59205
> >>
> >> Modified:
> >>
> >>
>
> >jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
> >>     jmeter/trunk/xdocs/changes.xml
> >>
> >> Modified:
> >>
>
> >jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
> >> URL:
> >>
> >
> http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java?rev=1736072&r1=1736071&r2=1736072&view=diff
> >>
> >>
>
> >==============================================================================
> >> ---
> >>
>
> >jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
> >> (original)
> >> +++
> >>
>
> >jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
> >> Mon Mar 21 18:17:03 2016
> >> @@ -393,6 +393,7 @@ public class TCPSampler extends Abstract
> >>          res.sampleStart();
> >>          try {
> >>              Socket sock = getSocket(socketKey);
> >> +            res.connectEnd();
> >>              if (sock == null) {
> >>                  res.setResponseCode("500"); //$NON-NLS-1$
> >>                  res.setResponseMessage(getError());
> >>
> >> Modified: jmeter/trunk/xdocs/changes.xml
> >> URL:
> >>
> >
> http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1736072&r1=1736071&r2=1736072&view=diff
> >>
> >>
>
> >==============================================================================
> >> --- jmeter/trunk/xdocs/changes.xml (original)
> >> +++ jmeter/trunk/xdocs/changes.xml Mon Mar 21 18:17:03 2016
> >> @@ -171,6 +171,7 @@ Summary
> >>      <li><bug>58300</bug> Make existing Java Samplers implement
> >> Interruptible</li>
> >>      <li><bug>58160</bug>JMS Publisher : reload file content if file
> >name
> >> changes. Based partly on a patch contributed by Maxime Chassagneux
> >> (maxime.chassagneux at gmail.com)</li>
> >>      <li><bug>58786</bug>JDBC Sampler : Replace Excalibur DataSource
> >by
> >> more up to date library commons-dbcp2</li>
> >> +    <li><bug>59205</bug>TCP Sampler: Set connect time in sampler
> >when
> >> connection is established.</li>
> >>  </ul>
> >>
> >>  <h3>Controllers</h3>
> >>
> >>
> >>
>
>


-- 
Cordialement.
Philippe Mouawad.

Reply via email to