-
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
fix master runner not close rpc server #1935
Conversation
That test was added by @delulu about 2 years ago. Maybe he/she can explain it? |
@cyberw Traceback (most recent call last):
File "/home/runner/work/locust/locust/locust/test/test_runners.py", line 909, in test_test_stop_event
master.quit()
File "/home/runner/work/locust/locust/locust/runners.py", line 825, in quit
self.server.send_to_client(Message("quit", None, client.id))
File "/home/runner/work/locust/locust/locust/util/exception_handler.py", line 13, in wrapper
return function(*args, **kwargs)
File "/home/runner/work/locust/locust/locust/rpc/zmqrpc.py", line 29, in send_to_client
raise RPCError("ZMQ sent failure") from e
locust.exception.RPCError: ZMQ sent failure could kindly help me, thanks |
Sorry, I dont have time atm. Lets hope @delulu responds. |
I'm going to close this due to inactivity soon. Sorry there hasnt been any clarification on what that test does. Do you have a specific issue you are trying to fix with this change? |
the rpc server will not close when use locust as a library, so I add |
I see. You can change delulus test case from
to something like
Or maybe change the mock to not throw an exception makes more sense... |
Thanks for help. But I try to understand this test case. That found in this test case:
The error is occurred by So, it should not raise error? |
Aha, I thought it was due to the special code in MockedRpcServerClient ( https://github.com/locustio/locust/blob/master/locust/test/test_runners.py#L89), but I guess that's not where the error is coming from. Then I dont have any ideas, sorry. |
I found the reason maybe. 1st call then call |
thx! |
Fix "socket operation on non-socket" at shutdown, by reverting #1935
No description provided.