Skip to content

[TEST] Fixes BasicCurlHttpTests.RepeatedCallerThreadCancelsAreClean is flaky - #4524

Merged
marcalff merged 2 commits into
open-telemetry:mainfrom
owent:fixes_4510
Sep 4, 2026
Merged

[TEST] Fixes BasicCurlHttpTests.RepeatedCallerThreadCancelsAreClean is flaky#4524
marcalff merged 2 commits into
open-telemetry:mainfrom
owent:fixes_4510

Conversation

@owent

@owent owent commented Sep 3, 2026

Copy link
Copy Markdown
Member

Fixes #4510

Changes

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.46%. Comparing base (bc2831a) to head (db240f9).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4524      +/-   ##
==========================================
- Coverage   83.47%   83.46%   -0.00%     
==========================================
  Files         521      521              
  Lines       20380    20380              
==========================================
- Hits        17011    17009       -2     
- Misses       3369     3371       +2     

see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@owent
owent marked this pull request as ready for review September 3, 2026 12:22
@owent
owent requested a review from a team as a code owner September 3, 2026 12:22
Copilot AI lite review requested due to automatic review settings September 3, 2026 12:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The change is small and targeted to test flakiness, with only minor maintainability nits (unused failure counter) noted.

Pull request overview

This PR addresses flakiness in BasicCurlHttpTests.RepeatedCallerThreadCancelsAreClean by ensuring the test’s terminal-notification accounting includes additional failure outcomes that can occur during cancellation/connection-race scenarios in the curl HTTP client tests.

Changes:

  • Treat SessionState::ConnectFailed and SessionState::SendFailed as terminal outcomes for TerminalCountingHandler’s terminal counter.
  • Add tracking for failure outcomes (currently via a new failed_count_ counter).
File summaries
File Description
ext/test/http/curl_http_test.cc Updates TerminalCountingHandler to count connect/send failures as terminal events to stabilize terminal totals in the flaky test scenario.
Review details

Suppressed comments (1)

ext/test/http/curl_http_test.cc:145

  • After removing the unused failed_count_ updates, this member can also be removed to keep TerminalCountingHandler minimal.
  std::atomic<int> terminal_count_{0};
  std::atomic<int> cancelled_from_callback_{0};
  std::atomic<int> failed_count_{0};
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread ext/test/http/curl_http_test.cc
Comment thread ext/test/http/curl_http_test.cc Outdated

@marcalff marcalff left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the root cause analysis and fix.

LGTM, see some cleanup around unused member variable.

@marcalff
marcalff merged commit f9936a7 into open-telemetry:main Sep 4, 2026
77 checks passed
@marcalff marcalff changed the title Fixes BasicCurlHttpTests.RepeatedCallerThreadCancelsAreClean is flaky [TEST] Fixes BasicCurlHttpTests.RepeatedCallerThreadCancelsAreClean is flaky Sep 4, 2026
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.

[TEST] BasicCurlHttpTests.RepeatedCallerThreadCancelsAreClean is flaky

3 participants