From c90a84e1c211daf680b7e0a8c7aca246bc3152cf Mon Sep 17 00:00:00 2001 From: John Chilton Date: Sun, 24 Sep 2017 15:29:30 -0400 Subject: [PATCH] Selenium - fix transient error in history switching test. History sometimes takes longer than that second to switch in the GUI, so start a retry cycle on that assertion after a half a second. xref https://jenkins.galaxyproject.org/job/selenium/586/artifact/586-test-errors/test_history_switch2017092413201506273602/stacktrace.txt --- test/selenium_tests/test_saved_histories.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/selenium_tests/test_saved_histories.py b/test/selenium_tests/test_saved_histories.py index eeed1d20b23..ffb3f4e6dac 100644 --- a/test/selenium_tests/test_saved_histories.py +++ b/test/selenium_tests/test_saved_histories.py @@ -20,9 +20,14 @@ class SavedHistoriesTestCase(SharedStateSeleniumTestCase): self._login() self.navigate_to_saved_histories_page() self.click_popup_option(self.history2_name, 'Switch') - time.sleep(1) - history_name = self.history_panel_name_element() - self.assertEqual(history_name.text, self.history2_name) + time.sleep(.5) + + @retry_assertion_during_transitions + def assert_history_name_switched(): + history_name = self.history_panel_name_element() + self.assertEqual(history_name.text, self.history2_name) + + assert_history_name_switched() @selenium_test def test_history_view(self):