From e5dc643e4190d378f862e27f6683d8904d90e37d Mon Sep 17 00:00:00 2001 From: Adrian Swanberg Date: Wed, 11 Dec 2024 17:33:27 -0800 Subject: [PATCH] add more padding on tests that measure sample rates --- tests/trace/test_client_trace.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/trace/test_client_trace.py b/tests/trace/test_client_trace.py index 04808a2d1be..9d1fb4bb223 100644 --- a/tests/trace/test_client_trace.py +++ b/tests/trace/test_client_trace.py @@ -3045,7 +3045,7 @@ def sometimes_traced(x: int) -> int: sometimes_traced(i) assert sometimes_traced_calls == num_runs # Function was called every time num_traces = len(list(sometimes_traced.calls())) - assert 40 < num_traces < 60 # But only traced ~50% of the time + assert 35 < num_traces < 65 # But only traced ~50% of the time def test_op_sampling_async(client): @@ -3092,7 +3092,7 @@ async def sometimes_traced(x: int) -> int: asyncio.run(sometimes_traced(i)) assert sometimes_traced_calls == num_runs # Function was called every time num_traces = len(list(sometimes_traced.calls())) - assert 40 < num_traces < 60 # But only traced ~50% of the time + assert 35 < num_traces < 65 # But only traced ~50% of the time def test_op_sampling_inheritance(client):