Skip to content
Merged
Show file tree
Hide file tree
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
12 changes: 6 additions & 6 deletions tests/client/client_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,10 +555,10 @@ def test_transaction_max_spans_dynamic(elasticapm_client):
@pytest.mark.parametrize("elasticapm_client", [{"span_frames_min_duration": 20}], indirect=True)
def test_transaction_span_frames_min_duration(elasticapm_client):
elasticapm_client.begin_transaction("test_type")
with elasticapm.capture_span("noframes"):
time.sleep(0.001)
with elasticapm.capture_span("frames"):
time.sleep(0.040)
with elasticapm.capture_span("noframes", duration=0.001):
pass
with elasticapm.capture_span("frames", duration=0.04):
pass
elasticapm_client.end_transaction("test")

spans = elasticapm_client.events[SPAN]
Expand All @@ -576,8 +576,8 @@ def test_transaction_span_frames_min_duration_no_limit(elasticapm_client):
elasticapm_client.begin_transaction("test_type")
with elasticapm.capture_span("frames"):
pass
with elasticapm.capture_span("frames"):
time.sleep(0.040)
with elasticapm.capture_span("frames", duration=0.04):
pass
elasticapm_client.end_transaction("test")

spans = elasticapm_client.events[SPAN]
Expand Down
8 changes: 4 additions & 4 deletions tests/instrumentation/transactions_store_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,11 @@ def test_leaf_tracing(tracer):
with capture_span("child1-leaf", "custom", leaf=True):

# These two spans should not show up
with capture_span("ignored-child1", "custom", leaf=True):
time.sleep(0.01)
with capture_span("ignored-child1", "custom", leaf=True, duration=0.01):
pass

with capture_span("ignored-child2", "custom", leaf=False):
time.sleep(0.01)
with capture_span("ignored-child2", "custom", leaf=False, duration=0.01):
pass

tracer.end_transaction(None, "transaction")

Expand Down