Skip to content

test: Close clients created by sentry_init#6857

Closed
alexander-alderman-webb wants to merge 2 commits into
webb/no-op-start-transactionfrom
webb/cleanup-test-client
Closed

test: Close clients created by sentry_init#6857
alexander-alderman-webb wants to merge 2 commits into
webb/no-op-start-transactionfrom
webb/cleanup-test-client

Conversation

@alexander-alderman-webb

@alexander-alderman-webb alexander-alderman-webb commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Description

The tests for #6844 failed due to client leakage between tests. Close the client so that background threads and batchers are cleaned up in tests relying on sentry_init().

Issues

Reminders

@github-actions

Copy link
Copy Markdown
Contributor

Codecov Results 📊

91889 passed | ❌ 29 failed | ⏭️ 6302 skipped | Total: 98220 | Pass Rate: 93.55% | Execution Time: 312m 44s

📊 Comparison with Base Branch

Metric Change
Total Tests 📈 +4
Passed Tests 📉 -24
Failed Tests 📈 +28
Skipped Tests

➕ New Tests (15)

View new tests
  • test_circular_references
    • File: tests.tracing.test_misc
    • Status: ❌ Failing
  • test_circular_references_span_streaming
    • File: tests.tracing.test_misc
    • Status: ❌ Failing
  • test_circular_references
    • File: tests.tracing.test_misc
    • Status: ❌ Failing
  • test_circular_references_span_streaming
    • File: tests.tracing.test_misc
    • Status: ❌ Failing
  • test_circular_references
    • File: tests.tracing.test_misc
    • Status: ❌ Failing
  • test_circular_references_span_streaming
    • File: tests.tracing.test_misc
    • Status: ❌ Failing
  • test_circular_references
    • File: tests.tracing.test_misc
    • Status: ❌ Failing
  • test_circular_references_span_streaming
    • File: tests.tracing.test_misc
    • Status: ❌ Failing
  • test_circular_references_span_streaming
    • File: tests.tracing.test_misc
    • Status: ❌ Failing
  • test_circular_references_span_streaming
    • File: tests.tracing.test_misc
    • Status: ❌ Failing
  • test_circular_references
    • File: tests.tracing.test_misc
    • Status: ❌ Failing
  • test_circular_references_span_streaming
    • File: tests.tracing.test_misc
    • Status: ❌ Failing
  • test_circular_references_span_streaming
    • File: tests.tracing.test_misc
    • Status: ❌ Failing
  • test_circular_references
    • File: tests.tracing.test_misc
    • Status: ❌ Failing
  • test_circular_references
    • File: tests.tracing.test_misc
    • Status: ❌ Failing

❌ Failed Tests

test_circular_references

File: tests.tracing.test_misc
Suite: py3.10-gevent
Error: assert 3 == 0 + where 3 = () + where = gc.collect

Stack Trace
tests/tracing/test_misc.py:336: in test_circular_references
    assert gc.collect() == 0
E   assert 3 == 0
E    +  where 3 = <built-in function collect>()
E    +    where <built-in function collect> = gc.collect

test_circular_references_span_streaming

File: tests.tracing.test_misc
Suite: py3.10-gevent
Error: assert 3 == 0 + where 3 = () + where = gc.collect

Stack Trace
tests/tracing/test_misc.py:379: in test_circular_references_span_streaming
    assert gc.collect() == 0
E   assert 3 == 0
E    +  where 3 = <built-in function collect>()
E    +    where <built-in function collect> = gc.collect

test_circular_references

File: tests.tracing.test_misc
Suite: py3.11-common
Error: assert 2 == 0 + where 2 = () + where = gc.collect

Stack Trace
tests/tracing/test_misc.py:336: in test_circular_references
    assert gc.collect() == 0
E   assert 2 == 0
E    +  where 2 = <built-in function collect>()
E    +    where <built-in function collect> = gc.collect

test_circular_references_span_streaming

File: tests.tracing.test_misc
Suite: py3.11-common
Error: assert 4 == 0 + where 4 = () + where = gc.collect

Stack Trace
tests/tracing/test_misc.py:379: in test_circular_references_span_streaming
    assert gc.collect() == 0
E   assert 4 == 0
E    +  where 4 = <built-in function collect>()
E    +    where <built-in function collect> = gc.collect

test_circular_references

File: tests.tracing.test_misc
Suite: py3.11-gevent
Error: assert 4 == 0 + where 4 = () + where = gc.collect

Stack Trace
tests/tracing/test_misc.py:336: in test_circular_references
    assert gc.collect() == 0
E   assert 4 == 0
E    +  where 4 = <built-in function collect>()
E    +    where <built-in function collect> = gc.collect

test_circular_references_span_streaming

