[ARVADOS] created: f313294f95e55f595ace70e2a614557c0428f2da

Git user git at public.curoverse.com
Tue Aug 1 09:30:15 EDT 2017


        at  f313294f95e55f595ace70e2a614557c0428f2da (commit)


commit f313294f95e55f595ace70e2a614557c0428f2da
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Fri Jul 28 09:51:18 2017 -0400

    11925: Make watchdog test more reliable.
    
    Add wait so that it doesn't try to shut down the threads before they have had a
    chance to start.  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..8704ef9 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):
@@ -53,6 +53,7 @@ class WatchdogActorTest(testutil.ActorTestMixin, unittest.TestCase):
     def test_time_timout(self, kill_mock):
         act = BogusActor.start(OSError(errno.ENOENT, ""))
         watch = arvnodeman.baseactor.WatchdogActor.start(1, act)
+        time.sleep(1)
         watch.stop(block=True)
         act.stop(block=True)
         self.assertTrue(kill_mock.called)

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list