Skip to content

Angular TestBed memory leak #24048

@GoGoris

Description

@GoGoris

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[x] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:

Current behavior

When running Angular tests with Jest, the javascript heap keeps growing with each test untill the tests finish or an out of memory exception is thrown. The growing heap seems to be caused by the Angular TestBed, is it possible that this is the cause for the growing heapsize?

Expected behavior

The javascript heap size stays more or less constant for the whole test suite.
No out of memory exceptions are thrown.

Minimal reproduction of the problem with instructions

See the following bug report: jestjs/jest#6147

Environment


Angular version: 6.0.1


Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
- Node version: 8.11.1  
- Platform: Windows 

Others:

Jest 22.4.4 & 23.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: testingIssues related to Angular testing features, such as TestBedfreq2: mediummemory leakIssue related to a memory leaktype: bug/fix

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions