-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
♻️ [RUMF-1533] extract the Flush logic into a reusable component #2144
Conversation
|
||
expect(sendSpy).toHaveBeenCalled() | ||
flushController.willAddMessage.calls.reset() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ question: Why do you need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to call reset
to reset the number of calls after the test setup, so I can use expect().toHaveBeenCalledOnceWith(...)
(only the last call is relevent to this test case)
Motivation
The flush logic will become a bit more complex in the short term. Let's extract the flush logic from
Batch
to separate concerns. In a future PR, the newly introduced flush controller will also be used for flushing segments.Changes
Testing
I have gone over the contributing documentation.