Skip to content

Commit 78cda94

Browse files
SNOW-2335005 Add known server error to deflake (#2612)
SNOW-2335005 Add known server error: `Insufficient resource during interleaved execution`
1 parent 5a76337 commit 78cda94

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

tests_common/deflake.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,19 @@ def is_known_server_issue(test: TestResult):
163163
"Exceeded maximum number of inbound queries allowed for this instance",
164164
),
165165
("setup", "GS instance is still unavailable at"),
166+
(
167+
"call",
168+
"Insufficient resource during interleaved execution",
169+
),
166170
]
167171
for phase, known_message in known_server_issues:
168172
phase_info = getattr(test, phase)
169173
# match messages via regex, as they might be printed in multiple lines / pretty formatted by typer etc.
170-
regex = ".*".join(re.escape(word) for word in known_message.split())
171-
if re.search(regex, phase_info.longrepr):
174+
# regex pattern allows whitespace, punctuation, and box-drawing chars but not entire phrases.
175+
regex = r"\s*[^\w]*\s*".join(
176+
re.escape(word) for word in known_message.split()
177+
)
178+
if re.search(regex, phase_info.longrepr, re.DOTALL):
172179
return True
173180
return False
174181

0 commit comments

Comments
 (0)