diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 491: fix a bug in the timeout calculation for lava-test-shell:

Message ID 20121211002314.15040.65625.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Michael-Doyle Hudson Dec. 11, 2012, 12:23 a.m. UTC
------------------------------------------------------------
revno: 491
committer: Michael Hudson-Doyle <michael.hudson@linaro.org>
branch nick: trunk
timestamp: Tue 2012-12-11 13:22:28 +1300
message:
  fix a bug in the timeout calculation for lava-test-shell:
  the previous code reduced the timeout by the time since lava-test-shell
  started each time a signal was processed (rather than just reducing the
  timeout by the amount of time since the previous signal)
modified:
  lava_dispatcher/actions/lava_test_shell.py


--
lp:lava-dispatcher
https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk

You are subscribed to branch lp:lava-dispatcher.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'lava_dispatcher/actions/lava_test_shell.py'
--- lava_dispatcher/actions/lava_test_shell.py	2012-12-06 22:38:56 +0000
+++ lava_dispatcher/actions/lava_test_shell.py	2012-12-11 00:22:28 +0000
@@ -486,9 +486,10 @@ 
 
         with target.runner() as runner:
             start = time.time()
+            initial_timeout = timeout
             while self._keep_running(runner, timeout, signal_director):
                 elapsed = time.time() - start
-                timeout = int(timeout - elapsed)
+                timeout = int(initial_timeout - elapsed)
 
         self._bundle_results(target, signal_director, testdefs_by_uuid)