Skip to content

Commit 6059775

Browse files
committed
adding test
1 parent 3a61263 commit 6059775

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

services/autoscaling/tests/unit/test_modules_dask.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
DaskTask,
3737
_scheduler_client,
3838
add_instance_generic_resources,
39+
compute_cluster_total_resources,
3940
get_worker_still_has_results_in_memory,
4041
get_worker_used_resources,
4142
is_worker_connected,
@@ -378,6 +379,19 @@ def _add_fct(x: int, y: int) -> int:
378379
)
379380

380381

382+
async def test_compute_cluster_total_resources(
383+
scheduler_url: AnyUrl,
384+
scheduler_authentication: ClusterAuthentication,
385+
):
386+
# asking for resources of empty cluster returns empty resources
387+
assert (
388+
await compute_cluster_total_resources(
389+
scheduler_url, scheduler_authentication, []
390+
)
391+
== Resources.create_as_empty()
392+
)
393+
394+
381395
@pytest.mark.parametrize(
382396
"dask_nthreads, dask_nthreads_multiplier, expected_threads_resource",
383397
[(4, 1, 4), (4, 2, 8), (0, 2.0, -1)],

0 commit comments

Comments
 (0)