Better bit assertions in integration tests for 02,03 traceflags#767
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates integration tests around traceparent trace-flags handling in the SolarWinds APM propagation test suite, aiming to validate sampled/not-sampled semantics via bit checks instead of hard-coded 00/01 values.
Changes:
- Added shared helper assertions in the integration test base class for validating trace-flags format and sampled-bit semantics.
- Replaced several exact
trace_flags == "00"/"01"assertions with sampled/not-sampled helper checks. - Relaxed some continuation-path tests in scenarios 4 and 8 from exact trace-flags equality to sampled-bit-only comparisons.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
tests/integration/test_base_sw_headers_attrs.py |
Added reusable trace-flags assertion helpers for integration tests. |
tests/integration/test_xtraceoptions_validation.py |
Switched trace-flags assertion to shared sampled helper. |
tests/integration/test_unsigned_tt.py |
Replaced hard-coded sampled/not-sampled checks with helper-based assertions. |
tests/integration/test_signed_tt.py |
Replaced hard-coded sampled/not-sampled checks with helper-based assertions. |
tests/integration/test_scenario_8.py |
Relaxed continued-trace assertions to validate sampled bit instead of exact flags; also removed duplicate import. |
tests/integration/test_scenario_4.py |
Relaxed continued-trace assertions to validate sampled bit instead of exact flags. |
tests/integration/test_scenario_1.py |
Replaced exact sampled-flag assertion with shared helper. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.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.
Updates integration tests to also assert bits for sampled/not-sampled whether trace flags are 00,01,02,03. Provides evidence that those flags are already valid for existing APM Python custom sampling and propagation logic.
See ticket for more background information.