-
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
network_timeout is not respected #1307
Comments
I've added some additional checks to the test but that did not make it fail: 12c4d33 |
Good catch! |
I tried it from master, but now I get the following error:
Which is weird because there's a test in locust to make sure that I get a different error if the tasks are empty. Have the same code as I had above. I also tried pip freeze
I got this ☝️ by basically running |
Hmm. Not sure what is the problem (it could definitely be related to 1.0 changes), but if you use this syntax it should work:
|
Yes, this works and the timeout works as well, I ran it against my mock website with a timeout of Thank you! |
I'm using
network_timeout = 1.0
on aFastHttpLocust
subclass, but the slow pages still succeed. I would expect that after 1.0s, the request would stop and another one would start. Additionally, I would expect the page load to count as an error. What I'm seeing though is that Locust is waiting for the page to load and counting it as a success.I know there's a test in the codebase for this, but it only checks if there was an error in the slow page, but this could be due to other things.
Code for my Flask test web server `app.py`
My `locust.py` file:
I run the web server with
flask run --reload
(needpip install flask
) and run the locust without the GUI usinglocust -f locust.py --no-web -c 10 -r 10 -t 10s --host http://localhost:5000
.Here are the results
You can see that all the requests were successful, but all of them should have failed and there should have been more requests, as each one should fail after 1.0 s.
Environment:
The text was updated successfully, but these errors were encountered: