Skip to content

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

Merged
taylorotwell merged 2 commits into
9.xfrom
fix/memory-leaks-in-test-suite
Sep 26, 2022
Merged

[9.x] Fixes memory leak on TestCase::$latestResponse#44306
taylorotwell merged 2 commits into
9.xfrom
fix/memory-leaks-in-test-suite

Conversation

@nunomaduro

Copy link
Copy Markdown
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