Commit 9fe34439 authored by Julien Muchembled's avatar Julien Muchembled

Fix tests broken by API changes in new psutil 2.0.0

This fixes:

Traceback (most recent call last):
  File "neo/tests/functional/testMaster.py", line 50, in testStoppingSecondaryMaster
    self.neo.expectDead(master)
  File "neo/tests/functional/__init__.py", line 615, in expectDead
    self.expectCondition(callback, *args, **kw)
  File "neo/tests/functional/__init__.py", line 509, in expectCondition
    'History: %s' % opaque_history)
AssertionError: Timeout while expecting condition. History: [False, False, False, False, False, False, False, False, False, False, False]
parent ffe34600
......@@ -192,7 +192,7 @@ class ClusterPdb(object):
cluster_dict.commit()
break
try:
if psutil.Process(pid).status == psutil.STATUS_ZOMBIE:
if psutil.Process(pid).status() == psutil.STATUS_ZOMBIE:
break
except psutil.NoSuchProcess:
raise OSError(errno.ESRCH, 'No such process')
......
......@@ -227,7 +227,7 @@ class NEOProcess(object):
def isAlive(self):
try:
return psutil.Process(self.pid).status != psutil.STATUS_ZOMBIE
return psutil.Process(self.pid).status() != psutil.STATUS_ZOMBIE
except psutil.NoSuchProcess:
return False
......
......@@ -31,7 +31,7 @@ extras_require = {
'storage-sqlite': [],
'storage-mysqldb': ['MySQL-python'],
}
extras_require['tests'] = ['zope.testing', 'psutil',
extras_require['tests'] = ['zope.testing', 'psutil>=2',
'neoppod[%s]' % ', '.join(extras_require)]
setup(
......
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