Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The run_single_user mode doesn't fire some of the events #2638

Closed
2 tasks done
iAndriy opened this issue Mar 14, 2024 · 2 comments
Closed
2 tasks done

The run_single_user mode doesn't fire some of the events #2638

iAndriy opened this issue Mar 14, 2024 · 2 comments
Labels
bug stale Issue had no activity. Might still be worth fixing, but dont expect someone else to fix it

Comments

@iAndriy
Copy link

iAndriy commented Mar 14, 2024

Prerequisites

Description

Currently the helper function which might be used for debugger doesn't fire the quit,quitting, test_stop and potentially other events.
Reference to related code:
https://github.com/locustio/locust/blob/master/locust/debug.py#L149

Command line

python sample_below.py

Locustfile contents

from locust import FastHttpUser, events, task, run_single_user
from locust.exception import StopUser


@events.quitting.add_listener
def _(environment, *args, **kwargs):
    logger.info('Qutting event has been fired.')

class TestRequest(FastHttpUser):
    @task
    def test_request(self):
        raise StopUser()

if __name__ == "__main__":
    from locust import run_single_user

    run_single_user(TestRequest, loglevel='INFO')
    print(stats_history())

Python version

Any

Locust version

2.24.0

Operating system

OS X

@iAndriy iAndriy added the bug label Mar 14, 2024
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the stale Issue had no activity. Might still be worth fixing, but dont expect someone else to fix it label May 14, 2024
Copy link

This issue was closed because it has been stalled for 10 days with no activity. This does not necessarily mean that the issue is bad, but it most likely means that nobody is willing to take the time to fix it. If you have found Locust useful, then consider contributing a fix yourself!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug stale Issue had no activity. Might still be worth fixing, but dont expect someone else to fix it
Projects
None yet
Development

No branches or pull requests

1 participant