Skip to content

Commit

Permalink
🔨 only run a single large upload test per test run (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
bisgaard-itis authored Nov 15, 2024
1 parent 6f28e6c commit 7939666
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion clients/python/test/e2e/test_files_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def _hash_file(file: Path) -> str:
return sha256.hexdigest()


@skip_if_osparc_version(at_least=Version("0.8.0"))
@skip_if_osparc_version(at_least=Version("0.8.0"), at_most=Version("0.8.3.post0.dev11"))
def test_upload_file(
create_tmp_file: Callable[[ByteSize], Path], api_client: osparc.ApiClient
) -> None:
Expand Down Expand Up @@ -76,6 +76,10 @@ def max_diff(data: List[int]) -> int:
(files_api.upload_file, (tmp_file,)), # type: ignore
retval=True,
)
uploaded_file2: osparc.File = files_api.upload_file(tmp_file)
assert (
uploaded_file1.id == uploaded_file2.id
), "could not detect that file was already on server"
assert (
max_diff(upload_ram_usage_in_mb) < _allowed_ram_usage_in_mb
), f"Used more than {_allowed_ram_usage_in_mb=} to upload file of size {tmp_file.stat().st_size=}"
Expand Down

0 comments on commit 7939666

Please sign in to comment.