@@ -305,6 +305,18 @@ async def _(scale_up_params: _ScaleUpParams) -> list[distributed.Future]:
305305 return _
306306
307307
308+ @pytest .mark .parametrize (
309+ # NOTE: only the main test test_cluster_scaling_up_and_down is run with all options
310+ "with_docker_join_drained" ,
311+ ["with_AUTOSCALING_DOCKER_JOIN_DRAINED" ],
312+ indirect = True ,
313+ )
314+ @pytest .mark .parametrize (
315+ # NOTE: only the main test test_cluster_scaling_up_and_down is run with all options
316+ "with_drain_nodes_labelled" ,
317+ ["without_AUTOSCALING_DRAIN_NODES_WITH_LABELS" ],
318+ indirect = True ,
319+ )
308320async def test_cluster_scaling_with_no_tasks_does_nothing (
309321 minimal_configuration : None ,
310322 app_settings : ApplicationSettings ,
@@ -330,6 +342,18 @@ async def test_cluster_scaling_with_no_tasks_does_nothing(
330342@pytest .mark .acceptance_test (
331343 "Ensure this does not happen https://github.com/ITISFoundation/osparc-simcore/issues/6227"
332344)
345+ @pytest .mark .parametrize (
346+ # NOTE: only the main test test_cluster_scaling_up_and_down is run with all options
347+ "with_docker_join_drained" ,
348+ ["with_AUTOSCALING_DOCKER_JOIN_DRAINED" ],
349+ indirect = True ,
350+ )
351+ @pytest .mark .parametrize (
352+ # NOTE: only the main test test_cluster_scaling_up_and_down is run with all options
353+ "with_drain_nodes_labelled" ,
354+ ["without_AUTOSCALING_DRAIN_NODES_WITH_LABELS" ],
355+ indirect = True ,
356+ )
333357async def test_cluster_scaling_with_disabled_ssm_does_not_block_autoscaling (
334358 minimal_configuration : None ,
335359 disabled_ssm : None ,
@@ -353,6 +377,18 @@ async def test_cluster_scaling_with_disabled_ssm_does_not_block_autoscaling(
353377 )
354378
355379
380+ @pytest .mark .parametrize (
381+ # NOTE: only the main test test_cluster_scaling_up_and_down is run with all options
382+ "with_docker_join_drained" ,
383+ ["with_AUTOSCALING_DOCKER_JOIN_DRAINED" ],
384+ indirect = True ,
385+ )
386+ @pytest .mark .parametrize (
387+ # NOTE: only the main test test_cluster_scaling_up_and_down is run with all options
388+ "with_drain_nodes_labelled" ,
389+ ["without_AUTOSCALING_DRAIN_NODES_WITH_LABELS" ],
390+ indirect = True ,
391+ )
356392async def test_cluster_scaling_with_task_with_too_much_resources_starts_nothing (
357393 minimal_configuration : None ,
358394 app_settings : ApplicationSettings ,
@@ -800,6 +836,18 @@ async def test_cluster_scaling_up_and_down( # noqa: PLR0915
800836 mock_docker_compute_node_used_resources .assert_not_called ()
801837
802838
839+ @pytest .mark .parametrize (
840+ # NOTE: only the main test test_cluster_scaling_up_and_down is run with all options
841+ "with_docker_join_drained" ,
842+ ["with_AUTOSCALING_DOCKER_JOIN_DRAINED" ],
843+ indirect = True ,
844+ )
845+ @pytest .mark .parametrize (
846+ # NOTE: only the main test test_cluster_scaling_up_and_down is run with all options
847+ "with_drain_nodes_labelled" ,
848+ ["without_AUTOSCALING_DRAIN_NODES_WITH_LABELS" ],
849+ indirect = True ,
850+ )
803851async def test_cluster_does_not_scale_up_if_defined_instance_is_not_allowed (
804852 minimal_configuration : None ,
805853 app_settings : ApplicationSettings ,
@@ -839,6 +887,18 @@ async def test_cluster_does_not_scale_up_if_defined_instance_is_not_allowed(
839887 assert "Unexpected error:" in error_messages [0 ]
840888
841889
890+ @pytest .mark .parametrize (
891+ # NOTE: only the main test test_cluster_scaling_up_and_down is run with all options
892+ "with_docker_join_drained" ,
893+ ["with_AUTOSCALING_DOCKER_JOIN_DRAINED" ],
894+ indirect = True ,
895+ )
896+ @pytest .mark .parametrize (
897+ # NOTE: only the main test test_cluster_scaling_up_and_down is run with all options
898+ "with_drain_nodes_labelled" ,
899+ ["without_AUTOSCALING_DRAIN_NODES_WITH_LABELS" ],
900+ indirect = True ,
901+ )
842902async def test_cluster_does_not_scale_up_if_defined_instance_is_not_fitting_resources (
843903 minimal_configuration : None ,
844904 app_settings : ApplicationSettings ,
@@ -878,6 +938,18 @@ async def test_cluster_does_not_scale_up_if_defined_instance_is_not_fitting_reso
878938 assert "Unexpected error:" in error_messages [0 ]
879939
880940
941+ @pytest .mark .parametrize (
942+ # NOTE: only the main test test_cluster_scaling_up_and_down is run with all options
943+ "with_docker_join_drained" ,
944+ ["with_AUTOSCALING_DOCKER_JOIN_DRAINED" ],
945+ indirect = True ,
946+ )
947+ @pytest .mark .parametrize (
948+ # NOTE: only the main test test_cluster_scaling_up_and_down is run with all options
949+ "with_drain_nodes_labelled" ,
950+ ["without_AUTOSCALING_DRAIN_NODES_WITH_LABELS" ],
951+ indirect = True ,
952+ )
881953@pytest .mark .parametrize (
882954 "scale_up_params" ,
883955 [
@@ -948,6 +1020,18 @@ async def test_cluster_scaling_up_starts_multiple_instances(
9481020 mock_rabbitmq_post_message .reset_mock ()
9491021
9501022
1023+ @pytest .mark .parametrize (
1024+ # NOTE: only the main test test_cluster_scaling_up_and_down is run with all options
1025+ "with_docker_join_drained" ,
1026+ ["with_AUTOSCALING_DOCKER_JOIN_DRAINED" ],
1027+ indirect = True ,
1028+ )
1029+ @pytest .mark .parametrize (
1030+ # NOTE: only the main test test_cluster_scaling_up_and_down is run with all options
1031+ "with_drain_nodes_labelled" ,
1032+ ["without_AUTOSCALING_DRAIN_NODES_WITH_LABELS" ],
1033+ indirect = True ,
1034+ )
9511035@pytest .mark .parametrize (
9521036 "scale_up_params" ,
9531037 [
@@ -1044,6 +1128,18 @@ async def test_cluster_scaling_up_more_than_allowed_max_starts_max_instances_and
10441128 )
10451129
10461130
1131+ @pytest .mark .parametrize (
1132+ # NOTE: only the main test test_cluster_scaling_up_and_down is run with all options
1133+ "with_docker_join_drained" ,
1134+ ["with_AUTOSCALING_DOCKER_JOIN_DRAINED" ],
1135+ indirect = True ,
1136+ )
1137+ @pytest .mark .parametrize (
1138+ # NOTE: only the main test test_cluster_scaling_up_and_down is run with all options
1139+ "with_drain_nodes_labelled" ,
1140+ ["without_AUTOSCALING_DRAIN_NODES_WITH_LABELS" ],
1141+ indirect = True ,
1142+ )
10471143async def test_cluster_scaling_up_more_than_allowed_with_multiple_types_max_starts_max_instances_and_not_more (
10481144 patch_ec2_client_launch_instances_min_number_of_instances : mock .Mock ,
10491145 minimal_configuration : None ,
@@ -1141,6 +1237,18 @@ async def test_cluster_scaling_up_more_than_allowed_with_multiple_types_max_star
11411237 )
11421238
11431239
1240+ @pytest .mark .parametrize (
1241+ # NOTE: only the main test test_cluster_scaling_up_and_down is run with all options
1242+ "with_docker_join_drained" ,
1243+ ["with_AUTOSCALING_DOCKER_JOIN_DRAINED" ],
1244+ indirect = True ,
1245+ )
1246+ @pytest .mark .parametrize (
1247+ # NOTE: only the main test test_cluster_scaling_up_and_down is run with all options
1248+ "with_drain_nodes_labelled" ,
1249+ ["without_AUTOSCALING_DRAIN_NODES_WITH_LABELS" ],
1250+ indirect = True ,
1251+ )
11441252@pytest .mark .parametrize (
11451253 "scale_up_params" ,
11461254 [
@@ -1305,11 +1413,15 @@ async def test_long_pending_ec2_is_detected_as_broken_terminated_and_restarted(
13051413
13061414
13071415@pytest .mark .parametrize (
1308- "with_docker_join_drained" , ["with_AUTOSCALING_DOCKER_JOIN_DRAINED" ], indirect = True
1416+ # NOTE: only the main test test_cluster_scaling_up_and_down is run with all options
1417+ "with_docker_join_drained" ,
1418+ ["with_AUTOSCALING_DOCKER_JOIN_DRAINED" ],
1419+ indirect = True ,
13091420)
13101421@pytest .mark .parametrize (
1422+ # NOTE: only the main test test_cluster_scaling_up_and_down is run with all options
13111423 "with_drain_nodes_labelled" ,
1312- ["with_AUTOSCALING_DRAIN_NODES_WITH_LABELS " ],
1424+ ["without_AUTOSCALING_DRAIN_NODES_WITH_LABELS " ],
13131425 indirect = True ,
13141426)
13151427@pytest .mark .parametrize (
0 commit comments