Skip to content

test(instrumentation-http): make timing dependent test more robust#6144

Merged
pichlermarc merged 2 commits intoopen-telemetry:mainfrom
cjihrig:flake
Nov 21, 2025
Merged

test(instrumentation-http): make timing dependent test more robust#6144
pichlermarc merged 2 commits intoopen-telemetry:mainfrom
cjihrig:flake

Conversation

@cjihrig
Copy link
Copy Markdown
Contributor

@cjihrig cjihrig commented Nov 20, 2025

Which problem is this PR solving?

The test should have 2 ended span when client prematurely close relies on specific timing of asynchronous events. This leads to it being flaky in the CI.

Fixes # https://github.com/open-telemetry/opentelemetry-js/actions/runs/19544684677/job/55960292192

Short description of the changes

This commit updates the test to use a polling mechanism instead of relying on timers of specific durations.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Reproduced the issue locally and then updated the test.

Checklist:

  • Followed the style guidelines of this project
  • Unit tests have been added
  • Documentation has been updated

@cjihrig cjihrig requested a review from a team as a code owner November 20, 2025 20:11
Comment thread experimental/CHANGELOG.md Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.21%. Comparing base (3110287) to head (978b9fd).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6144   +/-   ##
=======================================
  Coverage   95.21%   95.21%           
=======================================
  Files         316      316           
  Lines        9389     9389           
  Branches     2167     2167           
=======================================
  Hits         8940     8940           
  Misses        449      449           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pichlermarc pichlermarc added this pull request to the merge queue Nov 21, 2025
Merged via the queue into open-telemetry:main with commit a7acd93 Nov 21, 2025
27 checks passed
@otelbot
Copy link
Copy Markdown
Contributor

otelbot Bot commented Nov 21, 2025

Thank you for your contribution @cjihrig! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this survey.

@cjihrig cjihrig deleted the flake branch November 21, 2025 12:41
@otelbot-js otelbot-js Bot mentioned this pull request Jan 7, 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.

2 participants