Bug 58736 - Add Sample Timeout support
Summary: Add Sample Timeout support
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 2.13
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-14 20:41 UTC by Sebb
Modified: 2015-12-19 15:59 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 2015-12-14 20:41:37 UTC
[See Bug 58299]

Samplers such as HTTP can take a long time to return all the date.

There are timeout settings, but these apply to each network message, not the overall sample.

Once the sampler has completed, the duration assertion can be used to flag overlong samples, but this could take a very long time.

Rather than update every sampler and its GUI to support an extra timeout option, it is possible to use the Interruptible.interrupt() method.

One way to do this is to implement the sampleStarted/sampleStopped methods of the SampleListener interface. These can then be used to schedule/cancel timer tasks to interrupt the sampler.
Comment 1 Sebb 2015-12-14 20:53:40 UTC
URL: http://svn.apache.org/viewvc?rev=1720012&view=rev
Log:
Add Sample Timeout support
Bugzilla Id: 58736

Added:
    jmeter/trunk/src/components/org/apache/jmeter/modifiers/SampleTimeout.java   (with props)
    jmeter/trunk/src/components/org/apache/jmeter/modifiers/gui/SampleTimeoutGui.java   (with props)
    jmeter/trunk/xdocs/images/screenshots/sample_timeout.png   (with props)
Modified:
    jmeter/trunk/bin/jmeter.properties
    jmeter/trunk/bin/saveservice.properties
    jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
    jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties
    jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java
    jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java
    jmeter/trunk/xdocs/changes.xml
    jmeter/trunk/xdocs/usermanual/component_reference.xml
Comment 2 Philippe Mouawad 2015-12-17 22:33:24 UTC
Author: pmouawad
Date: Thu Dec 17 22:33:01 2015
New Revision: 1720688

URL: http://svn.apache.org/viewvc?rev=1720688&view=rev
Log:
Add Sample Timeout support
Fix property name to match the one in jmeter.properties
Bugzilla Id: 58736

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java
Comment 3 Sebb 2015-12-19 02:05:39 UTC
URL: http://svn.apache.org/viewvc?rev=1720879&view=rev
Log:
Add Sample Timeout support
Use separate interface to avoid problems with RMI
Bugzilla Id: 58736

Added:
    jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleMonitor.java   (with props)
Modified:
    jmeter/trunk/src/components/org/apache/jmeter/modifiers/SampleTimeout.java
    jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java
Comment 4 Philippe Mouawad 2015-12-19 10:33:34 UTC
Author: pmouawad
Date: Sat Dec 19 10:33:00 2015
New Revision: 1720893

URL: http://svn.apache.org/viewvc?rev=1720893&view=rev
Log:
Bug 58736 - Add Sample Timeout support
Ensure sampleEnded is called
Drop property  JMeterThread.sampleStarted, users who don't want to use the feature won't add the Sample Timeout element
Bugzilla Id: 58736

Modified:
    jmeter/trunk/bin/jmeter.properties
    jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java
Comment 5 Sebb 2015-12-19 15:58:40 UTC
URL: http://svn.apache.org/viewvc?rev=1720942&view=rev
Log:
Add Sample Timeout support
Drop unused constant, now that the property is no longer used
Comment 6 Sebb 2015-12-19 15:59:12 UTC
URL: http://svn.apache.org/viewvc?rev=1720944&view=rev
Log:
Add Sample Timeout support
It's cheaper to pass the sample to the methods; no need to use the context
Bugzilla Id: 58736

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/modifiers/SampleTimeout.java
    jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleMonitor.java
    jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java