Skip to content

Commit b44d10c

Browse files
authored
test: replace the force_flush test that passes without the override with a reasoned pragma (#262)
1 parent 9009cad commit b44d10c

2 files changed

Lines changed: 1 addition & 7 deletions

File tree

‎lite_bootstrap/instruments/opentelemetry_instrument.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def on_end(self, span: "ReadableSpan") -> None:
127127
pyroscope.remove_thread_tag(_PYROSCOPE_SPAN_NAME_KEY, span.name)
128128

129129
def force_flush(self, timeout_millis: int = 30000) -> bool: # noqa: ARG002
130-
return True
130+
return True # pragma: no cover - matters only at the sdk 1.28 floor, whose base returns None
131131

132132

133133
@dataclasses.dataclass(kw_only=True, slots=True)

‎tests/instruments/test_pyroscope_instrument.py‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,6 @@ def test_pyroscope_span_processor_on_start_remote_parent() -> None:
175175
mock_pyroscope.add_thread_tag.assert_any_call("span_name", "remote-root")
176176

177177

178-
def test_pyroscope_span_processor_does_not_fail_provider_force_flush() -> None:
179-
provider = SDKTracerProvider()
180-
provider.add_span_processor(otel_module.PyroscopeSpanProcessor())
181-
assert provider.force_flush() is True
182-
183-
184178
def test_pyroscope_otel_adds_span_processor_when_configured() -> None:
185179
"""OTel instrument adds PyroscopeSpanProcessor when pyroscope_endpoint is set."""
186180
config = FreeConfig(

0 commit comments

Comments
 (0)