X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/cdd5523d12bb8cbd88ea897ac3a50cbc1ec7ffce..a95f899d7ac84f29b3d019aa410d265bb40833e5:/services/nodemanager/tests/test_failure.py?ds=sidebyside diff --git a/services/nodemanager/tests/test_failure.py b/services/nodemanager/tests/test_failure.py index f30ea15498..dea7230dd3 100644 --- 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): + # 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) + return True 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, "")) - 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)