-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add ack for worker connection #2077
Conversation
@heyman What do you think? Would it be possible to make a test case that really tests the functionality? (maybe by patching master to discard the first connect message) Is this backwards compatible, assuming an old worker discards the ack? I'm thinking mainly of other worker implementations like @myzhan 's Boomer |
it requires fixes for sure. I'm working on it |
adjust tests
…sibb/locust into add_ack_for_worker_connection
@Nosibb If you can address the stuff in my comment I can probably merge this. |
@Nosibb ? |
@cyberw |
No rush, I just wanted to make sure you were't waiting for me or something :) |
Let me know what do you think about the new test. |
locust/test/test_runners.py
Outdated
@@ -3077,6 +3094,7 @@ def my_task(self): | |||
|
|||
with mock.patch("locust.rpc.rpc.Client", mocked_rpc()) as client: | |||
environment = Environment() | |||
client.mocked_send(Message("ack", {}, "dummy_client_id")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this kind of bloats all the tests, can it be simplified?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are right. It is now simplified
@heyman Any comments? Looks reasonable to me but I didnt originally write the connection logic. I’d prefer the constants be named CONNECT_* instead of CONNECTION_* (to indicat that they relate to connection setup, not once connection has been enabled) |
Thx! I’ll make sure to bump the minor version when I do the next release. |
adding test for worker connection.
Details is issue: #2044