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

Add go leak check to Cassandra and Kafka e2e tests #6336

Merged
merged 10 commits into from
Dec 11, 2024

Conversation

Manik2708
Copy link
Contributor

@Manik2708 Manik2708 commented Dec 10, 2024

Which problem is this PR solving?

Fixes a part of #5006

Description of the changes

  1. Cassandra factory is closed in the test manually after the test, not doing so will fail the leak test probably due to CleanUp function is not closing factory properly and returning in the test leading to end it that further fails the leak test.
  2. Kafka Producer and Consumer was not closed before leading to failure of leak test which is fixed in this PR.

How was this change tested?

  • By running integartion tests manually

Checklist

pkg/testutils/leakcheck.go Outdated Show resolved Hide resolved
plugin/storage/integration/cassandra_test.go Outdated Show resolved Hide resolved
plugin/storage/integration/kafka_test.go Outdated Show resolved Hide resolved
Manik2708 and others added 3 commits December 10, 2024 23:24
Co-authored-by: Yuri Shkuro <[email protected]>
Signed-off-by: Manik Mehta <[email protected]>
@Manik2708 Manik2708 requested a review from yurishkuro December 10, 2024 19:09
@Manik2708 Manik2708 requested a review from yurishkuro December 11, 2024 04:46
@Manik2708 Manik2708 requested a review from yurishkuro December 11, 2024 05:18
@yurishkuro yurishkuro added the changelog:test Change that's adding missing tests or correcting existing tests label Dec 11, 2024
@Manik2708
Copy link
Contributor Author

I think I missed some of the test cases! Let me check and will be back to you!

Signed-off-by: Manik2708 <[email protected]>
@Manik2708
Copy link
Contributor Author

There was a minor problem, go-leak was called before skipping test function causing problems! Please review @yurishkuro

Copy link

codecov bot commented Dec 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.17%. Comparing base (8f612a8) to head (ea1b765).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6336      +/-   ##
==========================================
+ Coverage   96.15%   96.17%   +0.01%     
==========================================
  Files         357      357              
  Lines       20551    20553       +2     
==========================================
+ Hits        19761    19766       +5     
+ Misses        603      601       -2     
+ Partials      187      186       -1     
Flag Coverage Δ
badger_v1 8.77% <0.00%> (-0.01%) ⬇️
badger_v2 1.60% <0.00%> (-0.01%) ⬇️
cassandra-4.x-v1-manual 14.74% <100.00%> (+0.07%) ⬆️
cassandra-4.x-v2-auto 1.55% <0.00%> (-0.01%) ⬇️
cassandra-4.x-v2-manual 1.55% <0.00%> (-0.01%) ⬇️
cassandra-5.x-v1-manual 14.74% <100.00%> (+0.07%) ⬆️
cassandra-5.x-v2-auto 1.55% <0.00%> (-0.01%) ⬇️
cassandra-5.x-v2-manual 1.55% <0.00%> (-0.01%) ⬇️
elasticsearch-6.x-v1 18.37% <0.00%> (+<0.01%) ⬆️
elasticsearch-7.x-v1 18.44% <0.00%> (-0.02%) ⬇️
elasticsearch-8.x-v1 18.60% <0.00%> (-0.02%) ⬇️
elasticsearch-8.x-v2 1.60% <0.00%> (-0.01%) ⬇️
grpc_v1 10.24% <0.00%> (-0.02%) ⬇️
grpc_v2 7.79% <0.00%> (-0.02%) ⬇️
kafka-v1 9.16% <100.00%> (+0.70%) ⬆️
kafka-v2 1.60% <0.00%> (-0.01%) ⬇️
memory_v2 1.60% <0.00%> (-0.01%) ⬇️
opensearch-1.x-v1 18.49% <0.00%> (-0.01%) ⬇️
opensearch-2.x-v1 18.49% <0.00%> (+<0.01%) ⬆️
opensearch-2.x-v2 1.60% <0.00%> (-0.01%) ⬇️
tailsampling-processor 0.45% <0.00%> (-0.01%) ⬇️
unittests 95.08% <100.00%> (+0.01%) ⬆️

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.

Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks

@yurishkuro yurishkuro changed the title cassandra and kafka leak fix Add go leak check to Cassandra and Kafka e2e tests Dec 11, 2024
@yurishkuro yurishkuro merged commit 53a8053 into jaegertracing:main Dec 11, 2024
54 checks passed
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 storage/cassandra storage/kafka
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants