Skip to content

Commit 51b24c8

Browse files
authored
chore: p2p_client.integraion.test fixes (#15634)
Fixes OOM issues in this test that have started appearing after my PR #15516. The good news is that the issue has been in the tests, not the implementation. What fixed the issues is: ```TS jest.restoreAllMocks(); jest.resetAllMocks(); ``` The tests added in #15516 heavily use mocks and spies, which just pushed the whole thing _over the edge_ because mocks were not cleaned without the code above. Calling `restoreAllMocks` is extremely important if we use spies and/or mocks. I have monitored the heap size, and on my machine now it doesn't grow beyond 700MB, and I was able to run the test with half of what CI uses, i.e., `NODE_OPTIONS="--max-old-space-size=1024" yarn test`
1 parent 0fce757 commit 51b24c8

File tree

1 file changed

+350
-399
lines changed

1 file changed

+350
-399
lines changed

0 commit comments

Comments
 (0)