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
When running Locust sometimes the self.quit() fails and the test doesn't stop. This is a problem for us because we are running it inside the Argo workflow so this step never ends.
Full Traceback:
Traceback (most recent call last):
File "src/gevent/greenlet.py", line 906, in gevent._gevent_cgreenlet.Greenlet.run
File "/usr/local/lib/python3.8/site-packages/locust/runners.py", line 334, in shape_worker
self.quit()
File "/usr/local/lib/python3.8/site-packages/locust/runners.py", line 362, in quit
self.stop()
File "/usr/local/lib/python3.8/site-packages/locust/runners.py", line 413, in stop
super().stop()
File "/usr/local/lib/python3.8/site-packages/locust/runners.py", line 354, in stop
self.stop_users(self.user_count)
File "/usr/local/lib/python3.8/site-packages/locust/runners.py", line 223, in stop_users
user = g.args[0]
IndexError: tuple index out of range
<REDACTED_DATE> <Greenlet at 0x7f88ca99fae0: <bound method Runner.shape_worker of <locust.runners.LocalRunner object at 0x7f88cabaffd0>>> failed with IndexError
Expected behavior
Locust should exit and maybe return an error.
Actual behavior
After the error locust is still working and sending requests. Pipeline with test never ends.
Steps to reproduce
I wasn't able to reproduce it 100% of the time. I would love to get some general direction if this is a known problem with our Locust file, Locust or maybe something else. Any help would be great. Our Locust file deployed inside Docker:
importmathfromlocustimportHttpUser, TaskSet, task, betweenfromlocustimportLoadTestShapeimportosclassUserBehavior(TaskSet):
@taskdefpollute_memory(self):
abc=self.client.get("/cars")
classWebsiteUser(HttpUser):
tasks= [UserBehavior]
wait_time=between(1, 3)
classSinusWave(LoadTestShape):
ramp_up_time=os.getenv('RAMP_UP_TIME')
ramp_up_slope=os.getenv('RAMP_UP_SLOPE')
amplitude=os.getenv('STABLE_AMPLITUDE')
frequency=os.getenv('STABLE_FREQUENCY')
offset=os.getenv("STABLE_OFFSET")
time_limit=os.getenv('STABLE_MAX_TIME_LIMIT_IN_S')
ramp_up_value=0deftick(self):
run_time=round(self.get_run_time())
ifrun_time<int(self.time_limit):
ifrun_time<int(self.ramp_up_time):
self.ramp_up_value=float(self.ramp_up_slope) *run_timereturn (round(self.ramp_up_value), 1)
else:
user_count=float(self.amplitude) *math.sin((float(self.frequency) *run_time) +float(self.offset)) +float(self.ramp_up_value)
ifuser_count<=0:
user_count=float(self.ramp_up_value) # Minimal value of sinusreturn (round(user_count), 20) #(user_count, spawn_rate - number of users to start per second)else:
returnNone
Environment
OS: Kubernetes/Docker
Python version: 3.8
Locust version: 1.4.3
Locust command line that you ran: locust --host="http://${HOSTNAME}" --headless
The text was updated successfully, but these errors were encountered:
Describe the bug
When running Locust sometimes the
self.quit()
fails and the test doesn't stop. This is a problem for us because we are running it inside the Argo workflow so this step never ends.Full Traceback:
Expected behavior
Locust should exit and maybe return an error.
Actual behavior
After the error locust is still working and sending requests. Pipeline with test never ends.
Steps to reproduce
I wasn't able to reproduce it 100% of the time. I would love to get some general direction if this is a known problem with our Locust file, Locust or maybe something else. Any help would be great. Our Locust file deployed inside Docker:
Environment
locust --host="http://${HOSTNAME}" --headless
The text was updated successfully, but these errors were encountered: