Add timeout to locust
This commit is contained in:
@@ -6,7 +6,7 @@ class SendMsg(HttpUser):
|
||||
@task
|
||||
def hello_world(self):
|
||||
try:
|
||||
response = self.client.post("/v1/send")
|
||||
response = self.client.post("/v1/send", timeout=10)
|
||||
if response.status_code == 503:
|
||||
time.sleep(1)
|
||||
response.raise_for_status() # Raise an exception for bad status codes (4xx or 5xx)
|
||||
|
||||
Reference in New Issue
Block a user