Skip to content

Commit 5d31aed

Browse files
committed
Likely fix for transiently failing published histories test.
The failing error: ``` self = <galaxy_test.selenium.test_histories_published.TestPublishedHistories object at 0x7f4ae3449e80> @selenium_test def test_published_histories_username_filter(self): self._login() self.navigate_to_published_histories() username = self.user2_email.split("@")[0] self.components.published_histories.search_input.wait_for_and_send_keys(f"user:{username}") > self.assert_histories_present([self.history2_name]) ```
1 parent 0b743f8 commit 5d31aed

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)