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

SampleBuilder: add memory leak test #2781

Merged
merged 3 commits into from
Aug 7, 2024

Conversation

at-wat
Copy link
Member

@at-wat at-wat commented May 31, 2024

Test that the input RTP packets are unreferenced after all samples are popped.

On v4.0.0-beta.13

=== RUN   TestSampleBuilderPacketUnreference
--- PASS: TestSampleBuilderPacketUnreference (0.05s)

On v4.0.0-beta.14

=== RUN   TestSampleBuilderPacketUnreference
    samplebuilder_test.go:570: 
        	Error Trace:	/home/at-wat/go/src/github.com/pion/webrtc/pkg/media/samplebuilder/samplebuilder_test.go:570
        	Error:      	Not equal: 
        	            	expected: 1
        	            	actual  : 65536
        	Test:       	TestSampleBuilderPacketUnreference
--- FAIL: TestSampleBuilderPacketUnreference (0.08s)

Reference issue

Reproduce the memory leak reported in #2778

Test that the input RTP packets are unreferenced
after all samples are popped.
Copy link

codecov bot commented Aug 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.97%. Comparing base (d9994bd) to head (1528cc6).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2781      +/-   ##
==========================================
+ Coverage   78.88%   78.97%   +0.08%     
==========================================
  Files          89       89              
  Lines        8432     8432              
==========================================
+ Hits         6652     6659       +7     
+ Misses       1294     1290       -4     
+ Partials      486      483       -3     
Flag Coverage Δ
go 80.54% <ø> (+0.09%) ⬆️
wasm 65.11% <ø> (ø)

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.

@at-wat at-wat marked this pull request as ready for review August 7, 2024 03:55
@at-wat at-wat requested a review from edaniels August 7, 2024 03:58
@at-wat at-wat self-assigned this Aug 7, 2024
@edaniels edaniels merged commit c4d56d4 into master Aug 7, 2024
18 checks passed
@edaniels edaniels deleted the add-test-to-check-samplebuilder-input-unref branch August 7, 2024 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants