projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '12194-search-always-valid'
[arvados.git]
/
services
/
nodemanager
/
tests
/
testutil.py
diff --git
a/services/nodemanager/tests/testutil.py
b/services/nodemanager/tests/testutil.py
index 0a483709adf5b69a8fd13647f9e9bd866fa836cf..6e134375bb8aec05bdd71f830e28f277d3cff5b5 100644
(file)
--- a/
services/nodemanager/tests/testutil.py
+++ b/
services/nodemanager/tests/testutil.py
@@
-123,7
+123,10
@@
class ActorTestMixin(object):
pykka.ActorRegistry.stop_all()
def stop_proxy(self, proxy):
pykka.ActorRegistry.stop_all()
def stop_proxy(self, proxy):
- return proxy.actor_ref.stop(timeout=self.TIMEOUT)
+ th = proxy.get_thread().get()
+ t = proxy.actor_ref.stop(timeout=self.TIMEOUT)
+ th.join()
+ return t
def wait_for_assignment(self, proxy, attr_name, unassigned=None,
timeout=TIMEOUT):
def wait_for_assignment(self, proxy, attr_name, unassigned=None,
timeout=TIMEOUT):
@@
-136,11
+139,13
@@
class ActorTestMixin(object):
if result is not unassigned:
return result
if result is not unassigned:
return result
- def busywait(self, f):
+ def busywait(self, f
, finalize=None
):
n = 0
n = 0
- while not f() and n <
1
0:
+ while not f() and n <
2
0:
time.sleep(.1)
n += 1
time.sleep(.1)
n += 1
+ if finalize is not None:
+ finalize()
self.assertTrue(f())
self.assertTrue(f())