Skip to content

Commit 5574b6e

Browse files
authored
When retrying a flaky test, print the name of the test (#25030)
When retrying a flaky test, print the name of the test so that it can be identified in a heavily parallelized test run where stdout prints from different tests are very interleaved
1 parent 14dc523 commit 5574b6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def modified(*args, **kwargs):
168168
return f(*args, **kwargs)
169169
except AssertionError as exc:
170170
preserved_exc = exc
171-
logging.info(f'Retrying flaky test (attempt {i}/{EMTEST_RETRY_FLAKY} failed): {exc}')
171+
logging.info(f'Retrying flaky test "{f.__name__}" (attempt {i}/{EMTEST_RETRY_FLAKY} failed): {exc}')
172172
raise AssertionError('Flaky test has failed too many times') from preserved_exc
173173

174174
return modified

0 commit comments

Comments
 (0)