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 using the 2.7.1 docker image, locust exits with code 0 upon clicking "Stop Tests" in the UI.
We swapped in 2.7.0 with the same locustfile and config, and the problem was fixed.
Expected behavior
Locust should continue running (as it does in 2.7.0) after clicking "Stop Tests".
Actual behavior
Cannot run multiple tests, as after each test locust exits, therefore we can't compare results from previous runs.
Locust command line that you ran: locust --config=/home/locust/master.conf
Locust file contents (anonymized if necessary):
import time
import os
from locust import HttpUser, FastHttpUser, task, events
from locust.runners import MasterRunner
from kubernetes import client, config
from kubernetes.stream import stream
API_TOKEN = "" # currently not used
# Basic requests that sleep - for testing queue latency with Puma
class SleepUser(FastHttpUser):
network_timeout = 300
@task(3)
def sleep_one(self):
self.client.get("/sleep?time=1", verify=False)
@task(2)
def sleep_five(self):
self.client.get("/sleep?time=5", verify=False)
@task(5)
def sleep_half(self):
self.client.get("/sleep?time=0.5", verify=False)
@task(1)
def sleep_thirty(self):
self.client.get("/sleep?time=30", verify=False)
# Hook that runs when locust starts
@events.test_start.add_listener
def on_test_start(environment, **kwargs):
print("Starting on_test_start hook")
generate_api_token_script = # removed
success, output = execute_on_app_pod(generate_api_token_script)
global API_TOKEN
API_TOKEN = [line for line in output.split('\n') if 'PERFAPITOKEN:' in line][1].replace('PERFAPITOKEN:', '')
def execute_on_app_pod(command):
# removed - function that executes commands on an in-cluster k8s pod
Damn, that's bad. I need to add better unit tests for the web ui. Can you check the latest prerelease (pip install -U --pre locust) build (or latest master) and see if I managed to fix it?
The version should be available in a couple minutes and be called something like 2.7.2.devX
Describe the bug
When using the 2.7.1 docker image, locust exits with code 0 upon clicking "Stop Tests" in the UI.
We swapped in 2.7.0 with the same locustfile and config, and the problem was fixed.
Expected behavior
Locust should continue running (as it does in 2.7.0) after clicking "Stop Tests".
Actual behavior
Cannot run multiple tests, as after each test locust exits, therefore we can't compare results from previous runs.
Steps to reproduce
Environment
locust --config=/home/locust/master.conf
locust conf:
env vars:
LOCUST_HOST= # url we're testing
LOCUST_LOCUSTFILE=/home/locust/locustfile.py
The text was updated successfully, but these errors were encountered: