Skip to content

fix(tests): Fix flake in continuous profiler tests - #6958

Draft
pabloDeputter wants to merge 5 commits into
masterfrom
pablo/fix-flake-continuous-profiler-test
Draft

fix(tests): Fix flake in continuous profiler tests#6958
pabloDeputter wants to merge 5 commits into
masterfrom
pablo/fix-flake-continuous-profiler-test

Conversation

@pabloDeputter

@pabloDeputter pabloDeputter commented Jul 30, 2026

Copy link
Copy Markdown
Member

Description

  • Issue: Profiler auto-starts/stops using fixed time.sleep(0.2) before asserting that the profiler indeed has stopped. With the 21Hz frequency, each interval is ~47.6ms. Auto-shutdown requires multiple cycles to complete soft shutdown. Under heavy load, this could take longer resulting in the assertion being run first and failing.
  • Added a temporary workflow running both tests 5 times across Python 3.6–3.14. Removed in final commit.

Issues

Resolves: #6957 & PY-2638

Reminders

@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊

99634 passed | ⏭️ 6757 skipped | Total: 106391 | Pass Rate: 93.65% | Execution Time: 355m 24s

📊 Comparison with Base Branch

Metric Change
Total Tests
Passed Tests 📈 +2
Failed Tests 📉 -2
Skipped Tests

➖ Removed Tests (2)

View removed tests
  • test_continuous_profiler_auto_start_and_stop_sampled[non-experiment-gevent]
    • File: tests.profiler.test_continuous_profiler
  • test_continuous_profiler_auto_start_and_stop_sampled_span_streaming[experiment-thread]
    • File: tests.profiler.test_continuous_profiler

All tests are passing successfully.

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

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    89.88%    89.89%    +0.01%
==========================================
  Files          193       193         —
  Lines        24747     24747         —
  Branches      8858      8858         —
==========================================
+ Hits         22242     22244        +2
- Misses        2505      2503        -2
- Partials      1416      1414        -2

Generated by Codecov Action

@pabloDeputter
pabloDeputter force-pushed the pablo/fix-flake-continuous-profiler-test branch from 152c7fe to f4e6163 Compare July 31, 2026 11:57
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.

Flake continuous profiler test

1 participant