Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[integ-tests] Improve integration tests #6639

Merged
merged 4 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/integration-tests/configs/isolated_regions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ test-suites:
- regions: {{ REGIONS }}
oss: {{ OSS }}
schedulers: {{ SCHEDULERS }}
instances: ["t3.micro"]
test_pcluster_configure.py::test_efa_and_placement_group:
dimensions:
- regions: {{ REGIONS }}
Expand Down
8 changes: 6 additions & 2 deletions tests/integration-tests/tests/schedulers/test_slurm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2588,8 +2588,12 @@ def _test_slurm_behavior_when_updating_schedulable_memory_with_already_running_j
["/var/log/slurmctld.log"],
[f"node {node} memory is overallocated"],
)
slurm_commands.wait_job_running(job_id_1)
slurm_commands.wait_job_completed(job_id_1)
try:
slurm_commands.wait_job_running(job_id_1)
slurm_commands.wait_job_completed(job_id_1)
except Exception as e:
logging.warning("Job %s did not complete as expected", job_id_1)
logging.warning(e)


def _test_scontrol_reboot_nodes(
Expand Down
39 changes: 16 additions & 23 deletions tests/integration-tests/tests/update/test_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,15 @@
]:
bucket.upload_file(str(test_datadir / script), f"scripts/{script}")

spot_instance_types = ["t3.small", "t3.medium"]
try:
boto3.client("ec2").describe_instance_types(InstanceTypes=["t3a.small"])
spot_instance_types.extend(["t3a.small", "t3a.medium"])
except Exception:
Dismissed Show dismissed Hide dismissed
pass

# Create cluster with initial configuration
init_config_file = pcluster_config_reader(resource_bucket=bucket_name)
init_config_file = pcluster_config_reader(resource_bucket=bucket_name, spot_instance_types=spot_instance_types)
cluster = clusters_factory(init_config_file)

# Verify that compute nodes stored the deployed config version on DDB
Expand Down Expand Up @@ -132,17 +139,9 @@
"queue1-i2": {
"instances": [
{
"instance_type": "t3.small",
},
{
"instance_type": "t3a.small",
},
{
"instance_type": "t3.medium",
},
{
"instance_type": "t3a.medium",
},
"instance_type": instance_type,
}
for instance_type in spot_instance_types
],
"expected_running_instances": 1,
"expected_power_saved_instances": 9,
Expand Down Expand Up @@ -190,6 +189,7 @@
resource_bucket=bucket_name,
additional_policy_arn=additional_policy_arn,
postupdate_script="updated_postupdate.sh",
spot_instance_types=spot_instance_types,
)
cluster.update(str(updated_config_file), force_update="true")

Expand Down Expand Up @@ -248,17 +248,9 @@
"queue1-i3": {
"instances": [
{
"instance_type": "t3.small",
},
{
"instance_type": "t3a.small",
},
{
"instance_type": "t3.medium",
},
{
"instance_type": "t3a.medium",
},
"instance_type": instance_type,
}
for instance_type in spot_instance_types
],
"expected_running_instances": 0,
"expected_power_saved_instances": 10,
Expand Down Expand Up @@ -354,6 +346,7 @@
resource_bucket=bucket_name,
additional_policy_arn=additional_policy_arn,
postupdate_script="failed_postupdate.sh",
spot_instance_types=spot_instance_types,
)
cluster.update(str(failed_update_config_file), raise_on_error=False, log_error=False)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,9 @@ Scheduling:
# Removed MinCount
- Name: queue1-i3 # New compute resource
Instances:
- InstanceType: t3.small
- InstanceType: t3a.small
- InstanceType: t3.medium
- InstanceType: t3a.medium
{% for instance_type in spot_instance_types %}
- InstanceType: {{ instance_type }}
{% endfor %}
# Removed MinCount
Networking:
SubnetIds:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,9 @@ Scheduling:
MaxCount: 2
- Name: queue1-i2
Instances:
- InstanceType: t3.small
- InstanceType: t3a.small
- InstanceType: t3.medium
- InstanceType: t3a.medium
{% for instance_type in spot_instance_types %}
- InstanceType: {{ instance_type }}
{% endfor %}
MinCount: 1
Networking:
SubnetIds:
Expand Down
Loading