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: TestCreateCollectorProxy unit test failing on go-tip #6204

Merged

Conversation

Saumya40-codes
Copy link
Contributor

@Saumya40-codes Saumya40-codes commented Nov 12, 2024

Which problem is this PR solving?

Description of the changes

  • After the addition of t.Parallel in cmd/agent/app/builder_test.go in TestCreateCollectorProxy, its test started to fail during random ittterations. This was because in /cmd/agent/app/reporter/connect_metrics.go under NewConnectMetrics function we are doing expvar.NewString("gRPCTarget") which isnt thread-safe and it should not be changed on initialized
  • Now we use sync.Once to tackle the above bug/problem

How was this change tested?

  • running go test -v

Checklist

@Saumya40-codes Saumya40-codes requested a review from a team as a code owner November 12, 2024 17:00
@dosubot dosubot bot added the bug label Nov 12, 2024
@yurishkuro yurishkuro enabled auto-merge (squash) November 12, 2024 17:04
@yurishkuro
Copy link
Member

Thanks!

Copy link

codecov bot commented Nov 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.47%. Comparing base (d43fc84) to head (010164f).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6204      +/-   ##
==========================================
- Coverage   96.49%   96.47%   -0.02%     
==========================================
  Files         354      354              
  Lines       20127    20127              
==========================================
- Hits        19421    19418       -3     
- Misses        522      524       +2     
- Partials      184      185       +1     
Flag Coverage Δ
badger_v1 8.31% <ø> (ø)
badger_v2 1.67% <ø> (ø)
cassandra-4.x-v1 14.39% <ø> (ø)
cassandra-4.x-v2 1.61% <ø> (ø)
cassandra-5.x-v1 14.39% <ø> (ø)
cassandra-5.x-v2 1.61% <ø> (ø)
elasticsearch-6.x-v1 18.59% <ø> (ø)
elasticsearch-7.x-v1 18.68% <ø> (ø)
elasticsearch-8.x-v1 18.85% <ø> (ø)
elasticsearch-8.x-v2 1.67% <ø> (+0.01%) ⬆️
grpc_v1 9.47% <ø> (-0.01%) ⬇️
grpc_v2 6.99% <ø> (-0.01%) ⬇️
kafka-v1 8.88% <ø> (ø)
kafka-v2 1.67% <ø> (ø)
memory_v2 1.67% <ø> (ø)
opensearch-1.x-v1 18.73% <ø> (ø)
opensearch-2.x-v1 18.73% <ø> (ø)
opensearch-2.x-v2 1.67% <ø> (ø)
tailsampling-processor 0.46% <ø> (ø)
unittests 95.38% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yurishkuro yurishkuro merged commit 6e695b3 into jaegertracing:main Nov 12, 2024
51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unit tests fail on go-tip
2 participants