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

More EditManager testing #11680

Merged

Conversation

yann-achard-MS
Copy link
Contributor

@yann-achard-MS yann-achard-MS commented Aug 25, 2022

More thorough testing of EditManager:

  • Checking the deltas returned by EditManager when calling addLocalChange and addSequencedChange.
  • Checking anchors are getting rebased over the correct intentions

Other changes:

  • Refactored the TestChangeRebaser code to make it less stateful

@github-actions github-actions bot added area: dds Issues related to distributed data structures base: main PRs targeted against main branch labels Aug 25, 2022
@yann-achard-MS yann-achard-MS marked this pull request as ready for review August 25, 2022 19:05
@yann-achard-MS yann-achard-MS requested a review from a team as a code owner August 25, 2022 19:05
Comment on lines +689 to +691
const localIntentions = ([] as number[]).concat(
...client.localChanges.map((c) => c.change.intentions),
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like in ES2019 there is a flatMap method on Array. Would be nice if we put something like that in a util file.

yann-achard-MS and others added 3 commits August 25, 2022 16:57
Co-authored-by: alex-pardes <105307164+alex-pardes@users.noreply.github.com>
@yann-achard-MS yann-achard-MS merged commit 2004bac into microsoft:main Aug 29, 2022
@github-actions
Copy link
Contributor

This commit is queued for merging with the next branch! Please ignore this PR for now. Contact @microsoft/fluid-cr-infra for help.

WayneFerrao pushed a commit to WayneFerrao/FluidFramework that referenced this pull request Aug 31, 2022
* Verify returned deltas

* Tweaks

* Check anchor intentions

* Move anchor state out of TestChangeRebaser

* Apply suggestions from code review

Co-authored-by: alex-pardes <105307164+alex-pardes@users.noreply.github.com>

* Comment on asDelta

* Remove dependence on EditManager for test input

Co-authored-by: alex-pardes <105307164+alex-pardes@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: dds Issues related to distributed data structures base: main PRs targeted against main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants