Skip to content

Commit

Permalink
Change prefix of the overscaling common function from test_ to assert_
Browse files Browse the repository at this point in the history
It is required to avoid that the common function is executed from
the integration test framework.

Signed-off-by: Enrico Usai <usai@amazon.com>
  • Loading branch information
enrico-usai committed Aug 28, 2019
1 parent 1916808 commit 5fb0adf
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tests/integration-tests/tests/schedulers/common.py
Expand Up @@ -16,7 +16,7 @@
from tests.common.schedulers_common import get_scheduler_commands


def test_overscaling_when_job_submitted_during_scaledown(
def assert_overscaling_when_job_submitted_during_scaledown(
remote_command_executor, scheduler, region, stack_name, scaledown_idletime
):
"""Test that if a job gets submitted when a node is locked the cluster does not overscale"""
Expand Down
4 changes: 2 additions & 2 deletions tests/integration-tests/tests/schedulers/test_sge.py
Expand Up @@ -19,7 +19,7 @@
from remote_command_executor import RemoteCommandExecutor
from tests.common.assertions import assert_no_errors_in_logs, assert_scaling_worked
from tests.common.schedulers_common import SgeCommands
from tests.schedulers.common import test_overscaling_when_job_submitted_during_scaledown
from tests.schedulers.common import assert_overscaling_when_job_submitted_during_scaledown


@pytest.mark.regions(["ap-southeast-1"])
Expand All @@ -43,7 +43,7 @@ def test_sge(region, pcluster_config_reader, clusters_factory):
_test_non_runnable_jobs(remote_command_executor, max_queue_size, max_slots, region, cluster, scaledown_idletime)
_test_job_dependencies(remote_command_executor, region, cluster.cfn_name, scaledown_idletime)
_test_job_arrays_and_parallel_jobs(remote_command_executor, region, cluster.cfn_name, scaledown_idletime, max_slots)
test_overscaling_when_job_submitted_during_scaledown(
assert_overscaling_when_job_submitted_during_scaledown(
remote_command_executor, "sge", region, cluster.cfn_name, scaledown_idletime
)
# TODO: _test_dynamic_max_cluster_size
Expand Down
4 changes: 2 additions & 2 deletions tests/integration-tests/tests/schedulers/test_slurm.py
Expand Up @@ -19,7 +19,7 @@
from remote_command_executor import RemoteCommandExecutionError, RemoteCommandExecutor
from tests.common.assertions import assert_asg_desired_capacity, assert_no_errors_in_logs, assert_scaling_worked
from tests.common.schedulers_common import SlurmCommands
from tests.schedulers.common import test_overscaling_when_job_submitted_during_scaledown
from tests.schedulers.common import assert_overscaling_when_job_submitted_during_scaledown


@pytest.mark.regions(["us-west-1"])
Expand All @@ -43,7 +43,7 @@ def test_slurm(region, pcluster_config_reader, clusters_factory):
_test_cluster_limits(remote_command_executor, max_queue_size, region, cluster.asg)
_test_job_dependencies(remote_command_executor, region, cluster.cfn_name, scaledown_idletime, max_queue_size)
_test_job_arrays_and_parallel_jobs(remote_command_executor, region, cluster.cfn_name, scaledown_idletime)
test_overscaling_when_job_submitted_during_scaledown(
assert_overscaling_when_job_submitted_during_scaledown(
remote_command_executor, "slurm", region, cluster.cfn_name, scaledown_idletime
)
_test_dynamic_dummy_nodes(remote_command_executor, max_queue_size)
Expand Down
4 changes: 2 additions & 2 deletions tests/integration-tests/tests/schedulers/test_torque.py
Expand Up @@ -20,7 +20,7 @@
from remote_command_executor import RemoteCommandExecutionError, RemoteCommandExecutor
from tests.common.assertions import assert_no_errors_in_logs, assert_scaling_worked
from tests.common.schedulers_common import TorqueCommands
from tests.schedulers.common import test_overscaling_when_job_submitted_during_scaledown
from tests.schedulers.common import assert_overscaling_when_job_submitted_during_scaledown


@pytest.mark.regions(["us-west-2"])
Expand All @@ -45,7 +45,7 @@ def test_torque(region, pcluster_config_reader, clusters_factory):
_test_job_dependencies(remote_command_executor, region, cluster.cfn_name, scaledown_idletime)
_test_job_arrays_and_parallel_jobs(remote_command_executor, region, cluster.cfn_name, scaledown_idletime, max_slots)
_test_dynamic_cluster_limits(remote_command_executor, max_queue_size, max_slots, region, cluster.asg)
test_overscaling_when_job_submitted_during_scaledown(
assert_overscaling_when_job_submitted_during_scaledown(
remote_command_executor, "torque", region, cluster.cfn_name, scaledown_idletime
)

Expand Down

0 comments on commit 5fb0adf

Please sign in to comment.