Skip to content

Commit 29898ba

Browse files
authored
Merge pull request #20890 from jmchilton/transient_selenium_published_histories
Likely fix for transiently failing published histories test.
2 parents e9af2f3 + 5d31aed commit 29898ba

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

lib/galaxy_test/selenium/framework.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
from galaxy.selenium.context import GalaxySeleniumContext
3030
from galaxy.selenium.has_driver import DEFAULT_AXE_SCRIPT_URL
3131
from galaxy.selenium.navigates_galaxy import (
32+
exception_seems_to_indicate_transition,
3233
NavigatesGalaxy,
3334
retry_during_transitions,
3435
)
@@ -223,8 +224,17 @@ def func_wrapper(self, *args, **kwds):
223224
return func_wrapper
224225

225226

227+
def exception_is_assertion_or_transition(e: Exception) -> bool:
228+
"""Drive the retry_assertion_during_transitions decorator.
229+
230+
Reuse logic for checking for transition exceptions but also retry
231+
if there is an assertion error.
232+
"""
233+
return exception_seems_to_indicate_transition(e) or isinstance(e, AssertionError)
234+
235+
226236
retry_assertion_during_transitions = partial(
227-
retry_during_transitions, exception_check=lambda e: isinstance(e, AssertionError)
237+
retry_during_transitions, exception_check=exception_is_assertion_or_transition
228238
)
229239

230240

0 commit comments

Comments
 (0)