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

[9.x] Fixes memory leak on TestCase::$latestResponse #44306

Merged
merged 2 commits into from
Sep 26, 2022

Conversation

nunomaduro
Copy link
Member

This pull request addresses one of the memory leaks being mentioned at #44214, by performing a proper cleaning of the $latestResponse on the Laravel's base test case class.

On Vapor's test suite, we heavily perform HTTP testing, and here is the results on 600 tests: 33% less memory used.

Before…
Time: 01:05.160, Memory: 280.50 MB

After…
Time: 01:05.153, Memory: 190.50 MB

@nunomaduro nunomaduro marked this pull request as draft September 26, 2022 17:11
@nunomaduro nunomaduro changed the title [9.x] Fixes memory leak on $latestResponse [9.x] Fixes memory leak on TestCase::$latestResponse Sep 26, 2022
@nunomaduro nunomaduro marked this pull request as ready for review September 26, 2022 17:18
@taylorotwell taylorotwell merged commit 8fefd80 into 9.x Sep 26, 2022
@taylorotwell taylorotwell deleted the fix/memory-leaks-in-test-suite branch September 26, 2022 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants