Codeception / Codeception/module-yii2
High memory usage growing with each consecutive test
- Dominant language
- PHP
- Stars
- 19
- Forks
- 43
- PR merge metrics
- No merged PRs in 30d
Description
Steps to reproduce:
1. Install basic yii2 template
2. Add tests https://github.com/arrilot/yii2-codeception-memory-leak-demo/pull/1/files
3. run `vendor/bin/codecept run tests/unit/leak/A500Test.php`
```
Time: 00:02.015, Memory: 156.00 MB
OK (500 tests, 500 assertions)
```
4. run `vendor/bin/codecept run tests/unit/leak/A1000Test.php`
```
Time: 00:06.381, Memory: 300.00 MB
OK (1000 tests, 1000 assertions)
```
1000 tests consumed twice as much memory as 500 tests.
Module is not freeing 300kb of memory after each iteration of one test
5. run both test files - `vendor/bin/codecept run tests/unit/leak/`
```
Time: 00:12.377, Memory: 446.00 MB
OK (1500 tests, 1500 assertions)
```
Module is not freeing 300kb of memory after each test even after all tests in a file were finished
6. comment Yii2 module out in `unit.suite.yml`
```
Time: 00:00.349, Memory: 20.00 MB
OK (1500 tests, 1500 assertions)
```
Memory usage is 20 smaller
[phpinfo.txt](https://github.com/Codeception/module-yii2/files/10335581/phpinfo.txt)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.