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 false positive goleak test #5315

Merged
merged 2 commits into from
Mar 31, 2024

Conversation

yurishkuro
Copy link
Member

@yurishkuro yurishkuro commented Mar 31, 2024

Which problem is this PR solving?

  • The testutils package itself was being flagged as missing goleak check. The check was there, but without the package name, and the lint script was flagging it as false positive.
  • Similar issue in pkg/cassandra/gocql/testutils
  • Part of Enable and enforce goroutine leak checks in tests #5006

Description of the changes

  1. Change package name of the test file so that the functions can be called with the usual package package name testutils.
  2. change competing testutils import labels to satisfy the linter

How was this change tested?

  • make goleak no longer shows this package

Signed-off-by: Yuri Shkuro <github@ysh.us>
@yurishkuro yurishkuro added the changelog:test Change that's adding missing tests or correcting existing tests label Mar 31, 2024
@yurishkuro yurishkuro requested a review from a team as a code owner March 31, 2024 22:09
@yurishkuro yurishkuro requested a review from jkowall March 31, 2024 22:09
Signed-off-by: Yuri Shkuro <github@ysh.us>
@yurishkuro yurishkuro enabled auto-merge (squash) March 31, 2024 22:17
Copy link

codecov bot commented Mar 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 41.00%. Comparing base (34f6a25) to head (ae0ac0f).

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #5315       +/-   ##
===========================================
- Coverage   95.15%   41.00%   -54.16%     
===========================================
  Files         340      212      -128     
  Lines       16666    10985     -5681     
===========================================
- Hits        15858     4504    -11354     
- Misses        617     6077     +5460     
- Partials      191      404      +213     
Flag Coverage Δ
badger 12.25% <ø> (ø)
cassandra-3.x 21.14% <ø> (ø)
cassandra-4.x 21.14% <ø> (ø)
elasticsearch-5.x 17.70% <ø> (ø)
elasticsearch-6.x 17.70% <ø> (+0.01%) ⬆️
elasticsearch-7.x 17.75% <ø> (-0.02%) ⬇️
elasticsearch-8.x 17.82% <ø> (-0.02%) ⬇️
grpc 11.60% <ø> (+0.08%) ⬆️
kafka 11.84% <ø> (ø)
opensearch-1.x 17.76% <ø> (+0.01%) ⬆️
opensearch-2.x 17.75% <ø> (-0.02%) ⬇️
unittests ?

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 disabled auto-merge March 31, 2024 22:37
@yurishkuro yurishkuro merged commit 727bf18 into jaegertracing:main Mar 31, 2024
36 of 37 checks passed
@yurishkuro yurishkuro deleted the fix-goleak-test branch March 31, 2024 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:test Change that's adding missing tests or correcting existing tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants