Skip to content

test: replace the force_flush test that passes without the override with a reasoned pragma - #262

Merged
lesnik512 merged 1 commit into
mainfrom
test/drop-hollow-force-flush-test
Sep 27, 2026
Merged

lesnik512 merged 1 commit into
mainfrom
test/drop-hollow-force-flush-test

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Follow-up to #261, which covered PyroscopeSpanProcessor.force_flush with test_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 base SpanProcessor.force_flush has no return and so yields None, making TracerProvider.force_flush() report False. From some later release the base returns True, so with the override deleted the test still passes. Checked directly:

SDK base force_flush body ends in TracerProvider.force_flush() with a bare processor
1.28.0 docstring only (returns None) False
1.45.0 return True True

pytest resolves at the newest versions and the floors job 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.

  • The test goes.
  • return True carries # pragma: no cover - matters only at the sdk 1.28 floor, whose base returns None.

just lint-ci passes; just test-ci: 331 passed, 100 % coverage.

@lesnik512
lesnik512 merged commit b44d10c into main Sep 27, 2026
37 checks passed
@lesnik512
lesnik512 deleted the test/drop-hollow-force-flush-test branch September 27, 2026 16:52
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.

1 participant