You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run the test with --run-time longer than stop_timeout, e.g. 20s: locust --only-summary --no-web --run-time=20s
Then the test will stop after 10s not after 20s as defined by --run-time:
Check the timestamps in the log below:
[2019-10-22 10:31:32,645] local/INFO/locust.runners: All locusts hatched: SUT: 1
[2019-10-22 10:31:42,570] local/INFO/locust.runners: All locusts dead
[2019-10-22 10:31:42,571] local/INFO/locust.main: Shutting down (exit code 0), bye
Environment settings
OS: Linux 5.3.6
Python version: 3.7.4
Locust version: 0.11.0
The text was updated successfully, but these errors were encountered:
Don't use Locust.stop_timeout. It should be removed from the code base (I wasn't actually aware
it was still around). As far as I can tell It's not documented anywhere so it shouldn't be considered as part of the official API. The time limit mechanism in the current implementation schedules a greenlet - which issues a call to locust_runner.quit() - at the specified time. It does not depend on the individual locust users ending their run loop.
Describe the bug
stop_timeout
defined in Locust class takes precedence over--run-time
option.Expected behavior
To my mind
--run-time
should take precedence overstop_timeout
.Actual behavior
ditto
Steps to reproduce
Create a simple Locust class with
stop_timeout
defined:locustfile.py
:Run the test with
--run-time
longer thanstop_timeout
, e.g.20s
:locust --only-summary --no-web --run-time=20s
Then the test will stop after
10s
not after20s
as defined by--run-time
:Check the timestamps in the log below:
Environment settings
The text was updated successfully, but these errors were encountered: