mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Print a statement when retrying Selenium test functions.
Pointed out by @nsoranzo (https://github.com/galaxyproject/galaxy/pull/5708#discussion_r175054796) that there isn't mmuch of an indication this is occurring otherwise.
This commit is contained in:
@@ -136,6 +136,7 @@ def dump_test_information(self, name_prefix):
|
||||
|
||||
@nottest
|
||||
def selenium_test(f):
|
||||
test_name = f.__name__
|
||||
|
||||
@wraps(f)
|
||||
def func_wrapper(self, *args, **kwds):
|
||||
@@ -146,13 +147,14 @@ def selenium_test(f):
|
||||
try:
|
||||
return f(self, *args, **kwds)
|
||||
except unittest.SkipTest:
|
||||
dump_test_information(self, f.__name__)
|
||||
dump_test_information(self, test_name)
|
||||
# Don't retry if we have purposely decided to skip the test.
|
||||
raise
|
||||
except Exception:
|
||||
dump_test_information(self, f.__name__)
|
||||
dump_test_information(self, test_name)
|
||||
if retry_attempts < GALAXY_TEST_SELENIUM_RETRIES:
|
||||
retry_attempts += 1
|
||||
print("Test function [%s] threw an exception, retrying. Failed attempts - %s." % (test_name, retry_attempts))
|
||||
else:
|
||||
raise
|
||||
|
||||
|
||||
Reference in New Issue
Block a user