[ARVADOS] updated: 1.1.4-323-g2f9761b
Git user
git at public.curoverse.com
Thu May 31 14:37:25 EDT 2018
Summary of changes:
services/nodemanager/tests/test_failure.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
via 2f9761bd08293de1847d3dbd0ab16482eacc414d (commit)
from d8dfc75ec5c6cead3da0f3907466ce1b89373b69 (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 2f9761bd08293de1847d3dbd0ab16482eacc414d
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date: Thu May 31 14:26:59 2018 -0400
12061: Explicitly join actor thread after stopping.
Fixes the "nonfatal" test case the same way the "fatal" test case was
fixed in 6706c6d46c6cfb080371b147b60fcaa191bd55a6.
Since the nonfatal case just tests that kill_mock did *not* get
called, the race condition used to make the test ineffectual
occasionally, instead of failing occasionally.
The race condition became visible only after the status reporting test
was added.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>
diff --git a/services/nodemanager/tests/test_failure.py b/services/nodemanager/tests/test_failure.py
index 2d1a17e..8bf3ea8 100644
--- a/services/nodemanager/tests/test_failure.py
+++ b/services/nodemanager/tests/test_failure.py
@@ -48,9 +48,12 @@ class ActorUnhandledExceptionTest(testutil.ActorTestMixin, unittest.TestCase):
def test_nonfatal_error(self):
status.tracker.update({'actor_exceptions': 0})
kill_mock = mock.Mock('os.kill')
- act = BogusActor.start(OSError(errno.ENOENT, ""), killfunc=kill_mock).tell_proxy()
+ bgact = BogusActor.start(OSError(errno.ENOENT, ""), killfunc=kill_mock)
+ act_thread = bgact.proxy().get_thread().get()
+ act = bgact.tell_proxy()
act.doStuff()
act.actor_ref.stop(block=True)
+ act_thread.join()
self.assertFalse(kill_mock.called)
self.assertEqual(1, status.tracker.get('actor_exceptions'))
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list