Skip to content
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
15 changes: 12 additions & 3 deletions tests/test_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ def test_monitor_unhealthy(sentry_init):
sentry_init(transport=UnhealthyTestTransport())

monitor = sentry_sdk.get_client().monitor
monitor.interval = 0.1
# This test calls monitor.run() itself. Stop the background thread
# from running health checks too, or it can bump downsample_factor
# between our asserts on a slow runner (#8031).
monitor.kill()

assert monitor.is_healthy() is True

Expand All @@ -69,7 +72,10 @@ def test_transaction_uses_downsampled_rate(
record_lost_event_calls = capture_record_lost_event_calls()

monitor = sentry_sdk.get_client().monitor
monitor.interval = 0.1
# This test calls monitor.run() itself. Stop the background thread
# from running health checks too, or it can bump downsample_factor
# between our asserts on a slow runner (#8031).
monitor.kill()

assert monitor.is_healthy() is True
monitor.run()
Expand Down Expand Up @@ -102,7 +108,10 @@ def test_segment_uses_downsampled_rate(
record_lost_event_calls = capture_record_lost_event_calls()

monitor = sentry_sdk.get_client().monitor
monitor.interval = 0.1
# This test calls monitor.run() itself. Stop the background thread
# from running health checks too, or it can bump downsample_factor
# between our asserts on a slow runner (#8031).
monitor.kill()

assert monitor.is_healthy() is True
monitor.run()
Expand Down
Loading