mor
This commit is contained in:
parent
ff1f474324
commit
e151208e15
3 changed files with 2933 additions and 784 deletions
59
frontend/test-client/corpus/conflict-copy.json
Normal file
59
frontend/test-client/corpus/conflict-copy.json
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
{
|
||||
"version": 2,
|
||||
"seed": 1,
|
||||
"iterations": 3,
|
||||
"clients": 3,
|
||||
"steps": [],
|
||||
"program": {
|
||||
"clients": 3,
|
||||
"cacheBytes": 0,
|
||||
"initial": [
|
||||
{
|
||||
"type": "create",
|
||||
"key": "sentinel",
|
||||
"path": "untouched.bin",
|
||||
"content": [0, 255, 254, 128, 13, 10]
|
||||
}
|
||||
],
|
||||
"epochs": [
|
||||
{
|
||||
"writer": 0,
|
||||
"actions": [
|
||||
{
|
||||
"type": "pair",
|
||||
"key": "first",
|
||||
"other": "conflict",
|
||||
"peer": 1,
|
||||
"path": "café/note.md",
|
||||
"content": "\ufefffirst\r\n",
|
||||
"peerContent": "日本語 🦊\n"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"writer": 2,
|
||||
"actions": [
|
||||
{
|
||||
"type": "write",
|
||||
"key": "conflict",
|
||||
"content": [0, 255, 1]
|
||||
},
|
||||
{ "type": "rename", "key": "conflict", "path": "moved.bin" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"writer": 1,
|
||||
"actions": [
|
||||
{ "type": "delete", "key": "conflict" },
|
||||
{
|
||||
"type": "create",
|
||||
"key": "new",
|
||||
"path": "moved.bin",
|
||||
"content": "new text\n"
|
||||
},
|
||||
{ "type": "write", "key": "first", "content": "" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
53
frontend/test-client/corpus/stale-rename.json
Normal file
53
frontend/test-client/corpus/stale-rename.json
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
"version": 2,
|
||||
"seed": 2,
|
||||
"iterations": 1,
|
||||
"clients": 3,
|
||||
"program": {
|
||||
"clients": 3,
|
||||
"cacheBytes": 1024,
|
||||
"initial": [
|
||||
{
|
||||
"type": "create",
|
||||
"key": "note",
|
||||
"path": "note.md",
|
||||
"content": "header\n\nfirst\n\nsecond\n\nfooter\n"
|
||||
}
|
||||
],
|
||||
"epochs": [
|
||||
{
|
||||
"writer": 0,
|
||||
"actions": [
|
||||
{
|
||||
"type": "concurrent",
|
||||
"key": "note",
|
||||
"writes": [
|
||||
{
|
||||
"client": 0,
|
||||
"content": "header\n\nLOCAL\n\nsecond\n\nfooter\n"
|
||||
},
|
||||
{
|
||||
"client": 1,
|
||||
"content": "header\n\nfirst\n\nREMOTE\n\nfooter\n"
|
||||
}
|
||||
],
|
||||
"expected": ["header\n\nLOCAL\n\nREMOTE\n\nfooter\n"]
|
||||
}
|
||||
],
|
||||
"hold": {
|
||||
"kind": "content",
|
||||
"point": "before"
|
||||
},
|
||||
"contender": 1,
|
||||
"tail": [
|
||||
{
|
||||
"type": "rename",
|
||||
"key": "note",
|
||||
"path": "renamed.md"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"steps": []
|
||||
}
|
||||
73
frontend/test-client/corpus/uncertain-edits.json
Normal file
73
frontend/test-client/corpus/uncertain-edits.json
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
{
|
||||
"version": 2,
|
||||
"seed": 0,
|
||||
"iterations": 3,
|
||||
"clients": 3,
|
||||
"steps": [],
|
||||
"program": {
|
||||
"clients": 3,
|
||||
"cacheBytes": 1024,
|
||||
"initial": [
|
||||
{
|
||||
"type": "create",
|
||||
"key": "note",
|
||||
"path": "note.md",
|
||||
"content": "BASE\n"
|
||||
}
|
||||
],
|
||||
"epochs": [
|
||||
{
|
||||
"writer": 0,
|
||||
"actions": [
|
||||
{
|
||||
"type": "write",
|
||||
"key": "note",
|
||||
"content": "BASE\nEDIT\n"
|
||||
}
|
||||
],
|
||||
"hold": { "kind": "content", "point": "before" },
|
||||
"drop": { "kind": "content", "point": "after" },
|
||||
"tail": [
|
||||
{ "type": "rename", "key": "note", "path": "renamed.md" },
|
||||
{
|
||||
"type": "write",
|
||||
"key": "note",
|
||||
"content": "BASE\nEDIT\nLATER\n"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"writer": 1,
|
||||
"actions": [
|
||||
{ "type": "delete", "key": "note" },
|
||||
{
|
||||
"type": "create",
|
||||
"key": "replacement",
|
||||
"path": "renamed.md",
|
||||
"content": "NEW GENERATION\n"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"writer": 2,
|
||||
"actions": [
|
||||
{
|
||||
"type": "create",
|
||||
"key": "crash",
|
||||
"path": "crash.md",
|
||||
"content": "ACCEPTED\n"
|
||||
}
|
||||
],
|
||||
"crash": { "stopAt": "create" },
|
||||
"serverCrash": true,
|
||||
"tail": [
|
||||
{
|
||||
"type": "write",
|
||||
"key": "crash",
|
||||
"content": "ACCEPTED\nEDIT AFTER KILL\n"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue