-
Notifications
You must be signed in to change notification settings - Fork 536
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
feat(merge-tree): explicitly test partial lengths #11453
feat(merge-tree): explicitly test partial lengths #11453
Conversation
24d25a3
to
dbd03d0
Compare
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.
This looks reasonable as a starting point, but I think there are still interesting cases untested:
- overlapping remove (two potentially distinct subcases here--remote client 1 and remote client 2 concurrently remove the same segment, then our local client needs to interpret length of the merge block at various seq_s, and the case where it's a remote client being concurrent with the local client)
- trees that have height more than 2: PartialSequenceLengths.combine has meaningfully different logic when it's merging children leaves vs. when it's merging children that are internal nodes.
I think using code coverage of partialSequenceLengths.ts when only running this test suite is a useful metric to consider here when considering which tests to write.
If you want to work on this iteratively, I'm fine with improving the test suite in a separate PR / working incrementally. Overall state of the PR is fine, I just want to dig a bit deeper :)
⯆ @fluid-example/bundle-size-tests: -231 Bytes
Baseline commit: 0026561 |
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.
Great, glad to have this extra coverage--I have the one minor nit on that edge case, but honestly just putting a comment there mentioning it doesn't work for that case would be ok.
…to feat/partial-length-unit-tests
…to feat/partial-length-unit-tests
…be27342/FluidFramework into feat/partial-length-unit-tests
This commit is queued for merging with the |
Description
More explicitly tests merge-tree
partialLength
logic. Additionally, moves theverify
methods to be free functions.ado 1434