Commit 79be7787 authored by Julien Muchembled's avatar Julien Muchembled

Fix random failure in testRecycledClientUUID

Traceback (most recent call last):
  File "neo/tests/threaded/test.py", line 838, in testRecycledClientUUID
    x = client.load(ZERO_TID)
  [...]
  File "neo/tests/threaded/test.py", line 822, in notReady
    m2s.remove(delayNotifyInformation)
  File "neo/tests/threaded/__init__.py", line 482, in remove
    del self.filter_dict[filter]
KeyError: <function delayNotifyInformation at 0x7f511063a578>
parent c4ac45a8
...@@ -482,6 +482,12 @@ class ConnectionFilter(object): ...@@ -482,6 +482,12 @@ class ConnectionFilter(object):
del self.filter_dict[filter] del self.filter_dict[filter]
self._retry() self._retry()
def discard(self, *filters):
try:
self.remove(*filters)
except KeyError:
pass
def __contains__(self, filter): def __contains__(self, filter):
return filter in self.filter_dict return filter in self.filter_dict
......
...@@ -819,7 +819,7 @@ class Test(NEOThreadedTest): ...@@ -819,7 +819,7 @@ class Test(NEOThreadedTest):
def delayNotifyInformation(conn, packet): def delayNotifyInformation(conn, packet):
return isinstance(packet, Packets.NotifyNodeInformation) return isinstance(packet, Packets.NotifyNodeInformation)
def notReady(orig, *args): def notReady(orig, *args):
m2s.remove(delayNotifyInformation) m2s.discard(delayNotifyInformation)
return orig(*args) return orig(*args)
cluster = NEOCluster() cluster = NEOCluster()
try: try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment