-
Notifications
You must be signed in to change notification settings - Fork 734
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
Adds a memory leak check after running a unit test #1798
base: unstable
Are you sure you want to change the base?
Adds a memory leak check after running a unit test #1798
Conversation
This commit adds check after each test function execution of a unit test, that checks if there is still memory allocated. This check prevents situations where tests, which do these kind of checks, fail due to memory leaks caused by previous tests. Signed-off-by: Ricardo Dias <[email protected]>
Signed-off-by: Ricardo Dias <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## unstable #1798 +/- ##
============================================
+ Coverage 70.97% 70.99% +0.02%
============================================
Files 123 123
Lines 65645 65648 +3
============================================
+ Hits 46590 46607 +17
+ Misses 19055 19041 -14 |
Seems to be a lot of memory leaks though :/ |
Hm... Are the test cases not independent? If not, then maybe we should just detect leaks between each suite...? |
Yeah, it looks like the listpack tests are cumulative, which is interesting. We should probably make each one self contained, so we can run it without the others. |
There's currently no way to run a single test case though. It'd be more work to refactor these tests so I suggest we just check mem leaks per suite. It's much easier. |
I'm okay with that for now. |
This commit adds check after each test function execution of a unit test, that checks if there is still memory allocated.
This check prevents situations where tests, which do these kind of checks, fail due to memory leaks caused by previous tests.