Skip to content

Commit cc82cd1

Browse files
authored
spanchecks: Support testing without tracing (#4682)
Tests cannot be ran without configuring tracing. Split from #4678. Does not nag about the span checks when there is no subscriber configured, because then the spans will have no links and nothing can be checked. Sadly the `SpanTrace::status()` cannot be used for this. `tracing` is always configured in regress testing (running with `pageserver` binary), which should be enough. Additionally cleans up the test code in span checks to be in the test code. Fixes a `#[should_panic]` test which was flaky before these changes, but the `#[should_panic]` hid the flakyness. Rationale for need: Unit tests might not be testing only the public or `feature="testing"` APIs which are only testable within `regress` tests so not all spans might be configured.
1 parent c76b74c commit cc82cd1

File tree

3 files changed

+229
-81
lines changed

3 files changed

+229
-81
lines changed

0 commit comments

Comments
 (0)