From b418d0561a35085e70bc2e56838d38fca9d9d133 Mon Sep 17 00:00:00 2001 From: rexlee8776 Date: Thu, 10 Aug 2017 01:35:58 +0000 Subject: bugfix: tc037/38 multiprocessing failed sometimes set runner.join timeout JIRA: YARDSTICK-771 Change-Id: Iec7d04549a45c0fbd0eb48dcaad7770fd5ca1f4e Signed-off-by: rexlee8776 --- yardstick/benchmark/core/task.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'yardstick/benchmark/core/task.py') diff --git a/yardstick/benchmark/core/task.py b/yardstick/benchmark/core/task.py index 703bb6d95..395f3b8e8 100644 --- a/yardstick/benchmark/core/task.py +++ b/yardstick/benchmark/core/task.py @@ -38,6 +38,7 @@ output_file_default = "/tmp/yardstick.out" config_file = '/etc/yardstick/yardstick.conf' test_cases_dir_default = "tests/opnfv/test_cases/" LOG = logging.getLogger(__name__) +JOIN_TIMEOUT = 60 class Task(object): # pragma: no cover @@ -263,13 +264,12 @@ class Task(object): # pragma: no cover # Wait for background runners to finish for runner in background_runners: - status = runner.join(timeout=60) + status = runner.join(JOIN_TIMEOUT) if status is None: # Nuke if it did not stop nicely base_runner.Runner.terminate(runner) - status = runner_join(runner) - else: - base_runner.Runner.release(runner) + runner.join(JOIN_TIMEOUT) + base_runner.Runner.release(runner) self.outputs.update(runner.get_output()) result.extend(runner.get_result()) -- cgit 1.2.3-korg