Skip to content

Conversation

@cjihrig
Copy link
Contributor

@cjihrig cjihrig commented Oct 18, 2025

Which problem is this PR solving?

The envVariableSubstitution() test currently cleans up its modified environment variables at the end of the test body. This is unreliable because if the test fails, the clean up code is not run, and can leak environment variables into surrounding tests.

Fixes # N/A

Short description of the changes

This commit moves the cleanup into afterEach() hook. The test is also moved into its own suite to keep the cleanup properly scoped, and allow for additional tests in the future.

Type of change

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

How Has This Been Tested?

  • Existing test suite.

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 October 18, 2025 16:03
@codecov
Copy link

codecov bot commented Oct 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.01%. Comparing base (a93b1dc) to head (4ca0cc6).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6026   +/-   ##
=======================================
  Coverage   95.01%   95.01%           
=======================================
  Files         313      313           
  Lines        8799     8799           
  Branches     1888     1888           
=======================================
  Hits         8360     8360           
  Misses        439      439           
🚀 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.

@maryliag maryliag added this pull request to the merge queue Oct 19, 2025
Merged via the queue into open-telemetry:main with commit 3bb5717 Oct 19, 2025
25 checks passed
@otelbot
Copy link
Contributor

otelbot bot commented Oct 19, 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 envvarsub-cleanup branch October 19, 2025 23:18
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