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

fixed load/users getting distributed to missing worker #2010

Conversation

radhakrishnaakamat
Copy link

@radhakrishnaakamat radhakrishnaakamat commented Feb 11, 2022

fixed load/users getting distributed to the missing workers.
I am new to open source commit and python.
Please let me know if anything needs to be changed.
fixes #2008 #2010

@cyberw
Copy link
Collaborator

cyberw commented Feb 11, 2022

Can you add a unit test? You can override/shorten the timeout in the tests to reduce the time they take by using pytests mock feature (there should be some examples among the tests)

@radhakrishnaakamat
Copy link
Author

radhakrishnaakamat commented Feb 12, 2022 via email

@@ -16,6 +16,8 @@
if TYPE_CHECKING:
from locust.runners import WorkerNode

HEARTBEAT_DEAD = -10
Copy link
Collaborator

Choose a reason for hiding this comment

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

import from runners instead?

Copy link
Author

Choose a reason for hiding this comment

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

I tried that, but was getting error during initialization.
Will try the reverse tomorrow..

Could you help me with any resource on how to setup debugging in distributed mode.. That would be really helpful for me to contribute in a better way.. I am resorting to print statement for debugging(This is my first python project)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry, I dont have much to contribute with debugging distributed. You know how to run an individual unit test, right?

Copy link
Author

Choose a reason for hiding this comment

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

Yes, initially used to run tox.. later found out the way to run individually.

locust/runners.py Outdated Show resolved Hide resolved
@cyberw
Copy link
Collaborator

cyberw commented Feb 12, 2022

Ignore the python 3.6 failure, that test is just flaky I think...

@mboutet
Copy link
Contributor

mboutet commented Feb 13, 2022

Hi @radhakrishnaakamat, can you link this PR to the corresponding issue #2008?

@radhakrishnaakamat
Copy link
Author

radhakrishnaakamat commented Mar 1, 2022

@mboutet thanks for the pointers in #2008, I was able to fix it in the right places(or at least I feel :-P ) in a better way.
@cyberw could you kindly review it once again, I have updated the tests and tox worked fine too. Thanks!!

@cyberw cyberw merged commit 02e1a19 into locustio:master Mar 1, 2022
@cyberw
Copy link
Collaborator

cyberw commented Mar 1, 2022

👍👍

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.

Load being distributed to missing workers too Version 2.7.4.dev14
3 participants