Skip to content
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

Replace deprecated request_success() and request_failure() with request() from locust.event.Events.request #12

Open
thx123 opened this issue May 3, 2024 · 1 comment

Comments

@thx123
Copy link

thx123 commented May 3, 2024

The deprecated request_success() and request_failure() are already removed in locust.event.Events.request upstream, causing the following error:

File "/Users/htie/coding/redis-load-test/Scripts/redis_get_set.py", line 88, in get_time self.client.query(self.key) File "/Users/htie/coding/redis-load-test/Scripts/redis_get_set.py", line 50, in query events.request_success.fire(

The fix is to simply relace them with request() method name, per:
https://stackoverflow.com/questions/76016708/locust-events-object-has-no-attribute-request-success

Verified working with load tests, after the fix, the errors are gone, and all graphs are displayed properly.

thx123 added a commit to thx123/redis-load-test that referenced this issue May 3, 2024
@thx123
Copy link
Author

thx123 commented May 3, 2024

I can't push local branch to this repo. Here is the simple fix from my fork:

e4f2092

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant