[ARVADOS] updated: 1293a55ede38d16119b04a6584ca9da143ea3725
git at public.curoverse.com
git at public.curoverse.com
Mon Feb 8 16:09:41 EST 2016
Summary of changes:
services/nodemanager/tests/test_computenode_dispatch.py | 7 +++++++
1 file changed, 7 insertions(+)
via 1293a55ede38d16119b04a6584ca9da143ea3725 (commit)
from 6c950260b253d28e78579b493c8eb3eabe0add11 (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 1293a55ede38d16119b04a6584ca9da143ea3725
Author: Tom Clegg <tom at curoverse.com>
Date: Mon Feb 8 16:09:28 2016 -0500
Fix nodemanager test race. No issue #
diff --git a/services/nodemanager/tests/test_computenode_dispatch.py b/services/nodemanager/tests/test_computenode_dispatch.py
index 040d8d5..9c8af19 100644
--- a/services/nodemanager/tests/test_computenode_dispatch.py
+++ b/services/nodemanager/tests/test_computenode_dispatch.py
@@ -9,6 +9,7 @@ import arvados.errors as arverror
import httplib2
import mock
import pykka
+import threading
import arvnodeman.computenode.dispatch as dispatch
from . import testutil
@@ -44,8 +45,11 @@ class ComputeNodeSetupActorTestCase(testutil.ActorTestMixin, unittest.TestCase):
def test_creation_without_arvados_node(self):
self.make_actor()
+ finished = threading.Event()
+ self.setup_actor.subscribe(lambda _: finished.set())
self.assertEqual(self.arvados_effect[-1],
self.setup_actor.arvados_node.get(self.TIMEOUT))
+ assert(finished.wait(self.TIMEOUT))
self.assertEqual(1, self.api_client.nodes().create().execute.call_count)
self.assertEqual(1, self.api_client.nodes().update().execute.call_count)
self.assert_node_properties_updated()
@@ -55,8 +59,11 @@ class ComputeNodeSetupActorTestCase(testutil.ActorTestMixin, unittest.TestCase):
def test_creation_with_arvados_node(self):
self.make_mocks(arvados_effect=[testutil.arvados_node_mock()]*2)
self.make_actor(testutil.arvados_node_mock())
+ finished = threading.Event()
+ self.setup_actor.subscribe(lambda _: finished.set())
self.assertEqual(self.arvados_effect[-1],
self.setup_actor.arvados_node.get(self.TIMEOUT))
+ assert(finished.wait(self.TIMEOUT))
self.assert_node_properties_updated()
self.assertEqual(2, self.api_client.nodes().update().execute.call_count)
self.assertEqual(self.cloud_client.create_node(),
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list