Skip to content

Commit

Permalink
Merge pull request #2676 from locustio/update-geventhttpclient-max_re…
Browse files Browse the repository at this point in the history
…quests-and-max_retries-behaviour

Update geventhttpclient and adjust FastHttpUser max_retries / max_redirects
  • Loading branch information
cyberw committed Apr 17, 2024
2 parents 680ec6b + 417df8a commit 6ddfc61
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions locust/contrib/fasthttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,11 +306,11 @@ class FastHttpUser(User):
connection_timeout: float = 60.0
"""Parameter passed to FastHttpSession"""

max_redirects: int = 5
"""Parameter passed to FastHttpSession. Default 5, meaning 4 redirects."""
max_redirects: int = 30
"""Parameter passed to FastHttpSession."""

max_retries: int = 1
"""Parameter passed to FastHttpSession. Default 1, meaning zero retries."""
max_retries: int = 0
"""Parameter passed to FastHttpSession."""

insecure: bool = True
"""Parameter passed to FastHttpSession. Default True, meaning no SSL verification."""
Expand Down
2 changes: 1 addition & 1 deletion locust/test/test_fasthttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ class MyUser(FastHttpUser):

def test_max_redirect_setting(self):
class MyUser(FastHttpUser):
max_redirects = 1 # max_redirects and max_retries are funny names, because they are actually max attempts
max_redirects = 0
host = "http://127.0.0.1:%i" % self.port

l = MyUser(self.environment)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dependencies = [
"requests >=2.26.0",
"msgpack >=1.0.0",
"pyzmq >=25.0.0",
"geventhttpclient >=2.0.11",
"geventhttpclient >=2.2.1",
"ConfigArgParse >=1.5.5",
"tomli >=1.1.0; python_version<'3.11'",
"psutil >=5.9.1",
Expand Down

0 comments on commit 6ddfc61

Please sign in to comment.