diff options
author | 2017-08-10 01:35:58 +0000 | |
---|---|---|
committer | 2017-08-10 03:52:43 +0000 | |
commit | b418d0561a35085e70bc2e56838d38fca9d9d133 (patch) | |
tree | 9f78e11f25f0bf75a80a3fae80a943796b178687 /yardstick | |
parent | 7322829b9f4e3981f9c6214b37f5693c0963b159 (diff) |
bugfix: tc037/38 multiprocessing failed sometimes
set runner.join timeout
JIRA: YARDSTICK-771
Change-Id: Iec7d04549a45c0fbd0eb48dcaad7770fd5ca1f4e
Signed-off-by: rexlee8776 <limingjiang@huawei.com>
Diffstat (limited to 'yardstick')
-rw-r--r-- | yardstick/benchmark/core/task.py | 8 |
1 files changed, 4 insertions, 4 deletions
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()) |