Skip to content

test: isolate event encoding from container origin globals - #405

Open
HNO3Miracle wants to merge 1 commit into
DataDog:masterfrom
HNO3Miracle:fix-portable-tests-20260921
Open

HNO3Miracle wants to merge 1 commit into
DataDog:masterfrom
HNO3Miracle:fix-portable-tests-20260921

Conversation

@HNO3Miracle

Copy link
Copy Markdown

Event encoding tests currently inherit package-level origin detection state, so their expected payload can depend on the host/container or on earlier tests. Use the existing withoutOriginGlobals(t) helper in these tests, consistent with the metric tests.

This only changes event tests. The preaggregated distribution expectation is already being addressed in #366 and is left to that PR.

Validation: go test ./statsd -run 'TestEvent|TestNewEvent' -count=1 with Go 1.26.3.

Signed-off-by: HNO3Miracle <xiangao.or@isrc.iscas.ac.cn>
@HNO3Miracle
HNO3Miracle requested a review from a team as a code owner September 20, 2026 20:24
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