test: replace the force_flush test that passes without the override with a reasoned pragma - #262
Merged
Merged
Conversation
…ith a reasoned pragma
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.
Follow-up to #261, which covered
PyroscopeSpanProcessor.force_flushwithtest_pyroscope_span_processor_does_not_fail_provider_force_flush.That test cannot fail on the SDK CI installs. The override exists for the declared floor,
opentelemetry-sdk>=1.28, whose baseSpanProcessor.force_flushhas no return and so yieldsNone, makingTracerProvider.force_flush()reportFalse. From some later release the base returnsTrue, so with the override deleted the test still passes. Checked directly:force_flushbody ends inTracerProvider.force_flush()with a bare processorNone)Falsereturn TrueTruepytestresolves at the newest versions and thefloorsjob runs a smoke script, not the suite, so no job runs this test where it could fail. A test that only moves the coverage number is worse than a pragma that says why the line is not exercised, per TS6.return Truecarries# pragma: no cover - matters only at the sdk 1.28 floor, whose base returns None.just lint-cipasses;just test-ci: 331 passed, 100 % coverage.