pjcalvo / locust-influxdb-listener

LocustIO base project with a custom influxDB listener.
MIT License
26 stars 20 forks source link

test_stop() got an unexpected keyword argument 'environment' #14

Closed jmfiola closed 2 years ago

jmfiola commented 2 years ago

When running locust 2.8.3 with the frontend ui, when I stop a test, I get the following error in the console:

test_stop() got an unexpected keyword argument 'environment'

I have deduced that I can comment out line 94 of __init__.py from the locust-influxdb-listener package and this error goes away. I cannot figure out where exactly to allow for this new argument, though.

jmfiola commented 2 years ago

Found the fix. On line 114 of __init__.py, change to:

def test_stop(self, user_count=None, environment=None) -> None:
        self.__register_event(self.node_id, 0, 'test_stopped')

I would do this myself, but I don't have permission to push to a branch/ open a PR right now.

pjcalvo commented 2 years ago

You can fork the code and do a PR from ur fork. That is how it works.

Thanks for looking into it

On Fri, 1 Apr 2022 at 21:37 Jacob Fiola @.***> wrote:

Found the fix. On line 114 of init.py, change to:

def test_stop(self, user_count=None, environment=None) -> None: self.__register_event(self.node_id, 0, 'test_stopped')

I would do this myself, but I don't have permission to push to a branch/ open a PR right now.

— Reply to this email directly, view it on GitHub https://github.com/hoodoo-digital/locust-influxdb-listener/issues/14#issuecomment-1086259626, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABXCVOEWBSKRRBSLJEITH2DVC5F6VANCNFSM5SJO65DA . You are receiving this because you are subscribed to this thread.Message ID: @.*** com>

--


Pablo Calvo Professional Software Engineer

pjcalvo commented 2 years ago

Merged