fix(excon): enable SimpleCov coverage merging across appraisal runs#2193
Open
nicknikolakakis wants to merge 1 commit intoopen-telemetry:mainfrom
Open
fix(excon): enable SimpleCov coverage merging across appraisal runs#2193nicknikolakakis wants to merge 1 commit intoopen-telemetry:mainfrom
nicknikolakakis wants to merge 1 commit intoopen-telemetry:mainfrom
Conversation
Set a unique SimpleCov command_name per appraisal gemfile so coverage data from each semantic convention mode (stable, old, dup) is preserved and merged rather than overwritten. This brings combined test coverage from ~58% to 99%, meeting the required 85% threshold. Fixes open-telemetry#2155 Signed-off-by: Nick Nikolakakis <nonicked@protonmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SimpleCov.command_nameper appraisal gemfile so coverage data from each semantic convention mode (stable, old, dup) is preserved and merged rather than overwrittenRoot cause
The excon instrumentation tests 3 semantic convention modes via separate appraisal gemfiles. Each test run loads code for all 3 modes but only exercises one (the others are skipped based on
BUNDLE_GEMFILE). Without a uniquecommand_name, each run overwrites the previous one's entry in SimpleCov's.resultset.json, so coverage never reflects the full test suite.Fix
One line in
test_helper.rbderives a uniquecommand_namefromBUNDLE_GEMFILE:This produces names like
excon_latest_stable,excon_1.3.1_old, etc., allowing SimpleCov to merge results across all appraisal runs.Coverage
The 3 remaining uncovered lines (0.81%) are the
rescue StandardError => esafety nets in each middleware'shandle_response.Fixes #2155
Test plan
SimpleCov.minimum_coverage(85)passes after merge