Skip to content

Commit 43c912e

Browse files
ci: remove stderr from workload success criterion (#27349)
1 parent e49ea47 commit 43c912e

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

ydb/tests/olap/lib/results_processor.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def send_data(self, data):
3535
_run_id: int = None
3636

3737
send_results = external_param_is_true('send-results')
38+
ignore_stderr_content = external_param_is_true('ignore_stderr_content')
3839
_columns_types = (
3940
ydb.BulkUpsertColumns()
4041
.add_column('Db', ydb.PrimitiveType.Utf8)
@@ -173,6 +174,7 @@ def _get_duration(dur: float | None):
173174
info['ci_build_type'] = ci_build_type
174175
if ci_sanitizer:
175176
info['ci_sanitizer'] = ci_sanitizer
177+
info['ignore_stderr_content'] = cls.ignore_stderr_content
176178

177179
info['test_tools_version'] = get_self_version()
178180

ydb/tests/olap/load/lib/workload_executor.py

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
)
1818
from ydb.tests.olap.lib.ydb_cli import YdbCliHelper
1919
from 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 чтобы наследоваться от него
2323
from 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

Comments
 (0)