Skip to content

Commit 68fece6

Browse files
committed
Updated tests to match changed default value of traces_sample_rate
1 parent 2ddc295 commit 68fece6

File tree

5 files changed

+12
-3
lines changed

5 files changed

+12
-3
lines changed

tests/integrations/aiohttp/test_aiohttp.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,10 @@ async def hello(request):
448448
async def test_trace_from_headers_if_performance_disabled(
449449
sentry_init, aiohttp_client, capture_events
450450
):
451-
sentry_init(integrations=[AioHttpIntegration()])
451+
sentry_init(
452+
traces_sample_rate=None, # disable all performance monitoring
453+
integrations=[AioHttpIntegration()],
454+
)
452455

453456
async def hello(request):
454457
capture_message("It's a good day to try dividing by 0")

tests/integrations/asgi/test_asgi.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,9 @@ async def test_trace_from_headers_if_performance_disabled(
325325
asgi3_app_with_error_and_msg,
326326
capture_events,
327327
):
328-
sentry_init()
328+
sentry_init(
329+
traces_sample_rate=None, # disable all performance monitoring
330+
)
329331
app = SentryAsgiMiddleware(asgi3_app_with_error_and_msg)
330332

331333
trace_id = "582b43a4192642f0b136d5159a501701"

tests/integrations/django/asgi/test_asgi.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,7 @@ async def test_trace_from_headers_if_performance_enabled(sentry_init, capture_ev
385385
)
386386
async def test_trace_from_headers_if_performance_disabled(sentry_init, capture_events):
387387
sentry_init(
388+
traces_sample_rate=None, # disable all performance monitoring
388389
integrations=[DjangoIntegration()],
389390
)
390391

tests/integrations/django/test_basic.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ def test_trace_from_headers_if_performance_disabled(
236236
sentry_init, client, capture_events
237237
):
238238
sentry_init(
239+
traces_sample_rate=None, # disable all performance monitoring
239240
integrations=[
240241
DjangoIntegration(
241242
http_methods_to_capture=("HEAD",),

tests/integrations/wsgi/test_wsgi.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,9 @@ def dogpark(environ, start_response):
301301
capture_message("Attempting to fetch the ball")
302302
raise ValueError("Fetch aborted. The ball was not returned.")
303303

304-
sentry_init()
304+
sentry_init(
305+
traces_sample_rate=None, # disable all performance monitoring
306+
)
305307
app = SentryWsgiMiddleware(dogpark)
306308
client = Client(app)
307309
events = capture_events()

0 commit comments

Comments
 (0)