From d1a8df87777b7f3f6946a83e200aa1100ec2e102 Mon Sep 17 00:00:00 2001 From: Mads Bisgaard Date: Tue, 19 Nov 2024 10:38:03 +0100 Subject: [PATCH] max concurrent uploads to get performance improvements in ci --- clients/python/test/e2e/conftest.py | 2 +- clients/python/test/e2e/test_files_api.py | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/clients/python/test/e2e/conftest.py b/clients/python/test/e2e/conftest.py index 701fe0aa..c01cfcbd 100644 --- a/clients/python/test/e2e/conftest.py +++ b/clients/python/test/e2e/conftest.py @@ -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( diff --git a/clients/python/test/e2e/test_files_api.py b/clients/python/test/e2e/test_files_api.py index 12d7d79c..7817cc0e 100644 --- a/clients/python/test/e2e/test_files_api.py +++ b/clients/python/test/e2e/test_files_api.py @@ -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