File: tests.tracing.test_misc
Suite: py3.11-gevent
Error: assert 4 == 0 + where 4 = () + where = gc.collect

Stack Trace
tests/tracing/test_misc.py:379: in test_circular_references_span_streaming
    assert gc.collect() == 0
E   assert 4 == 0
E    +  where 4 = <built-in function collect>()
E    +    where <built-in function collect> = gc.collect

test_circular_references

File: tests.tracing.test_misc
Suite: py3.12-common
Error: assert 2 == 0 + where 2 = () + where = gc.collect

Stack Trace
tests/tracing/test_misc.py:336: in test_circular_references
    assert gc.collect() == 0
E   assert 2 == 0
E    +  where 2 = <built-in function collect>()
E    +    where <built-in function collect> = gc.collect

test_circular_references_span_streaming

File: tests.tracing.test_misc
Suite: py3.12-common
Error: assert 2 == 0 + where 2 = () + where = gc.collect

Stack Trace
tests/tracing/test_misc.py:379: in test_circular_references_span_streaming
    assert gc.collect() == 0
E   assert 2 == 0
E    +  where 2 = <built-in function collect>()
E    +    where <built-in function collect> = gc.collect

test_circular_references_span_streaming

File: tests.tracing.test_misc
Suite: py3.12-gevent
Error: assert 4 == 0 + where 4 = () + where = gc.collect

Stack Trace
tests/tracing/test_misc.py:379: in test_circular_references_span_streaming
    assert gc.collect() == 0
E   assert 4 == 0
E    +  where 4 = <built-in function collect>()
E    +    where <built-in function collect> = gc.collect

test_circular_references_span_streaming

File: tests.tracing.test_misc
Suite: py3.13-common
Error: assert 2 == 0 + where 2 = () + where = gc.collect

Stack Trace
tests/tracing/test_misc.py:379: in test_circular_references_span_streaming
    assert gc.collect() == 0
E   assert 2 == 0
E    +  where 2 = <built-in function collect>()
E    +    where <built-in function collect> = gc.collect

test_circular_references

File: tests.tracing.test_misc
Suite: py3.14t-common
Error: assert 4 == 0 + where 4 = () + where = gc.collect

Stack Trace
tests/tracing/test_misc.py:336: in test_circular_references
    assert gc.collect() == 0
E   assert 4 == 0
E    +  where 4 = <built-in function collect>()
E    +    where <built-in function collect> = gc.collect

test_circular_references_span_streaming

File: tests.tracing.test_misc
Suite: py3.14t-common
Error: assert 2 == 0 + where 2 = () + where = gc.collect

Stack Trace
tests/tracing/test_misc.py:379: in test_circular_references_span_streaming
    assert gc.collect() == 0
E   assert 2 == 0
E    +  where 2 = <built-in function collect>()
E    +    where <built-in function collect> = gc.collect

test_circular_references

File: tests.tracing.test_misc
Suite: py3.6-gevent
Error: assert 3 == 0 +3 -0

Stack Trace
tests/tracing/test_misc.py:336: in test_circular_references
    assert gc.collect() == 0
E   assert 3 == 0
E     +3
E     -0

test_circular_references_span_streaming

File: tests.tracing.test_misc
Suite: py3.7-common
Error: assert 3 == 0 +3 -0

Stack Trace
tests/tracing/test_misc.py:379: in test_circular_references_span_streaming
    assert gc.collect() == 0
E   assert 3 == 0
E     +3
E     -0

test_circular_references

File: tests.tracing.test_misc
Suite: py3.8-common
Error: assert 3 == 0 + where 3 = () + where = gc.collect

Stack Trace
tests/tracing/test_misc.py:336: in test_circular_references
    assert gc.collect() == 0
E   assert 3 == 0
E    +  where 3 = <built-in function collect>()
E    +    where <built-in function collect> = gc.collect

test_circular_references

File: tests.tracing.test_misc
Suite: py3.9-common
Error: assert 3 == 0 + where 3 = () + where = gc.collect

Stack Trace
tests/tracing/test_misc.py:336: in test_circular_references
    assert gc.collect() == 0
E   assert 3 == 0
E    +  where 3 = <built-in function collect>()
E    +    where <built-in function collect> = gc.collect

✅ Patch coverage is 100.00%. Project has 2475 uncovered lines.
✅ Project coverage is 89.69%. Comparing base (base) to head (head).

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    89.68%    89.69%    +0.01%
==========================================
  Files          193       193         —
  Lines        24007     24007         —
  Branches      8342      8342         —
==========================================
+ Hits         21529     21532        +3
- Misses        2478      2475        -3
- Partials      1387      1381        -6

Generated by Codecov Action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant