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 race in user agent test #568

Merged
merged 1 commit into from Jan 11, 2023

Conversation

dashpole
Copy link
Contributor

Failing run: https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/actions/runs/3887696124/jobs/6634249603

=== RUN   TestExportMetricsWithUserAgent
=== RUN   TestExportMetricsWithUserAgent/default
=== RUN   TestExportMetricsWithUserAgent/override_user_agent
panic: Fail in goroutine after TestExportMetricsWithUserAgent/default has completed

goroutine 131 [running]:
testing.(*common).Fail(0xc0002d4ea0)
	/opt/hostedtoolcache/go/1.18.9/x64/src/testing/testing.go:817 +0xe5
testing.(*common).Errorf(0xc0002d4ea0, {0xc21425?, 0xc0002d4ea0?}, {0xc000318000?, 0x47554f?, 0x11f1bc0?})
	/opt/hostedtoolcache/go/1.18.9/x64/src/testing/testing.go:934 +0x65
github.com/stretchr/testify/assert.Fail({0xd3ba00, 0xc0002d4ea0}, {0xc0004dc310, 0x6f}, {0x0, 0x0, 0x0})
	/home/runner/go/pkg/mod/github.com/stretchr/testify@v1.8.1/assert/assertions.go:264 +0x384
github.com/stretchr/testify/assert.Regexp({0xd3ba00, 0xc0002d4ea0}, {0xaea680, 0xc0002dbb80}, {0xaea680, 0xc0002dbb90}, {0x0, 0x0, 0x0})
	/home/runner/go/pkg/mod/github.com/stretchr/testify@v1.8.1/assert/assertions.go:1485 +0x13e
github.com/stretchr/testify/require.Regexp({0xd3e7d0, 0xc0002d4ea0}, {0xaea680, 0xc0002dbb80}, {0xaea680, 0xc0002dbb90}, {0x0, 0x0, 0x0})
	/home/runner/go/pkg/mod/github.com/stretchr/testify@v1.8.1/require/require.go:1735 +0xc5
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric.TestExportMetricsWithUserAgent.func1.3()
	/home/runner/work/opentelemetry-operations-go/opentelemetry-operations-go/exporter/metric/metric_test.go:890 +0x85
created by github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric.TestExportMetricsWithUserAgent.func1
	/home/runner/work/opentelemetry-operations-go/opentelemetry-operations-go/exporter/metric/metric_test.go:887 +0x20a
FAIL	github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric	0.045s
FAIL
make: *** [Makefile:134: test] Error 1

@dashpole dashpole marked this pull request as ready for review January 11, 2023 14:59
@dashpole dashpole closed this Jan 11, 2023
@dashpole dashpole reopened this Jan 11, 2023
@codecov
Copy link

codecov bot commented Jan 11, 2023

Codecov Report

Merging #568 (8cededf) into main (771e067) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #568   +/-   ##
=======================================
  Coverage   64.06%   64.06%           
=======================================
  Files          37       37           
  Lines        4182     4182           
=======================================
  Hits         2679     2679           
  Misses       1390     1390           
  Partials      113      113           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@dashpole dashpole closed this Jan 11, 2023
@dashpole dashpole reopened this Jan 11, 2023
@dashpole
Copy link
Contributor Author

(cla/google seems to be stuck)

@dashpole dashpole merged commit 9574e2f into GoogleCloudPlatform:main Jan 11, 2023
@dashpole dashpole deleted the fix_test_race branch January 11, 2023 19:04
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.

None yet

2 participants