You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a scenario where I want to test users accessing the same resource at potentially the same time (to mimic our real-world behavior) which can potentially result in failures.
The text was updated successfully, but these errors were encountered:
Yep, Locust uses gevent and greenlets, and though each Locust instance runs in it's own greenlet, you could spawn greenlets from within a task yourself. Something like this should work:
@taskdefmy_task(self):
fromgevent.poolimportGroupgroup=Group()
group.spawn(lambda: self.client.get("/some_url")
group.spawn(lambda: self.client.get("/some_url")
group.join() # wait for greenlets to finish
Is it possible to have tasks run in parallel?
I have a scenario where I want to test users accessing the same resource at potentially the same time (to mimic our real-world behavior) which can potentially result in failures.
The text was updated successfully, but these errors were encountered: