-
Notifications
You must be signed in to change notification settings - Fork 73
Properly shutdown clients in reconnect tests #394
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
Properly shutdown clients in reconnect tests #394
Conversation
Client shutdown call were missing for the some of the reconnect tests. Added that and added a secondary shutdown mechanism in case something goes wrong in the tests (like assertion failures) and we couldn't shutdown the client.
srknzl
left a comment
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.
LGTM 👍🏻 Left a question and a nit
|
|
||
| client.shutdown() | ||
| self.rc.terminateCluster(cluster.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.
how was the client shutting down before this added?
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.
It was not :D That was the problem
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.
ok that question was to clarify 😄 , thanks
|
|
||
| self.client = client | ||
|
|
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.
nit: could do this as well (same for other self.client = client):
self.client = HazelcastClient(
cluster_name=cluster.id,
cluster_members=[client_address],
cluster_connect_timeout=sys.maxsize,
)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.
Then I head to reference them as self.client instead of client, which I don't like
|
Thanks for the review Serkan |
Client shutdown calls were missing for some of the reconnect tests.
Added that and added a secondary shutdown mechanism in case something
goes wrong in the tests (like assertion failures) and we couldn't shutdown
the client.