Skip to content

Commit 6838362

Browse files
committed
fixed assert
1 parent 07ce468 commit 6838362

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tests/tracing/test_trace_propagation.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,15 +187,12 @@ def test_with_incoming_trace_and_trace_propagation_targets_matching(
187187
"baggage"
188188
] += f',sentry-sampled={"true" if incoming_parent_sampled == "1" else "false"}' # noqa: E231
189189

190-
print("~~~~~~~~~~~~~~~~~~~~")
191-
print(incoming_headers)
192-
print("~~~~~~~~~~~~~~~~~~~~")
193190
with sentry_sdk.continue_trace(incoming_headers):
194191
with sentry_sdk.start_span(op="test", name="test"):
195192
requests.get("http://example.com")
196193

197194
# CHECK if performance data (a transaction/span) is sent to Sentry
198-
if traces_sample_rate is None:
195+
if traces_sample_rate is None or incoming_parent_sampled == "0":
199196
assert len(events) == 0
200197
else:
201198
if incoming_parent_sampled == "1" or traces_sample_rate == 1:
@@ -274,7 +271,7 @@ def test_with_incoming_trace_and_trace_propagation_targets_not_matching(
274271
requests.get("http://example.com")
275272

276273
# CHECK if performance data (a transaction/span) is sent to Sentry
277-
if traces_sample_rate is None:
274+
if traces_sample_rate is None or incoming_parent_sampled == "0":
278275
assert len(events) == 0
279276
else:
280277
if incoming_parent_sampled == "1" or traces_sample_rate == 1:

0 commit comments

Comments
 (0)