Skip to content
This repository has been archived by the owner on Sep 3, 2022. It is now read-only.

Commit

Permalink
Retry integration tests on any exception. (#2019)
Browse files Browse the repository at this point in the history
The previous version of this logic retried a test if any of its
`self.assert...` calls failed.

However, that does not handle the case where a nested call to
`datalab` fails. In those cases a `CalledProcessError` would be
raised.

To retry on those scenarios as well, we extend the retry logic
to retry on any instance of the `Exception` class.
  • Loading branch information
ojarjur authored Jun 7, 2018
1 parent ebe71cb commit 1213f76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/cli/tests/end-to-end.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ def retry_test(self, test_method):
try:
test_method()
return
except AssertionError as ae:
last_error = ae
except Exception as ex:
last_error = ex
raise last_error

def test_create_delete(self):
Expand Down

0 comments on commit 1213f76

Please sign in to comment.