From a149a18d39231b7edf76260a85845b31b99cad54 Mon Sep 17 00:00:00 2001 From: chenhaoran Date: Thu, 29 Aug 2024 15:59:02 +0800 Subject: [PATCH] tetst:check stream task status in common.py --- tests/pytest/util/common.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/pytest/util/common.py b/tests/pytest/util/common.py index 2608603952..1dfcf8b5dd 100644 --- a/tests/pytest/util/common.py +++ b/tests/pytest/util/common.py @@ -997,8 +997,13 @@ class TDCom: second_number = int(match.group(3)) # The second number inside the brackets # Compare the extracted numbers and return the result - if first_number >= second_number-5 and first_number <= second_number: - return True + if second_number >=5 : + if first_number >= second_number-5 and first_number <= second_number: + return True + elif second_number < 5: + if first_number >= second_number-1 and first_number <= second_number: + return True + # If no match was found, or the pattern does not match the expected format, return False return False