Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TestPeriodicMetrics test #1364

Conversation

jpkrohling
Copy link
Member

Signed-off-by: Juraci Paixão Kröhling juraci@kroehling.de

Description: Fixes the TestPeriodicMetrics test from the groupbytrace processor by ensuring that the views used during the test are clean.
Before this PR, the test would fail all the time when running multiple times in the same process:

$ go test . -count 100 "^TestPeriodicMetrics$" | grep Messages | sort | uniq -c 
     99         	Messages:   	gauge exists already but shouldn't

After this PR, the test didn't fail after 100 attempts:

$ go test . -count 100 "^TestPeriodicMetrics$" | grep Messages | sort | uniq -c 

Link to tracking Issue: Closes open-telemetry/opentelemetry-collector#1927

Testing: n/a

Documentation: n/a

Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
@jpkrohling jpkrohling requested a review from a team October 23, 2020 13:25
@bogdandrutu bogdandrutu merged commit d049529 into open-telemetry:master Oct 23, 2020
dyladan referenced this pull request in dynatrace-oss-contrib/opentelemetry-collector-contrib Jan 29, 2021
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.

groupbytraceprocessor: TestPeriodicMetrics is unstable
3 participants