Skip to content

infra: mark long-running cron tests #1635

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 2 commits into from
Jun 26, 2020
Merged
Changes from all 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
10 changes: 7 additions & 3 deletions tests/integ/test_model_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@

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

TWO_HOUR_CRON_EXPRESSION = "cron(0 0/2 ? * * *)"
FIVE_MIN_CRON_EXPRESSION = "cron(0/5 * ? * * *)"


@pytest.fixture(scope="module")
Expand Down Expand Up @@ -150,7 +150,7 @@ def default_monitoring_schedule_name(sagemaker_session, output_kms_key, volume_k
output_s3_uri=output_s3_uri,
statistics=statistics,
constraints=constraints,
schedule_cron_expression=TWO_HOUR_CRON_EXPRESSION,
schedule_cron_expression=FIVE_MIN_CRON_EXPRESSION,
enable_cloudwatch_metrics=ENABLE_CLOUDWATCH_METRICS,
)

Expand Down Expand Up @@ -210,7 +210,7 @@ def byoc_monitoring_schedule_name(sagemaker_session, output_kms_key, volume_kms_
output=MonitoringOutput(source="/opt/ml/processing/output", destination=output_s3_uri),
statistics=statistics,
constraints=constraints,
schedule_cron_expression=TWO_HOUR_CRON_EXPRESSION,
schedule_cron_expression=FIVE_MIN_CRON_EXPRESSION,
)

_wait_for_schedule_changes_to_apply(monitor=my_byoc_monitor)
Expand Down Expand Up @@ -1330,6 +1330,7 @@ def test_default_monitor_create_and_update_schedule_config_without_customization
tests.integ.test_region() in tests.integ.NO_MODEL_MONITORING_REGIONS,
reason="ModelMonitoring is not yet supported in this region.",
)
@pytest.mark.cron
def test_default_monitor_attach_followed_by_baseline_and_update_monitoring_schedule(
sagemaker_session,
default_monitoring_schedule_name,
Expand Down Expand Up @@ -1486,6 +1487,7 @@ def test_default_monitor_attach_followed_by_baseline_and_update_monitoring_sched
tests.integ.test_region() in tests.integ.NO_MODEL_MONITORING_REGIONS,
reason="ModelMonitoring is not yet supported in this region.",
)
@pytest.mark.cron
def test_default_monitor_monitoring_execution_interactions(
sagemaker_session, default_monitoring_schedule_name
):
Expand Down Expand Up @@ -2226,6 +2228,7 @@ def test_byoc_monitor_create_and_update_schedule_config_with_customizations(
tests.integ.test_region() in tests.integ.NO_MODEL_MONITORING_REGIONS,
reason="ModelMonitoring is not yet supported in this region.",
)
@pytest.mark.cron
def test_byoc_monitor_attach_followed_by_baseline_and_update_monitoring_schedule(
sagemaker_session,
predictor,
Expand Down Expand Up @@ -2448,6 +2451,7 @@ def test_byoc_monitor_attach_followed_by_baseline_and_update_monitoring_schedule
tests.integ.test_region() in tests.integ.NO_MODEL_MONITORING_REGIONS,
reason="ModelMonitoring is not yet supported in this region.",
)
@pytest.mark.cron
def test_byoc_monitor_monitoring_execution_interactions(
sagemaker_session, byoc_monitoring_schedule_name
):
Expand Down