Skip to content

Increasing test timeouts and disabling stop tests #235

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

Merged
merged 3 commits into from
Apr 7, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
8 changes: 1 addition & 7 deletions test/e2e/tests/test_feature_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
FEATURE_GROUP_STATUS_CREATING = "Creating"
FEATURE_GROUP_STATUS_CREATED = "Created"
# longer wait is used because we sometimes see server taking time to create/delete
WAIT_PERIOD_COUNT = 8
WAIT_PERIOD_COUNT = 9
WAIT_PERIOD_LENGTH = 30
STATUS = "status"
RESOURCE_STATUS = "featureGroupStatus"
Expand Down Expand Up @@ -144,12 +144,6 @@ def test_create_feature_group(self, feature_group):

assert k8s.get_resource_arn(resource) == feature_group_arn

assert (
feature_group_sm_desc["FeatureGroupStatus"] == FEATURE_GROUP_STATUS_CREATING
)

assert k8s.wait_on_condition(reference, "ACK.ResourceSynced", "False")

self._assert_feature_group_status_in_sync(
feature_group_name, reference, FEATURE_GROUP_STATUS_CREATED
)
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/tests/test_hpo.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ def get_hpo_resource_status(reference: k8s.CustomResourceReference):


@service_marker
@pytest.mark.canary
class TestHPO:
def _wait_resource_hpo_status(
self,
Expand Down Expand Up @@ -153,6 +152,7 @@ def test_stopped(self, xgboost_hpojob):
hpo_sm_desc["HyperParameterTuningJobStatus"] in cfg.LIST_JOB_STATUS_STOPPED
)

@pytest.mark.canary
def test_completed(self, xgboost_hpojob):
(reference, resource) = xgboost_hpojob
assert k8s.get_resource_exists(reference)
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/tests/test_model_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def _wait_resource_model_package_status(
self,
reference: k8s.CustomResourceReference,
expected_status: str,
wait_periods: int = 30,
wait_periods: int = 32,
period_length: int = 30,
):
return wait_for_status(
Expand All @@ -147,7 +147,7 @@ def _wait_sagemaker_model_package_status(
self,
model_package_name,
expected_status: str,
wait_periods: int = 30,
wait_periods: int = 32,
period_length: int = 30,
):
return wait_for_status(
Expand Down
15 changes: 1 addition & 14 deletions test/e2e/tests/test_monitoring_schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def _assert_monitoring_schedule_status_in_sync(
schedule_name,
reference,
expected_status,
wait_periods: int = 6,
wait_periods: int = 7,
period_length: int = 30,
):
assert (
Expand All @@ -165,19 +165,6 @@ def test_smoke(
monitoring_schedule_arn = monitoring_schedule_desc["MonitoringScheduleArn"]
assert k8s.get_resource_arn(resource) == monitoring_schedule_arn

# scheule transitions Pending -> Scheduled state
# Pending status is shortlived only for 30 seconds because baselining job has already been run
# remove the checks for Pending status if the test is flaky because of this
# as the main objective is to test for Scheduled status
# OR
# create the schedule with a on-going baseline job where it waits for the baselining job to complete
assert (
wait_resource_monitoring_schedule_status(
reference, self.STATUS_PENDING, 5, 2
)
== self.STATUS_PENDING
)
assert k8s.wait_on_condition(reference, "ACK.ResourceSynced", "False", 5, 2)

self._assert_monitoring_schedule_status_in_sync(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to increase wait time for this check?

also can we do the same for feature group?

sagemaker_client, monitoring_schedule_name, reference, self.STATUS_SCHEDULED
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/tests/test_processingjob.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ def get_processing_resource_status(reference: k8s.CustomResourceReference):


@service_marker
@pytest.mark.canary
class TestProcessingJob:
def _wait_resource_processing_status(
self,
Expand Down Expand Up @@ -152,6 +151,7 @@ def test_stopped(self, kmeans_processing_job):
processing_job_desc = get_sagemaker_processing_job(processing_job_name)
assert processing_job_desc["ProcessingJobStatus"] in cfg.LIST_JOB_STATUS_STOPPED

@pytest.mark.canary
def test_completed(self, kmeans_processing_job):
(reference, resource) = kmeans_processing_job
assert k8s.get_resource_exists(reference)
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/tests/test_transformjob.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,12 @@ def get_transform_resource_status(reference: k8s.CustomResourceReference):


@service_marker
@pytest.mark.canary
class TestTransformJob:
def _wait_resource_transform_status(
self,
reference: k8s.CustomResourceReference,
expected_status: str,
wait_periods: int = 30,
wait_periods: int = 32,
period_length: int = 30,
):
return wait_for_status(
Expand All @@ -144,7 +143,7 @@ def _wait_sagemaker_transform_status(
self,
transform_job_name,
expected_status: str,
wait_periods: int = 30,
wait_periods: int = 32,
period_length: int = 30,
):
return wait_for_status(
Expand Down Expand Up @@ -188,6 +187,7 @@ def test_stopped(self, xgboost_transformjob):
transform_sm_desc = get_sagemaker_transform_job(transform_job_name)
assert transform_sm_desc["TransformJobStatus"] in cfg.LIST_JOB_STATUS_STOPPED

@pytest.mark.canary
def test_completed(self, xgboost_transformjob):
(reference, resource) = xgboost_transformjob
assert k8s.get_resource_exists(reference)
Expand Down