Skip to content

Commit d89bac4

Browse files
authored
infra: mark long-running cron tests (#1635)
1 parent 52d0189 commit d89bac4

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tests/integ/test_model_monitor.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484

8585
INTEG_TEST_MONITORING_OUTPUT_BUCKET = "integ-test-monitoring-output-bucket"
8686

87-
TWO_HOUR_CRON_EXPRESSION = "cron(0 0/2 ? * * *)"
87+
FIVE_MIN_CRON_EXPRESSION = "cron(0/5 * ? * * *)"
8888

8989

9090
@pytest.fixture(scope="module")
@@ -150,7 +150,7 @@ def default_monitoring_schedule_name(sagemaker_session, output_kms_key, volume_k
150150
output_s3_uri=output_s3_uri,
151151
statistics=statistics,
152152
constraints=constraints,
153-
schedule_cron_expression=TWO_HOUR_CRON_EXPRESSION,
153+
schedule_cron_expression=FIVE_MIN_CRON_EXPRESSION,
154154
enable_cloudwatch_metrics=ENABLE_CLOUDWATCH_METRICS,
155155
)
156156

@@ -210,7 +210,7 @@ def byoc_monitoring_schedule_name(sagemaker_session, output_kms_key, volume_kms_
210210
output=MonitoringOutput(source="/opt/ml/processing/output", destination=output_s3_uri),
211211
statistics=statistics,
212212
constraints=constraints,
213-
schedule_cron_expression=TWO_HOUR_CRON_EXPRESSION,
213+
schedule_cron_expression=FIVE_MIN_CRON_EXPRESSION,
214214
)
215215

216216
_wait_for_schedule_changes_to_apply(monitor=my_byoc_monitor)
@@ -1330,6 +1330,7 @@ def test_default_monitor_create_and_update_schedule_config_without_customization
13301330
tests.integ.test_region() in tests.integ.NO_MODEL_MONITORING_REGIONS,
13311331
reason="ModelMonitoring is not yet supported in this region.",
13321332
)
1333+
@pytest.mark.cron
13331334
def test_default_monitor_attach_followed_by_baseline_and_update_monitoring_schedule(
13341335
sagemaker_session,
13351336
default_monitoring_schedule_name,
@@ -1486,6 +1487,7 @@ def test_default_monitor_attach_followed_by_baseline_and_update_monitoring_sched
14861487
tests.integ.test_region() in tests.integ.NO_MODEL_MONITORING_REGIONS,
14871488
reason="ModelMonitoring is not yet supported in this region.",
14881489
)
1490+
@pytest.mark.cron
14891491
def test_default_monitor_monitoring_execution_interactions(
14901492
sagemaker_session, default_monitoring_schedule_name
14911493
):
@@ -2226,6 +2228,7 @@ def test_byoc_monitor_create_and_update_schedule_config_with_customizations(
22262228
tests.integ.test_region() in tests.integ.NO_MODEL_MONITORING_REGIONS,
22272229
reason="ModelMonitoring is not yet supported in this region.",
22282230
)
2231+
@pytest.mark.cron
22292232
def test_byoc_monitor_attach_followed_by_baseline_and_update_monitoring_schedule(
22302233
sagemaker_session,
22312234
predictor,
@@ -2448,6 +2451,7 @@ def test_byoc_monitor_attach_followed_by_baseline_and_update_monitoring_schedule
24482451
tests.integ.test_region() in tests.integ.NO_MODEL_MONITORING_REGIONS,
24492452
reason="ModelMonitoring is not yet supported in this region.",
24502453
)
2454+
@pytest.mark.cron
24512455
def test_byoc_monitor_monitoring_execution_interactions(
24522456
sagemaker_session, byoc_monitoring_schedule_name
24532457
):

0 commit comments

Comments
 (0)