2

The problem is that some requests take a pair of seconds to answer and for others JMeter might wait forever. So I need to have a test plan in which if JDBC request response time crosses 30 sec for any of the sample, it should fail the sample, stop it and move on to the next sample.

How to make it work?

Ori Marko
  • 56,308
  • 23
  • 131
  • 233

3 Answers3

1

Add Duration Assertion which will stop waiting more than 30 seconds, fail the sampler and move to next sampler as you need

Duration Assertion tests that each response was received within a given amount of time. Any response that takes longer than the given number of milliseconds (specified by the user) is marked as a failed response.

Ori Marko
  • 56,308
  • 23
  • 131
  • 233
0

You can set the Querytimeout in the JDBC Request sampler.

Check the screenshot belowenter image description here

krishnarajanr
  • 696
  • 8
  • 20
0

Starting from JMeter 2.11 there is a possibility to specify query timeout in the JDBC Test Elements:

enter image description here

It is also possible to use Duration Assertion, however in this case JMeter will still wait for the query completion and only mark the sampler as failed after it's done.

Dmitri T
  • 159,985
  • 5
  • 83
  • 133