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

Handle user classes with weight = 0 #1860

Merged
merged 1 commit into from
Aug 20, 2021

Conversation

mboutet
Copy link
Contributor

@mboutet mboutet commented Aug 19, 2021

WIP

Remove user classes having a weight of zero.
"""
if len(self.user_classes) == 0:
# Preserve previous behaviour that allowed no user classes to be specified.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was it ok to specify no user classes before? I dont know when that should not be considered an error?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that this should make locust fail fast because it is invalid. The reason I put it there is that otherwise more than 20 tests are failing. If I remove this condition, I'll have to update all those tests so that they contain fake user class.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok! Yea I guess we still fail in main.py on line 165 if you actually launch locust proper without any classes. Ready to merge, or is there something else that is WIP?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ready

@mboutet mboutet marked this pull request as ready for review August 20, 2021 12:10
@cyberw cyberw merged commit d33d882 into locustio:master Aug 20, 2021
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.

2 participants