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

Fix #1910 KeyboardInterrupt with load shapes #2375

Merged

Conversation

JevonCowell
Copy link
Contributor

To be honest this is probably more of a bandaid solution, but for dealing with KeyboardInterrupt this is hopefully sufficient. I've added an integration test that raises a KeyboardInterrupt. The logic being that if properly handled, the test will end properly, @events.test_stop.add_listener will execute, and a report will be generated.

@JevonCowell
Copy link
Contributor Author

Please let me know if any other tests need to be written. This is my first Pull Request on an Open Source Project 😃.

@cyberw cyberw changed the title Issue 1910: Fix KeyboardInterrupt Bug Fix #1910: FKeyboardInterrupt Bug Jul 31, 2023
@cyberw cyberw changed the title Fix #1910: FKeyboardInterrupt Bug Fix #1910 KeyboardInterrupt with load shapes Jul 31, 2023
@cyberw
Copy link
Collaborator

cyberw commented Jul 31, 2023

Thanks! I dont think the flake8 issue is your fault so you can ignore it. In the test, I think you should send the interrupt signal from the test rather than throwing an exception from inside the locustfile. Can you change that? There are some other tests like that in test_main.py

@cyberw
Copy link
Collaborator

cyberw commented Jul 31, 2023

Nice! For future contributions, use #issuenumber instead of ISSUE-issuenumber: in commit messages to connect them to a specific issue (or leave it out completely, its enough that the PR name and possibly branch name reference it).

I'll squash your commits when merging so I can edit the messages :)

I'll fix the flake8 issue in master.

@cyberw cyberw merged commit 8e8a341 into locustio:master Jul 31, 2023
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants