diff --git a/src/sentry/uptime/consumers/results_consumer.py b/src/sentry/uptime/consumers/results_consumer.py index f450ad074b0d64..e9b1c2224ee8ce 100644 --- a/src/sentry/uptime/consumers/results_consumer.py +++ b/src/sentry/uptime/consumers/results_consumer.py @@ -47,7 +47,7 @@ AUTO_DETECTED_ACTIVE_SUBSCRIPTION_INTERVAL = timedelta(minutes=1) # When in active monitoring mode, how many failures in a row do we need to see to mark the monitor as down, or how many # successes in a row do we need to mark it up -ACTIVE_FAILURE_THRESHOLD = 2 +ACTIVE_FAILURE_THRESHOLD = 3 ACTIVE_RECOVERY_THRESHOLD = 1 # The TTL of the redis key used to track consecutive statuses ACTIVE_THRESHOLD_REDIS_TTL = timedelta(minutes=60) diff --git a/tests/sentry/uptime/consumers/test_results_consumers.py b/tests/sentry/uptime/consumers/test_results_consumers.py index 631218d55da52b..a916acd6ca72d1 100644 --- a/tests/sentry/uptime/consumers/test_results_consumers.py +++ b/tests/sentry/uptime/consumers/test_results_consumers.py @@ -73,7 +73,10 @@ def test(self): ) with mock.patch( "sentry.uptime.consumers.results_consumer.metrics" - ) as metrics, self.feature("organizations:uptime-create-issues"): + ) as metrics, self.feature("organizations:uptime-create-issues"), mock.patch( + "sentry.uptime.consumers.results_consumer.ACTIVE_FAILURE_THRESHOLD", + new=2, + ): self.send_result(result) metrics.incr.assert_has_calls( [ @@ -231,7 +234,10 @@ def test_no_create_issues_feature(self): def test_resolve(self): with mock.patch( "sentry.uptime.consumers.results_consumer.metrics" - ) as metrics, self.feature("organizations:uptime-create-issues"): + ) as metrics, self.feature("organizations:uptime-create-issues"), mock.patch( + "sentry.uptime.consumers.results_consumer.ACTIVE_FAILURE_THRESHOLD", + new=2, + ): self.send_result( self.create_uptime_result( self.subscription.subscription_id,