Commit 61009341 authored by Julien Muchembled's avatar Julien Muchembled

Thread.isAlive is deprecated

parent af06676a
......@@ -74,7 +74,7 @@ class ThreadedPoll(object):
# XXX: ideally, we should wake thread up here, to be sure not
# to wait forever.
thread.join()
if not thread.isAlive():
if not thread.is_alive():
if self._started:
self.newThread()
else:
......
......@@ -659,7 +659,7 @@ class NEOFunctionalTest(NeoTestBase):
thread.daemon = True
thread.start()
thread.join(timeout)
self.assertFalse(thread.isAlive(), 'Run timeout')
self.assertFalse(thread.is_alive(), 'Run timeout')
if exc_list:
assert len(exc_list) == 1, exc_list
exc = exc_list[0]
......
......@@ -263,7 +263,7 @@ class ServerNode(Node):
return self._init_args['address']
def resetNode(self):
assert not self.isAlive()
assert not self.is_alive()
kw = self._init_args
self.__dict__.clear()
self.__init__(**kw)
......@@ -715,10 +715,10 @@ class NEOCluster(object):
client or Serialized.background()
for node_type in 'admin', 'storage', 'master':
for node in getattr(self, node_type + '_list'):
if node.isAlive():
if node.is_alive():
node.join()
client = self.client.poll_thread
if client.isAlive():
if client.is_alive():
client.join()
finally:
# Acquire again in case there's another cluster running, otherwise
......@@ -847,7 +847,7 @@ class NEOThreadedTest(NeoTestBase):
def join(self, timeout=None):
threading.Thread.join(self, timeout)
if not self.isAlive() and self.__exc_info:
if not self.is_alive() and self.__exc_info:
etype, value, tb = self.__exc_info
del self.__exc_info
raise etype, value, tb
......
......@@ -539,12 +539,12 @@ class Test(NEOThreadedTest):
# all nodes except clients should exit
for master in cluster.master_list:
master.join(5)
self.assertFalse(master.isAlive())
self.assertFalse(master.is_alive())
for storage in cluster.storage_list:
storage.join(5)
self.assertFalse(storage.isAlive())
self.assertFalse(storage.is_alive())
cluster.admin.join(5)
self.assertFalse(cluster.admin.isAlive())
self.assertFalse(cluster.admin.is_alive())
finally:
cluster.stop()
cluster.reset() # reopen DB to check partition tables
......
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