-
Notifications
You must be signed in to change notification settings - Fork 98
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
Complement concurrent editing test cases in Tree #721
Complement concurrent editing test cases in Tree #721
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #721 +/- ##
=======================================
Coverage 82.03% 82.03%
=======================================
Files 57 57
Lines 4231 4231
Branches 828 828
=======================================
Hits 3471 3471
Misses 502 502
Partials 258 258 ☔ View full report in Codecov by Sentry. |
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.
Thanks for your contribution.
I have a question.
If I run $ npm run test integration/tree_test.ts
, I can see the results as below.
✓ test/integration/tree_test.ts (99) 1888ms
✓ Tree (11)
✓ Can be created
✓ Can be created from JSON
✓ Can be created from JSON with attrebutes
✓ Can edit its content
✓ Can be subscribed by handler
✓ Can be subscribed by handler(path)
✓ Can edit its content with path
✓ Can edit its content with path 2
✓ Can sync its content with other clients
✓ Should return correct range from index
✓ Should return correct range from path
✓ Tree.edit (9)
✓ Can insert multiple text nodes
✓ Can insert multiple element nodes
✓ Can edit its content with path when multi tree nodes passed
✓ Should detect error for empty text
✓ Should detect error for mixed type insertion
✓ Should detect correct error order [1]
✓ Should detect correct error order [2]
✓ Should detect correct error order [3]
✓ Can delete nodes in a multi-level range
✓ Tree.style (5)
✓ Can be inserted with attributes
✓ Can be edited with index
✓ Can be edited with path
✓ Can sync its content containing attributes with other replicas
✓ Can style node with element attributes test
✓ Tree.edit(concurrent overlapping range) (5)
✓ Can concurrently delete overlapping elements
✓ Can concurrently delete overlapping text
✓ overlapping-merge-and-merge
↓ overlapping-merge-and-delete-element-node [skipped]
↓ overlapping-merge-and-delete-text-nodes [skipped]
✓ Tree.edit(concurrent, contained range) (24) 522ms
✓ Can concurrently insert and delete contained elements of the same depth
✓ Can concurrently multiple insert and delete contained elements of the same depth
✓ Detecting error when inserting and deleting contained elements at different depths
✓ Can concurrently delete contained elements
✓ Can concurrently insert and delete contained text
✓ Can concurrently delete contained text
✓ Can concurrently insert and delete contained text and elements
✓ Can concurrently delete contained text and elements
✓ contained-split-and-split-at-the-same-position
✓ contained-split-and-split-at-diffrent-positions-on-the-same-node
↓ contained-split-and-split-at-different-levels [skipped]
✓ contained-split-and-insert-into-the-split-position
✓ contained-split-and-insert-into-original-node
✓ contained-split-and-insert-into-split-node
✓ contained-split-and-delete-contents-in-split-node
↓ contained-split-and-delete-the-whole-original-and-split-nodes [skipped]
✓ contained-merge-and-merge-at-different-levels
↓ contained-merge-and-merge-at-the-same-level [skipped]
↓ contained-merge-and-insert [skipped]
✓ contained-merge-and-delete-the-whole
↓ contained-merge-and-delete-contents-in-merged-node [skipped]
✓ contained-merge-and-delete-sub-range-in-merged-range
✓ contained-merge-and-split-merged-node
✓ contained-merge-and-split-at-multi-levels
✓ Tree.edit(concurrent, side by side range) (22) 575ms
✓ Can concurrently insert side by side elements (left)
✓ Can concurrently insert side by side elements (middle)
✓ Can concurrently insert side by side elements (right)
✓ Can concurrently insert and delete side by side elements
✓ Can concurrently delete and insert side by side elements
✓ Can concurrently delete side by side elements
✓ Can insert text to the same position(left) concurrently
✓ Can insert text to the same position(middle) concurrently
✓ Can insert text content to the same position(right) concurrently
✓ Can concurrently insert and delete side by side text
✓ Can concurrently delete and insert side by side text
✓ Can concurrently delete side by side text blocks
✓ Can delete text content at the same position(left) concurrently
✓ Can delete text content at the same position(middle) concurrently
✓ Can delete text content at the same position(right) concurrently
✓ side-by-side-split-and-split
↓ side-by-side-split-and-insert [skipped]
↓ side-by-side-split-and-delete [skipped]
✓ side-by-side-merge-and-merge
✓ side-by-side-merge-and-insert
✓ side-by-side-merge-and-delete
✓ side-by-side-merge-and-split
✓ Tree.edit(concurrent, complex cases) (11) 312ms
✓ Can delete text content anchored to another concurrently
✓ Can produce complete deletion concurrently
✓ Can handle block delete concurrently
✓ Can handle insert within block delete concurrently
✓ Can handle insert within block delete concurrently [2]
✓ Can handle block element insertion within delete [2]
✓ Can handle concurrent element insert/ deletion (left)
✓ Can handle concurrent element insert/ deletion (right)
✓ Can handle deletion of insertion anchor concurrently
✓ Can handle deletion after insertion concurrently
✓ Can handle deletion before insertion concurrently
✓ Tree(edge cases) (8)
✓ Can delete very first text when there is tombstone in front of target text
✓ Can delete node when there is more than one text node in front which has size bigger than 1
✓ Can split link can transmitted through rpc
✓ Can calculate size of index tree correctly
✓ Can split and merge with empty paragraph: left
✓ Can split and merge with empty paragraph: right
✓ Can split and merge with empty paragraph and multiple split level: left
✓ Can split at the same offset multiple times
✓ TreeChange (4)
✓ Concurrent delete and delete
✓ Concurrent delete and insert
✓ Concurrent delete and insert when parent removed
✓ Concurrent delete with contents and insert
How about organizing the testing convention this time? I'm also curious why there are so few tests for Tree.edit(concurrent overlapping range)
.
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.
Thanks for your contribution.
What this PR does / why we need it?
This PR complements concurrent editing test cases in Tree, following #710.
It adds two more skipped tests which need to be resolved later.
Any background context you want to provide?
What are the relevant tickets?
Fixes #
Checklist