From 8ace2457203399893236e07539a5e84f6fa8933a Mon Sep 17 00:00:00 2001 From: John Chilton Date: Fri, 23 Mar 2018 10:16:04 -0400 Subject: [PATCH] Ignore seemingly harmless error when tearing down Selenium tests. Causes otherwise passing tests to fail for not particular reason. Cannot find a Selenium issue for this but it has been reported on in their IRC - seems like just a very rare, transient issue. xref https://jenkins.galaxyproject.org/job/docker-selenium/1830/testReport/junit/selenium_tests.test_saved_histories/SavedHistoriesTestCase/test_delete_and_undelete_history/ --- test/selenium_tests/framework.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/selenium_tests/framework.py b/test/selenium_tests/framework.py index 1b93fad5a4c..ea25ce83f6a 100644 --- a/test/selenium_tests/framework.py +++ b/test/selenium_tests/framework.py @@ -298,7 +298,10 @@ class SeleniumTestCase(FunctionalTestCase, NavigatesGalaxy, UsesApiTestCaseMixin try: self.driver.close() except Exception as e: - exception = e + if "cannot kill Chrome" in str(e): + print("Ignoring likely harmless error in Selenium shutdown %s" % e) + else: + exception = e try: self.display.stop()