I wrote a simple load test using Locust ( http://locust.io ).
Now I noticed that sometimes (using a higher load) the response that I get from the mail call has status_code 0 and None . Status code 0 is not automatically recognized as an error in Locust, so I have to check it manually.
My piece of code is the following:
with self.client.get(path, catch_response=True) as response: if response.status_code != 200: response.failure(path + ": returned " + str(response.status_code)) elif check not in response.content: response.failure(path + ": wrong response, missing '" + check + "'")
Note: check is a variable for part of the expected response content.
Question: is this expected behavior? Is this a Locust (or Python) problem or is it a bug in the application under test?
source share