aboutsummaryrefslogtreecommitdiffstats
path: root/behave_tests/features/steps/steps.py
diff options
context:
space:
mode:
authorGwenael Lambrouin <gwenael.lambrouin@orange.com>2022-05-18 12:54:20 +0000
committerGwenael Lambrouin <gwenael.lambrouin@orange.com>2022-05-31 09:41:34 +0200
commit1c73f0ddbc9818fbc1e35c85abb6449a3e4d2034 (patch)
tree3fff6296ba4c4490c30ba7ae4efe8a6d17ef512c /behave_tests/features/steps/steps.py
parenta055c1555e0a8c0cfb8c6308990a23eb8db59d13 (diff)
behave_tests: fix infinite recursion
Fix bug in behave_tests that occurs when behave looks for a previous result (either non-regression or characterization) in testapi database. When the result cannot be found on the first results page, behave enters an infinite recursion. Eventually, the operating system kills the python interpreter leading to a return code equal to 137. When behave is run by xtesting run_tests command, run_tests is also killed so the error is not reported by xtesting. This is now fixed. Signed-off-by: Gwenael Lambrouin <gwenael.lambrouin@orange.com> Change-Id: I6b0feafb5ebadf7d0d1df6d0ee03fd22cbe6899d
Diffstat (limited to 'behave_tests/features/steps/steps.py')
-rw-r--r--behave_tests/features/steps/steps.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/behave_tests/features/steps/steps.py b/behave_tests/features/steps/steps.py
index cfb5848..512a4e5 100644
--- a/behave_tests/features/steps/steps.py
+++ b/behave_tests/features/steps/steps.py
@@ -623,5 +623,5 @@ def get_last_result(context, reference=None, page=None):
return tagged_result
if last_results["pagination"]["current_page"] < last_results["pagination"]["total_pages"]:
page = last_results["pagination"]["current_page"] + 1
- return get_last_result(context, page)
+ return get_last_result(context, reference, page)
return None