Skip to content

Commit

Permalink
🐛 Dont fail when cleaning up (#222)
Browse files Browse the repository at this point in the history
  • Loading branch information
bisgaard-itis authored Nov 19, 2024
1 parent bcdd677 commit 0388ebb
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions clients/python/test/e2e/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
_MB: ByteSize = ByteSize(_KB * 1024) # in bytes
_GB: ByteSize = ByteSize(_MB * 1024) # in bytes

_logger = logging.getLogger(__name__)

# Dictionary to store start times of tests
_test_start_times = {}

Expand Down Expand Up @@ -172,7 +174,13 @@ def large_server_file(
upload_ram_usage=max(ram_statistics) - min(ram_statistics),
)

files_api.delete_file(uploaded_file.id)
try:
files_api.delete_file(uploaded_file.id)
except osparc.ApiException:
_logger.warning(
f"Could not delete file on server in {file_with_number.__name__}",
exc_info=True,
)


@pytest.fixture
Expand Down Expand Up @@ -206,4 +214,10 @@ def file_with_number(
server_file = files_api.upload_file(file)
yield server_file

files_api.delete_file(server_file.id)
try:
files_api.delete_file(server_file.id)
except osparc.ApiException:
_logger.warning(
f"Could not delete file on server in {file_with_number.__name__}",
exc_info=True,
)

0 comments on commit 0388ebb

Please sign in to comment.