Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
raghumdani committed Jun 14, 2024
1 parent 798aa2b commit 70097da
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
1 change: 0 additions & 1 deletion deltacat/aws/s3u.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,6 @@ def _put_object(
)
except ClientError as e:
if e.response["Error"]["Code"] in BOTO_THROTTLING_ERROR_CODES:
# TODO: Differentiate upload table vs upload object errors
error_code = e.response["Error"]["Code"]
raise RetryableUploadFileError(
f"Retry upload for: {bucket}/{key} after receiving {error_code}",
Expand Down
12 changes: 12 additions & 0 deletions deltacat/tests/test_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,15 @@ def test_unclassified_error_when_error_cannot_be_categorized(self):
UnclassifiedDeltaCatError,
lambda: ray.get(mock_remote_task.remote(MockUnknownException)),
)

def test_deltacat_exception_contains_attributes(self):

try:
mock_raise_exception(ConnectionError)
except DeltaCatTransientError as e:
self.assertTrue(hasattr(e, "is_retryable"))
self.assertTrue(hasattr(e, "error_name"))
assert e.error_name == "DeltaCatTransientError"
return

self.assertFalse(True)
1 change: 1 addition & 0 deletions deltacat/tests/test_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def test_formatMessage_sanity(self):
self.assertEqual({"message": "test_message"}, result)

def test_format_sanity(self):
ray.shutdown()
formatter = JsonFormatter({"message": "msg"})

record = LogRecord(
Expand Down

0 comments on commit 70097da

Please sign in to comment.