-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
locust should exit when a load shape returns None in headless mode #1653
Comments
Your setup doesnt actually spawn any users? time_limit needs to be more than 100. Does it work if you change that? Sounds like might have both have a documentation issue as well as an issue with shape tests not stopping if they never actually spawned any users. @max-rocket-internet You got time to take a look? |
Hi @cyberw! Even by changing the to 600 (the actual value from the example), it still won't exit:
|
Ok, then my hunch was incorrect. Can you run |
@cyberw yes, I confirm:
|
I can reproduce this as well (on windows of all things, but I doubt that is relevant :) @max-rocket-internet can you take a look? You can see the
|
OK cool, I'll make a PR |
Hello!
Describe the bug
When using a LoadTestShape class, the test finishes when its
tick
method returnsNone
, but the Locust process keeps running, even when in--headless
mode.Expected behavior
When Locust is run in
--headless
mode, it should automatically stop running when aLoadTestShape
classtick
method signals a test is complete by returningNone
.Actual behavior
The test is finished, but the Locust process does not exit.
Steps to reproduce
I'm using Docker to run Locust.
file: repro.py
Then run the reproducer like:
Observe that Locust does not return control to the shell and keeps running.
Environment
Dockerized. Everything needed to reproduce is described above.
The text was updated successfully, but these errors were encountered: