[HZ-5415] Asyncio cancellation tests (#821) · yuce/hazelcast-python-client@753b42a · GitHub
Skip to content

Commit 753b42a

Browse files
authored
[HZ-5415] Asyncio cancellation tests (hazelcast#821)
I've improved cancellation behavior and added cancellation tests.
1 parent fbe9b7a commit 753b42a

3 files changed

Lines changed: 85 additions & 13 deletions

File tree

‎hazelcast/internal/asyncio_invocation.py‎

Lines changed: 11 additions & 9 deletions

‎hazelcast/serialization/service.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def to_data(self, obj, partitioning_strategy=None):
141141
out.write_int_big_endian(serializer.get_type_id())
142142
serializer.write(out, obj)
143143
return Data(out.to_byte_array())
144-
except:
144+
except Exception:
145145
handle_exception(sys.exc_info()[1], sys.exc_info()[2])
146146

147147
def to_object(self, data):
@@ -169,7 +169,7 @@ def to_object(self, data):
169169
else:
170170
raise HazelcastInstanceNotActiveError()
171171
return serializer.read(inp)
172-
except:
172+
except Exception:
173173
handle_exception(sys.exc_info()[1], sys.exc_info()[2])
174174

175175
def write_object(self, out, obj):
@@ -181,7 +181,7 @@ def write_object(self, out, obj):
181181
serializer = self._registry.serializer_for(obj)
182182
out.write_int(serializer.get_type_id())
183183
serializer.write(out, obj)
184-
except:
184+
except Exception:
185185
handle_exception(sys.exc_info()[1], sys.exc_info()[2])
186186

187187
def read_object(self, inp):
@@ -196,7 +196,7 @@ def read_object(self, inp):
196196
else:
197197
raise HazelcastInstanceNotActiveError()
198198
return serializer.read(inp)
199-
except:
199+
except Exception:
200200
handle_exception(sys.exc_info()[1], sys.exc_info()[2])
201201

202202
def _calculate_partitioning_hash(self, obj, partitioning_strategy):
Lines changed: 70 additions & 0 deletions

0 commit comments

Comments
 (0)