projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into wtsi-hgi-8087-arv-cli-request-body-from-file
[arvados.git]
/
services
/
nodemanager
/
tests
/
test_failure.py
diff --git
a/services/nodemanager/tests/test_failure.py
b/services/nodemanager/tests/test_failure.py
index f30ea15498a8112fff8f612c427aff0719aa541b..dea7230dd3abdfc4133841027f8b41370953346f 100644
(file)
--- a/
services/nodemanager/tests/test_failure.py
+++ b/
services/nodemanager/tests/test_failure.py
@@
-24,7
+24,10
@@
class BogusActor(arvnodeman.baseactor.BaseNodeManagerActor):
raise self.exp
def ping(self):
raise self.exp
def ping(self):
+ # Called by WatchdogActorTest, this delay is longer than the test timeout
+ # of 1 second, which should cause the watchdog ping to fail.
time.sleep(2)
time.sleep(2)
+ return True
class ActorUnhandledExceptionTest(unittest.TestCase):
def test_fatal_error(self):
class ActorUnhandledExceptionTest(unittest.TestCase):
def test_fatal_error(self):
@@
-46,7
+49,7
@@
class WatchdogActorTest(unittest.TestCase):
@mock.patch('os.kill')
def test_time_timout(self, kill_mock):
act = BogusActor.start(OSError(errno.ENOENT, ""))
@mock.patch('os.kill')
def test_time_timout(self, kill_mock):
act = BogusActor.start(OSError(errno.ENOENT, ""))
- watch = arvnodeman.baseactor.WatchdogActor.start(1)
+ watch = arvnodeman.baseactor.WatchdogActor.start(1
, act
)
watch.stop(block=True)
act.stop(block=True)
self.assertTrue(kill_mock.called)
watch.stop(block=True)
act.stop(block=True)
self.assertTrue(kill_mock.called)