1717)
1818from ydb .tests .olap .lib .ydb_cli import YdbCliHelper
1919from ydb .tests .olap .lib .results_processor import ResultsProcessor
20- from ydb .tests .olap .lib .utils import get_external_param
20+ from ydb .tests .olap .lib .utils import external_param_is_true , get_external_param
2121
2222# Импортируем LoadSuiteBase чтобы наследоваться от него
2323from ydb .tests .olap .load .lib .conftest import LoadSuiteBase
@@ -45,6 +45,7 @@ class WorkloadTestBase(LoadSuiteBase):
4545 get_external_param (
4646 "yaml-config" ,
4747 "" )) # Путь к yaml конфигурации
48+ _ignore_stderr_content : bool = False
4849
4950 @classmethod
5051 def get_workload_name (cls ) -> str :
@@ -64,7 +65,7 @@ def setup_class(cls) -> None:
6465 """
6566 with allure .step ("Workload test setup: initialize" ):
6667 cls ._setup_start_time = time_module .time ()
67-
68+ cls . _ignore_stderr_content = external_param_is_true ( 'ignore_stderr_content' )
6869 # Выполняем только do_setup_class без _Verification
6970 if hasattr (cls , 'do_setup_class' ):
7071 try :
@@ -923,12 +924,13 @@ def create_workload_result(
923924 result .add_error (
924925 f"Workload execution failed. stderr: { stderr } " )
925926 error_found = True
926- elif "error" in str (stderr ).lower ():
927- result .add_error (f"Error detected in stderr: { stderr } " )
928- error_found = True
929- elif self ._has_real_error_in_stdout (str (stdout )):
930- result .add_warning (f"Error detected in stdout: { stdout } " )
931- error_found = True
927+ elif not self ._ignore_stderr_content :
928+ if "error" in str (stderr ).lower ():
929+ result .add_error (f"Error detected in stderr: { stderr } " )
930+ error_found = True
931+ elif self ._has_real_error_in_stdout (str (stdout )):
932+ result .add_warning (f"Error detected in stdout: { stdout } " )
933+ error_found = True
932934
933935 # Проверяем предупреждения
934936 if (
@@ -2007,10 +2009,12 @@ def _execute_single_workload_run(
20072009 "Command Stderr" ,
20082010 attachment_type = allure .attachment_type .TEXT ,
20092011 )
2010-
2011- # success=True только если stderr пустой (исключая SSH
2012- # warnings) И нет timeout
2013- success = not bool (stderr .strip ()) and not is_timeout
2012+ if self ._ignore_stderr_content :
2013+ success = not is_timeout
2014+ else :
2015+ # success=True только если stderr пустой (исключая SSH
2016+ # warnings) И нет timeout
2017+ success = not bool (stderr .strip ()) and not is_timeout
20142018
20152019 execution_time = time_module .time () - run_start_time
20162020
0 commit comments