Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run ResetForTest during cleanup #2754

Merged
merged 2 commits into from
Mar 31, 2022
Merged

run ResetForTest during cleanup #2754

merged 2 commits into from
Mar 31, 2022

Conversation

dmathieu
Copy link
Member

@dmathieu dmathieu commented Mar 30, 2022

This follows @pellared's suggestion in #2749 (comment).

Instead of calling ResetForTest directly, it pass the testing.TB, and make it call t.Cleanup, so we reset everything at the end of the test instead of its beginning.
By calling cleanup, we will also still be resetting if the test triggers a panic.

@dmathieu
Copy link
Member Author

This change is for an internal package, used only in internal tests. I don't think it requires a changelog entry.

@codecov
Copy link

codecov bot commented Mar 30, 2022

Codecov Report

Merging #2754 (ed1df6e) into main (ceead4a) will increase coverage by 0.0%.
The diff coverage is 100.0%.

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #2754   +/-   ##
=====================================
  Coverage   76.7%   76.7%           
=====================================
  Files        181     181           
  Lines      12176   12178    +2     
=====================================
+ Hits        9346    9350    +4     
+ Misses      2605    2603    -2     
  Partials     225     225           
Impacted Files Coverage Δ
internal/global/state.go 100.0% <100.0%> (ø)
sdk/trace/batch_span_processor.go 81.1% <0.0%> (+0.9%) ⬆️

@pellared pellared added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Mar 30, 2022
@MrAlias MrAlias merged commit 60041d2 into open-telemetry:main Mar 31, 2022
@dmathieu dmathieu deleted the reset-for-test-cleanup branch March 31, 2022 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants