Skip to content

Commit

Permalink
max concurrent uploads to get performance improvements in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
bisgaard-itis committed Nov 19, 2024
1 parent 367728d commit d1a8df8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion clients/python/test/e2e/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def large_server_file(
tmp_file.stat().st_size == _file_size
), f"Could not create file of size: {_file_size}"
ram_statistics, uploaded_file = memory_usage(
(files_api.upload_file, (tmp_file,), {"max_concurrent_uploads": 5}), retval=True
(files_api.upload_file, (tmp_file,)), retval=True
)

yield ServerFile(
Expand Down
6 changes: 1 addition & 5 deletions clients/python/test/e2e/test_files_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,12 @@ def test_upload_download_file_ram_usage(
tmp_path: Path, large_server_file: ServerFile, files_api: osparc.FilesApi
) -> None:
"""Check RAM usage of upload/download fcns"""
_allowed_ram_usage_in_mb: Final[int] = 1000 # 1000MB
_allowed_ram_usage_in_mb: Final[int] = 300 # 300MB
assert (
large_server_file.local_file.stat().st_size
> _allowed_ram_usage_in_mb * 1024 * 1024
), f"For this test to make sense, {large_server_file.local_file.stat().st_size=} must be larger than {_allowed_ram_usage_in_mb=}."

assert (
large_server_file.upload_ram_usage < _allowed_ram_usage_in_mb
), f"Used more than {_allowed_ram_usage_in_mb=} to upload file of size {large_server_file.local_file.stat().st_size=}"

uploaded_file = files_api.upload_file(large_server_file.local_file)
assert (
large_server_file.server_file.id == uploaded_file.id
Expand Down

0 comments on commit d1a8df8

Please sign in to comment.