Skip to content
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

test(core): add test for doc removed during stream directly after edit #59

Open
mesqueeb opened this issue Dec 14, 2021 · 0 comments
Open

Comments

@mesqueeb
Copy link
Member

mesqueeb commented Dec 14, 2021

write a test that tests this part:

https://github.com/cycraft/magnetar/blob/9d7eb1efb2fb350e9cfa899adf7be8f4ff6ed3fd/packages/core/src/moduleActions/handleStreamPerStore.ts#L112-L118

steps:

  1. open stream for a doc
  2. edit a doc locally (core goes into 5 sec writeLock)
  3. that doc is deleted from the server side during these 5 seconds
  4. the doc gets and stays deleted from local module data after the 5 seconds

potential bug without the highlighted lines (hypothesis):

  • it will delete the doc locally during the 5 seconds and is then brought back to life after the 5 seconds write lock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant