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 try to run a locust test file as config map. I have created the config map from the .py file.
However, when I deploy the helm chart, the master pod crashes with the above error.
Expected behavior
To find the locustfile that I have provided as config map [as stated in the documentation], and run without problems.
Actual behavior
The master pod crashes with error "Could not find any locustfile! Ensure file ends in '.py'"
Environment settings
OS: Linux on Vagrant
Python version: 2.7
Locust version: 0.8.1
Steps to reproduce (for bug reports)
from rabbitmq import get_client
from locust import HttpLocust, Locust, TaskSet, task, events
import pika
from random import randint,choice
from string import ascii_uppercase
class UserBehavior(TaskSet):
host="192.168.99.100"
port=5672
username="guest"
password="guest"
vhost="/"
# create a random string between 1000 and 10000 chars
msg=''.join(choice(ascii_uppercase) for i in range(randint(1000,10000)))
@task
def hit_rabbit(self):
min_wait = 2000
max_wait = 5000
# # # #
credentials = pika.PlainCredentials(self.username, self.password)
parameters = pika.ConnectionParameters(self.host, self.port, self.vhost, credentials)
connection = pika.BlockingConnection(parameters)
channel = connection.channel()
channel.queue_declare(queue='locust_queue')
channel.basic_publish(exchange='', routing_key='route-key-1', body=self.msg)
print("[OK] Sent msg")
connection.close()
# # # #
@task
def stop(self):
self.interrupt()
class WebsiteUser(HttpLocust):
# host = target_url
task_set = UserBehavior
# min_wait = 5000
# max_wait = 15000
The text was updated successfully, but these errors were encountered:
Description of issue
I try to run a locust test file as config map. I have created the config map from the .py file.
However, when I deploy the helm chart, the master pod crashes with the above error.
Expected behavior
To find the locustfile that I have provided as config map [as stated in the documentation], and run without problems.
Actual behavior
The master pod crashes with error "Could not find any locustfile! Ensure file ends in '.py'"
Environment settings
Steps to reproduce (for bug reports)
The text was updated successfully, but these errors were encountered: