Skip to content

Commit

Permalink
Fix tests temporarily by temporarily removing memory limit
Browse files Browse the repository at this point in the history
According to laravel/framework#30736, there is
a confirmed memory leak in php (https://bugs.php.net/bug.php?id=76982)
that causes memory usage in PHPUnit tests to go up steadily. Everyone is
waiting for PHP to fix this, but in the meantime, we can still run our
tests by removing the PHP memory limit. Sooner or later, when adding
more tests, we might run into the container's memory limits though...
Hopefully the PHP bug will be fixed by then.
  • Loading branch information
carlobeltrame committed Oct 1, 2020
1 parent 40bb195 commit 4ced84f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/TestCase.php
Expand Up @@ -25,6 +25,7 @@ abstract class TestCase extends BaseTestCase {

public function setUp(): void {
Dotenv::createImmutable(__DIR__.'/../', '.env.testing')->load();
ini_set('memory_limit', '-1');

parent::setUp();

Expand Down

0 comments on commit 4ced84f

Please sign in to comment.