Skip to content

Commit 0fdcd21

Browse files
committed
fix
1 parent 0cc6fa5 commit 0fdcd21

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/tracing/test_sampling.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ def test_ignores_inherited_sample_decision_when_traces_sampler_defined_span_stre
305305
):
306306
# make traces_sampler pick the opposite of the inherited decision, to prove
307307
# that traces_sampler takes precedence
308-
traces_sampler = mock.Mock(return_value=not parent_sampling_decision)
308+
traces_sampler = mock.Mock(return_value=not bool(int(parent_sampling_decision)))
309309
sentry_init(
310310
traces_sampler=traces_sampler,
311311
_experiments={"trace_lifecycle": "stream"},
@@ -317,7 +317,7 @@ def test_ignores_inherited_sample_decision_when_traces_sampler_defined_span_stre
317317
}
318318
)
319319
span = sentry_sdk.traces.start_span(name="dogpark")
320-
assert span.sampled is not parent_sampling_decision
320+
assert span.sampled is not bool(int(parent_sampling_decision))
321321

322322

323323
@pytest.mark.parametrize("explicit_decision", [True, False])

0 commit comments

Comments
 (0)