[ARVADOS] updated: 0a1c109684c62f0bc42e7dca30319fc8222dbef7

Git user git at public.curoverse.com
Fri Feb 26 11:38:53 EST 2016


Summary of changes:
 services/nodemanager/tests/test_failure.py | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 services/nodemanager/tests/test_failure.py

       via  0a1c109684c62f0bc42e7dca30319fc8222dbef7 (commit)
      from  fc6a133423d79b224adff0e666b9da594524b460 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 0a1c109684c62f0bc42e7dca30319fc8222dbef7
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Fri Feb 26 11:38:50 2016 -0500

    8437: Add missing test.

diff --git a/services/nodemanager/tests/test_failure.py b/services/nodemanager/tests/test_failure.py
new file mode 100644
index 0000000..b7127fc
--- /dev/null
+++ b/services/nodemanager/tests/test_failure.py
@@ -0,0 +1,30 @@
+#!/usr/bin/env python
+
+from __future__ import absolute_import, print_function
+
+import logging
+import unittest
+
+import mock
+import pykka
+
+from . import testutil
+
+import arvnodeman.fullstopactor
+
+class BogusActor(arvnodeman.fullstopactor.FullStopActor):
+    def doStuff(self):
+        raise MemoryError
+
+class ActorUnhandledExceptionTest(unittest.TestCase):
+    def test1(self):
+        with mock.patch('os.killpg') as killpg_mock:
+            act = BogusActor.start()
+            act.tell({
+                'command': 'pykka_call',
+                'attr_path': ("doStuff",),
+                'args': [],
+                'kwargs': {}
+            })
+            act.stop(block=True)
+            self.assertTrue(killpg_mock.called)

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list