- self.assertTrue(killpg_mock.called)
-
- def test_nonfatal_error(self):
- with mock.patch('os.killpg') as killpg_mock:
- act = BogusActor.start(OSError(errno.ENOENT, "")).tell_proxy()
- act.doStuff()
- act.actor_ref.stop(block=True)
- self.assertFalse(killpg_mock.called)
+ self.assertTrue(kill_mock.called)
+
+ @mock.patch('os.kill')
+ def test_nonfatal_error(self, kill_mock):
+ act = BogusActor.start(OSError(errno.ENOENT, "")).tell_proxy()
+ act.doStuff()
+ act.actor_ref.stop(block=True)
+ self.assertFalse(kill_mock.called)
+
+class WatchdogActorTest(testutil.ActorTestMixin, 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, act)
+ watch.stop(block=True)
+ act.stop(block=True)
+ self.assertTrue(kill_mock.called)