[ARVADOS] created: 97bb15198ff6071d656d461b27e1055d84826d36
Git user
git at public.curoverse.com
Fri Jul 28 09:52:30 EDT 2017
at 97bb15198ff6071d656d461b27e1055d84826d36 (commit)
commit 97bb15198ff6071d656d461b27e1055d84826d36
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Fri Jul 28 09:51:18 2017 -0400
11925: Make watchdog test reliable.
Use proxy to stop it instead of stopping actor object directly (which is racy).
Also added services/nodemanage_suite test case which includes both unit and
integration tests for node manager.
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curoverse.com>
diff --git a/build/run-tests.sh b/build/run-tests.sh
index 3952b36..2078081 100755
--- a/build/run-tests.sh
+++ b/build/run-tests.sh
@@ -81,7 +81,7 @@ services/keepstore
services/keep-balance
services/login-sync
services/nodemanager
-services/nodemanager-integration
+services/nodemanager_integration
services/crunch-run
services/crunch-dispatch-local
services/crunch-dispatch-slurm
@@ -545,6 +545,9 @@ do_test() {
apps/workbench_units | apps/workbench_functionals | apps/workbench_integration)
suite=apps/workbench
;;
+ services/nodemanager | services/nodemanager_integration)
+ suite=services/nodemanager_suite
+ ;;
*)
suite="${1}"
;;
@@ -860,11 +863,11 @@ test_login-sync() {
}
do_test services/login-sync login-sync
-test_nodemanager-integration() {
+test_nodemanager_integration() {
cd "$WORKSPACE/services/nodemanager" \
- && tests/integration_test.py ${testargs[services/nodemanager-integration]}
+ && tests/integration_test.py ${testargs[services/nodemanager_integration]}
}
-do_test services/nodemanager-integration nodemanager-integration
+do_test services/nodemanager_integration nodemanager_integration
for p in "${pythonstuff[@]}"
do
diff --git a/services/nodemanager/tests/test_failure.py b/services/nodemanager/tests/test_failure.py
index cfac61b..3385278 100644
--- a/services/nodemanager/tests/test_failure.py
+++ b/services/nodemanager/tests/test_failure.py
@@ -29,7 +29,7 @@ class BogusActor(arvnodeman.baseactor.BaseNodeManagerActor):
def ping(self):
# Called by WatchdogActorTest, this delay is longer than the test timeout
# of 1 second, which should cause the watchdog ping to fail.
- time.sleep(4)
+ time.sleep(2)
return True
class ActorUnhandledExceptionTest(testutil.ActorTestMixin, unittest.TestCase):
@@ -52,7 +52,7 @@ 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 = arvnodeman.baseactor.WatchdogActor.start(1, act).proxy()
watch.stop(block=True)
act.stop(block=True)
self.assertTrue(kill_mock.called)
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list