(self, *args, **kwargs)
| 76 | def decorated(func): |
| 77 | @wraps(func) |
| 78 | def modified(self, *args, **kwargs): |
| 79 | # Browser tests have their own method of retrying tests. |
| 80 | if self.is_browser_test(): |
| 81 | self.flaky = True |
| 82 | return func(self, *args, **kwargs) |
| 83 | |
| 84 | for i in range(common.EMTEST_RETRY_FLAKY): |
| 85 | try: |
| 86 | return func(self, *args, **kwargs) |
| 87 | except (AssertionError, subprocess.TimeoutExpired) as exc: |
| 88 | preserved_exc = exc |
| 89 | common.record_flaky_test(self.id(), i, common.EMTEST_RETRY_FLAKY, exc) |
| 90 | |
| 91 | raise AssertionError('Flaky test has failed too many times') from preserved_exc |
| 92 | |
| 93 | return modified |
| 94 |
nothing calls this directly
no test coverage detected