MockFluidDataStoreRuntime dispose triggers dispose event#27276
MockFluidDataStoreRuntime dispose triggers dispose event#27276CraigMacomber wants to merge 3 commits into
Conversation
|
Hi! Thank you for opening this PR. Want me to review it? Based on the diff (6 lines, 1 files), I've queued these reviewers:
How this works
|
There was a problem hiding this comment.
Pull request overview
This PR aims to bring MockFluidDataStoreRuntime’s disposal behavior closer to the real IFluidDataStoreRuntime by ensuring a dispose-related event is fired when dispose() is called, enabling test code to clean up event subscriptions.
Changes:
- Emit an event from
MockFluidDataStoreRuntime.dispose()when the mock runtime is disposed.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Description
MockFluidDataStoreRuntime dispose triggers dispose event.
This makes it work more like the real version, and may help cleanup resources (or test resource cleanup) in some cases.
I noticed this was missing since node was emitting warnings about memory leaks due to large numbers of subscriptions to this event, and when looking at the code it was never getting triggered.
This makes it possible to trigger the dispose event, however it does not fix the memory leaks in tests causing large numbers of subscriptions to this.
Reviewer Guidance
The review process is outlined on this wiki page.