public class TimeoutException extends GrinderException
The Grinder throws this exception, rather than simply marking a test failure and continuing, since the rest of the test script might be invalid if the request didn't complete successfully. If you want to ignore whether a particular request timed out or not, you can write something like:
from net.grinder.plugin.http import TimeoutException
# ...
try: myrequest.GET("http://myurl.com")
except TimeoutException: pass
If you'd also like to mark the current test as "bad", do this:
grinder.statistics.delayReports = 1
# ...
try: myrequest.GET("http://myurl.com")
except TimeoutException: grinder.statistics.forLastTest.success = 0
| Constructor and Description |
|---|
TimeoutException(Throwable t)
Creates a new
TimeoutException instance. |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic TimeoutException(Throwable t)
TimeoutException instance.t - Cause.Copyright © 2000-2014. All Rights Reserved.