From a69af285a8ea20924aab152a0c1a6785704bedac Mon Sep 17 00:00:00 2001 From: Jeffrey Phillips Freeman Date: Fri, 13 Mar 2026 23:56:40 +0000 Subject: [PATCH] fix(test): remove retry masking and output filtering in database integration test - Remove silent retry logic in Run Python Script that masked intermittent failures by retrying on empty stdout + non-zero RC - Change output filter from 'in' to 'startswith' so only lines beginning with log prefixes are filtered, not lines containing them mid-string - Remove [error from the filter list so error lines are never silently discarded from test output Fixes #898 --- robot/database_integration.robot | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/robot/database_integration.robot b/robot/database_integration.robot index 67e25f9143..e63fc30bd7 100644 --- a/robot/database_integration.robot +++ b/robot/database_integration.robot @@ -760,16 +760,6 @@ Run Python Script ${temp_file}= Evaluate (lambda t: (__import__('os').close(t[0]), t[1])[-1])(__import__('tempfile').mkstemp(suffix='.py', dir='/tmp')) Create File ${temp_file} ${full_code} ${result}= Run Process ${PYTHON} ${temp_file} timeout=60s stderr=STDOUT env:PYTHONWARNINGS=ignore env:PYTHONDONTWRITEBYTECODE=1 - # Retry once when the process was likely killed by a signal (OOM / CPU - # starvation under heavy parallel CI load). A signal-killed process - # produces empty stdout because its output buffer is never flushed. - IF ${result.rc} != 0 - ${stdout_len}= Get Length ${result.stdout} - IF ${stdout_len} == 0 - Sleep 3s reason=Retrying after transient subprocess failure (rc=${result.rc}) - ${result}= Run Process ${PYTHON} ${temp_file} timeout=60s stderr=STDOUT env:PYTHONWARNINGS=ignore env:PYTHONDONTWRITEBYTECODE=1 - END - END Remove File ${temp_file} # Check if process failed and log stderr if present IF ${result.rc} != 0 @@ -782,7 +772,7 @@ Run Python Script FOR ${line} IN @{lines} ${stripped}= Strip String ${line} # Skip debug/logging lines - IF '${stripped}' != '' and not '[debug' in '${stripped}' and not '[info' in '${stripped}' and not '[warning' in '${stripped}' and not '[error' in '${stripped}' + IF '${stripped}' != '' and not '${stripped}'.startswith('[debug') and not '${stripped}'.startswith('[info') and not '${stripped}'.startswith('[warning') Append To List ${filtered_lines} ${stripped} END END