diff --git a/hazelcast/invocation.py b/hazelcast/invocation.py index 2709a28cad..295f8ad879 100644 --- a/hazelcast/invocation.py +++ b/hazelcast/invocation.py @@ -237,7 +237,7 @@ def _notify_error(self, invocation, error): def _should_retry(self, invocation, error): if invocation.connection and isinstance(error, (IOError, TargetDisconnectedError)): - return True + return False if invocation.uuid and isinstance(error, TargetNotMemberError): return False diff --git a/tests/reconnect_test.py b/tests/reconnect_test.py index 4a73157b0e..40667d9f6f 100644 --- a/tests/reconnect_test.py +++ b/tests/reconnect_test.py @@ -69,7 +69,7 @@ def test_listener_re_register(self): "cluster_connect_timeout": 5.0, }) - map = client.get_map("map") + map = client.get_map("map").blocking() collector = event_collector() reg_id = map.add_entry_listener(added_func=collector) @@ -83,7 +83,7 @@ def assert_events(): if client.lifecycle_service.is_running(): while True: try: - map.put("key-%d" % count.get_and_increment(), "value").result() + map.put("key-%d" % count.get_and_increment(), "value") break except TargetDisconnectedError: pass