mirror of
https://github.com/firebase/firebase-ios-sdk
synced 2026-11-11 22:55:59 +05:45
+12
![github-actions[bot]](/assets/img/avatar_default.png)







1feabe5605
Co-authored-by: wu-hui <53845758+wu-hui@users.noreply.github.com> Co-authored-by: wu-hui <wu.hui.github@gmail.com> Co-authored-by: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Co-authored-by: Andrew Heard <andrewheard@google.com> Co-authored-by: pcfba <111909874+pcfba@users.noreply.github.com> Co-authored-by: Morgan Chen <morganchen12@gmail.com> Co-authored-by: leojaygoogle <98397998+leojaygoogle@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Anka <runner@Mac-1748340061346.local> Co-authored-by: Paul Beusterien <paulbeusterien@google.com> Co-authored-by: dmaclach <dmaclach@gmail.com> Co-authored-by: Yakov Manshin <git@yakovmanshin.com> Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Seyed Mojtaba Hosseini Zeidabadi <chenzook+github@gmail.com> Co-authored-by: SeanChinJunKai <82928860+SeanChinJunKai@users.noreply.github.com> Co-authored-by: htcgh <htcgh@users.noreply.github.com> Co-authored-by: Haibo Yang <haibo942us@gmail.com> Co-authored-by: Anka <runner@Mac-1750759009403.local> Co-authored-by: Tushar Khandelwal <64364243+tusharkhandelwal8@users.noreply.github.com> Co-authored-by: themiswang <themisw@google.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1940 lines
43 KiB
JSON
1940 lines
43 KiB
JSON
{
|
|
"Collection Group query": {
|
|
"describeName": "Queries:",
|
|
"itName": "Collection Group query",
|
|
"tags": [
|
|
],
|
|
"config": {
|
|
"numClients": 1,
|
|
"useEagerGCForMemory": true
|
|
},
|
|
"steps": [
|
|
{
|
|
"userListen": {
|
|
"query": {
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "cg/1"
|
|
},
|
|
"targetId": 2
|
|
},
|
|
"expectedState": {
|
|
"activeTargets": {
|
|
"2": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "cg/1"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"watchAck": [
|
|
2
|
|
]
|
|
},
|
|
{
|
|
"watchEntity": {
|
|
"docs": [
|
|
{
|
|
"createTime": 0,
|
|
"key": "cg/1",
|
|
"options": {
|
|
"hasCommittedMutations": false,
|
|
"hasLocalMutations": false
|
|
},
|
|
"value": {
|
|
"val": 1
|
|
},
|
|
"version": 1000
|
|
}
|
|
],
|
|
"targets": [
|
|
2
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"watchCurrent": [
|
|
[
|
|
2
|
|
],
|
|
"resume-token-1000"
|
|
]
|
|
},
|
|
{
|
|
"watchSnapshot": {
|
|
"targetIds": [
|
|
],
|
|
"version": 1000
|
|
},
|
|
"expectedSnapshotEvents": [
|
|
{
|
|
"added": [
|
|
{
|
|
"createTime": 0,
|
|
"key": "cg/1",
|
|
"options": {
|
|
"hasCommittedMutations": false,
|
|
"hasLocalMutations": false
|
|
},
|
|
"value": {
|
|
"val": 1
|
|
},
|
|
"version": 1000
|
|
}
|
|
],
|
|
"errorCode": 0,
|
|
"fromCache": false,
|
|
"hasPendingWrites": false,
|
|
"query": {
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "cg/1"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"userListen": {
|
|
"query": {
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "cg/2"
|
|
},
|
|
"targetId": 4
|
|
},
|
|
"expectedState": {
|
|
"activeTargets": {
|
|
"2": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "cg/1"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
},
|
|
"4": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "cg/2"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"watchAck": [
|
|
4
|
|
]
|
|
},
|
|
{
|
|
"watchEntity": {
|
|
"docs": [
|
|
{
|
|
"createTime": 0,
|
|
"key": "cg/2",
|
|
"options": {
|
|
"hasCommittedMutations": false,
|
|
"hasLocalMutations": false
|
|
},
|
|
"value": {
|
|
"val": 2
|
|
},
|
|
"version": 1000
|
|
}
|
|
],
|
|
"targets": [
|
|
4
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"watchCurrent": [
|
|
[
|
|
4
|
|
],
|
|
"resume-token-1000"
|
|
]
|
|
},
|
|
{
|
|
"watchSnapshot": {
|
|
"targetIds": [
|
|
],
|
|
"version": 1000
|
|
},
|
|
"expectedSnapshotEvents": [
|
|
{
|
|
"added": [
|
|
{
|
|
"createTime": 0,
|
|
"key": "cg/2",
|
|
"options": {
|
|
"hasCommittedMutations": false,
|
|
"hasLocalMutations": false
|
|
},
|
|
"value": {
|
|
"val": 2
|
|
},
|
|
"version": 1000
|
|
}
|
|
],
|
|
"errorCode": 0,
|
|
"fromCache": false,
|
|
"hasPendingWrites": false,
|
|
"query": {
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "cg/2"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"userListen": {
|
|
"query": {
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "not-cg/nope/cg/3"
|
|
},
|
|
"targetId": 6
|
|
},
|
|
"expectedState": {
|
|
"activeTargets": {
|
|
"2": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "cg/1"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
},
|
|
"4": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "cg/2"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
},
|
|
"6": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "not-cg/nope/cg/3"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"watchAck": [
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"watchEntity": {
|
|
"docs": [
|
|
{
|
|
"createTime": 0,
|
|
"key": "not-cg/nope/cg/3",
|
|
"options": {
|
|
"hasCommittedMutations": false,
|
|
"hasLocalMutations": false
|
|
},
|
|
"value": {
|
|
"val": 1
|
|
},
|
|
"version": 1000
|
|
}
|
|
],
|
|
"targets": [
|
|
6
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"watchCurrent": [
|
|
[
|
|
6
|
|
],
|
|
"resume-token-1000"
|
|
]
|
|
},
|
|
{
|
|
"watchSnapshot": {
|
|
"targetIds": [
|
|
],
|
|
"version": 1000
|
|
},
|
|
"expectedSnapshotEvents": [
|
|
{
|
|
"added": [
|
|
{
|
|
"createTime": 0,
|
|
"key": "not-cg/nope/cg/3",
|
|
"options": {
|
|
"hasCommittedMutations": false,
|
|
"hasLocalMutations": false
|
|
},
|
|
"value": {
|
|
"val": 1
|
|
},
|
|
"version": 1000
|
|
}
|
|
],
|
|
"errorCode": 0,
|
|
"fromCache": false,
|
|
"hasPendingWrites": false,
|
|
"query": {
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "not-cg/nope/cg/3"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"userListen": {
|
|
"query": {
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "not-cg/nope"
|
|
},
|
|
"targetId": 8
|
|
},
|
|
"expectedState": {
|
|
"activeTargets": {
|
|
"2": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "cg/1"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
},
|
|
"4": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "cg/2"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
},
|
|
"6": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "not-cg/nope/cg/3"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
},
|
|
"8": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "not-cg/nope"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"watchAck": [
|
|
8
|
|
]
|
|
},
|
|
{
|
|
"watchEntity": {
|
|
"docs": [
|
|
{
|
|
"createTime": 0,
|
|
"key": "not-cg/nope",
|
|
"options": {
|
|
"hasCommittedMutations": false,
|
|
"hasLocalMutations": false
|
|
},
|
|
"value": {
|
|
"val": 1
|
|
},
|
|
"version": 1000
|
|
}
|
|
],
|
|
"targets": [
|
|
8
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"watchCurrent": [
|
|
[
|
|
8
|
|
],
|
|
"resume-token-1000"
|
|
]
|
|
},
|
|
{
|
|
"watchSnapshot": {
|
|
"targetIds": [
|
|
],
|
|
"version": 1000
|
|
},
|
|
"expectedSnapshotEvents": [
|
|
{
|
|
"added": [
|
|
{
|
|
"createTime": 0,
|
|
"key": "not-cg/nope",
|
|
"options": {
|
|
"hasCommittedMutations": false,
|
|
"hasLocalMutations": false
|
|
},
|
|
"value": {
|
|
"val": 1
|
|
},
|
|
"version": 1000
|
|
}
|
|
],
|
|
"errorCode": 0,
|
|
"fromCache": false,
|
|
"hasPendingWrites": false,
|
|
"query": {
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "not-cg/nope"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"userListen": {
|
|
"query": {
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "cg/1/not-cg/nope"
|
|
},
|
|
"targetId": 10
|
|
},
|
|
"expectedState": {
|
|
"activeTargets": {
|
|
"10": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "cg/1/not-cg/nope"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
},
|
|
"2": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "cg/1"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
},
|
|
"4": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "cg/2"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
},
|
|
"6": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "not-cg/nope/cg/3"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
},
|
|
"8": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "not-cg/nope"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"watchAck": [
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"watchEntity": {
|
|
"docs": [
|
|
{
|
|
"createTime": 0,
|
|
"key": "cg/1/not-cg/nope",
|
|
"options": {
|
|
"hasCommittedMutations": false,
|
|
"hasLocalMutations": false
|
|
},
|
|
"value": {
|
|
"val": 1
|
|
},
|
|
"version": 1000
|
|
}
|
|
],
|
|
"targets": [
|
|
10
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"watchCurrent": [
|
|
[
|
|
10
|
|
],
|
|
"resume-token-1000"
|
|
]
|
|
},
|
|
{
|
|
"watchSnapshot": {
|
|
"targetIds": [
|
|
],
|
|
"version": 1000
|
|
},
|
|
"expectedSnapshotEvents": [
|
|
{
|
|
"added": [
|
|
{
|
|
"createTime": 0,
|
|
"key": "cg/1/not-cg/nope",
|
|
"options": {
|
|
"hasCommittedMutations": false,
|
|
"hasLocalMutations": false
|
|
},
|
|
"value": {
|
|
"val": 1
|
|
},
|
|
"version": 1000
|
|
}
|
|
],
|
|
"errorCode": 0,
|
|
"fromCache": false,
|
|
"hasPendingWrites": false,
|
|
"query": {
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "cg/1/not-cg/nope"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"userListen": {
|
|
"query": {
|
|
"collectionGroup": "cg",
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": ""
|
|
},
|
|
"targetId": 12
|
|
},
|
|
"expectedSnapshotEvents": [
|
|
{
|
|
"added": [
|
|
{
|
|
"createTime": 0,
|
|
"key": "cg/1",
|
|
"options": {
|
|
"hasCommittedMutations": false,
|
|
"hasLocalMutations": false
|
|
},
|
|
"value": {
|
|
"val": 1
|
|
},
|
|
"version": 1000
|
|
},
|
|
{
|
|
"createTime": 0,
|
|
"key": "cg/2",
|
|
"options": {
|
|
"hasCommittedMutations": false,
|
|
"hasLocalMutations": false
|
|
},
|
|
"value": {
|
|
"val": 2
|
|
},
|
|
"version": 1000
|
|
},
|
|
{
|
|
"createTime": 0,
|
|
"key": "not-cg/nope/cg/3",
|
|
"options": {
|
|
"hasCommittedMutations": false,
|
|
"hasLocalMutations": false
|
|
},
|
|
"value": {
|
|
"val": 1
|
|
},
|
|
"version": 1000
|
|
}
|
|
],
|
|
"errorCode": 0,
|
|
"fromCache": true,
|
|
"hasPendingWrites": false,
|
|
"query": {
|
|
"collectionGroup": "cg",
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": ""
|
|
}
|
|
}
|
|
],
|
|
"expectedState": {
|
|
"activeTargets": {
|
|
"10": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "cg/1/not-cg/nope"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
},
|
|
"12": {
|
|
"queries": [
|
|
{
|
|
"collectionGroup": "cg",
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": ""
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
},
|
|
"2": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "cg/1"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
},
|
|
"4": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "cg/2"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
},
|
|
"6": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "not-cg/nope/cg/3"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
},
|
|
"8": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "not-cg/nope"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"userListen": {
|
|
"query": {
|
|
"collectionGroup": "cg",
|
|
"filters": [
|
|
[
|
|
"val",
|
|
"==",
|
|
1
|
|
]
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": ""
|
|
},
|
|
"targetId": 14
|
|
},
|
|
"expectedSnapshotEvents": [
|
|
{
|
|
"added": [
|
|
{
|
|
"createTime": 0,
|
|
"key": "cg/1",
|
|
"options": {
|
|
"hasCommittedMutations": false,
|
|
"hasLocalMutations": false
|
|
},
|
|
"value": {
|
|
"val": 1
|
|
},
|
|
"version": 1000
|
|
},
|
|
{
|
|
"createTime": 0,
|
|
"key": "not-cg/nope/cg/3",
|
|
"options": {
|
|
"hasCommittedMutations": false,
|
|
"hasLocalMutations": false
|
|
},
|
|
"value": {
|
|
"val": 1
|
|
},
|
|
"version": 1000
|
|
}
|
|
],
|
|
"errorCode": 0,
|
|
"fromCache": true,
|
|
"hasPendingWrites": false,
|
|
"query": {
|
|
"collectionGroup": "cg",
|
|
"filters": [
|
|
[
|
|
"val",
|
|
"==",
|
|
1
|
|
]
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": ""
|
|
}
|
|
}
|
|
],
|
|
"expectedState": {
|
|
"activeTargets": {
|
|
"10": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "cg/1/not-cg/nope"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
},
|
|
"12": {
|
|
"queries": [
|
|
{
|
|
"collectionGroup": "cg",
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": ""
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
},
|
|
"14": {
|
|
"queries": [
|
|
{
|
|
"collectionGroup": "cg",
|
|
"filters": [
|
|
[
|
|
"val",
|
|
"==",
|
|
1
|
|
]
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": ""
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
},
|
|
"2": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "cg/1"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
},
|
|
"4": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "cg/2"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
},
|
|
"6": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "not-cg/nope/cg/3"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
},
|
|
"8": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "not-cg/nope"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Collection Group query with mutations": {
|
|
"describeName": "Queries:",
|
|
"itName": "Collection Group query with mutations",
|
|
"tags": [
|
|
],
|
|
"config": {
|
|
"numClients": 1,
|
|
"useEagerGCForMemory": true
|
|
},
|
|
"steps": [
|
|
{
|
|
"userListen": {
|
|
"query": {
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "cg/1"
|
|
},
|
|
"targetId": 2
|
|
},
|
|
"expectedState": {
|
|
"activeTargets": {
|
|
"2": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "cg/1"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"watchAck": [
|
|
2
|
|
]
|
|
},
|
|
{
|
|
"watchEntity": {
|
|
"docs": [
|
|
{
|
|
"createTime": 0,
|
|
"key": "cg/1",
|
|
"options": {
|
|
"hasCommittedMutations": false,
|
|
"hasLocalMutations": false
|
|
},
|
|
"value": {
|
|
"val": 1
|
|
},
|
|
"version": 1000
|
|
}
|
|
],
|
|
"targets": [
|
|
2
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"watchCurrent": [
|
|
[
|
|
2
|
|
],
|
|
"resume-token-1000"
|
|
]
|
|
},
|
|
{
|
|
"watchSnapshot": {
|
|
"targetIds": [
|
|
],
|
|
"version": 1000
|
|
},
|
|
"expectedSnapshotEvents": [
|
|
{
|
|
"added": [
|
|
{
|
|
"createTime": 0,
|
|
"key": "cg/1",
|
|
"options": {
|
|
"hasCommittedMutations": false,
|
|
"hasLocalMutations": false
|
|
},
|
|
"value": {
|
|
"val": 1
|
|
},
|
|
"version": 1000
|
|
}
|
|
],
|
|
"errorCode": 0,
|
|
"fromCache": false,
|
|
"hasPendingWrites": false,
|
|
"query": {
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "cg/1"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"userListen": {
|
|
"query": {
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "not-cg/nope"
|
|
},
|
|
"targetId": 4
|
|
},
|
|
"expectedState": {
|
|
"activeTargets": {
|
|
"2": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "cg/1"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
},
|
|
"4": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "not-cg/nope"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"watchAck": [
|
|
4
|
|
]
|
|
},
|
|
{
|
|
"watchEntity": {
|
|
"docs": [
|
|
{
|
|
"createTime": 0,
|
|
"key": "not-cg/nope",
|
|
"options": {
|
|
"hasCommittedMutations": false,
|
|
"hasLocalMutations": false
|
|
},
|
|
"value": {
|
|
"val": 1
|
|
},
|
|
"version": 1000
|
|
}
|
|
],
|
|
"targets": [
|
|
4
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"watchCurrent": [
|
|
[
|
|
4
|
|
],
|
|
"resume-token-1000"
|
|
]
|
|
},
|
|
{
|
|
"watchSnapshot": {
|
|
"targetIds": [
|
|
],
|
|
"version": 1000
|
|
},
|
|
"expectedSnapshotEvents": [
|
|
{
|
|
"added": [
|
|
{
|
|
"createTime": 0,
|
|
"key": "not-cg/nope",
|
|
"options": {
|
|
"hasCommittedMutations": false,
|
|
"hasLocalMutations": false
|
|
},
|
|
"value": {
|
|
"val": 1
|
|
},
|
|
"version": 1000
|
|
}
|
|
],
|
|
"errorCode": 0,
|
|
"fromCache": false,
|
|
"hasPendingWrites": false,
|
|
"query": {
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "not-cg/nope"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"userSet": [
|
|
"cg/2",
|
|
{
|
|
"val": 2
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"userSet": [
|
|
"not-cg/nope/cg/3",
|
|
{
|
|
"val": 1
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"userSet": [
|
|
"not-cg2/nope",
|
|
{
|
|
"val": 1
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"userListen": {
|
|
"query": {
|
|
"collectionGroup": "cg",
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": ""
|
|
},
|
|
"targetId": 6
|
|
},
|
|
"expectedSnapshotEvents": [
|
|
{
|
|
"added": [
|
|
{
|
|
"createTime": 0,
|
|
"key": "cg/1",
|
|
"options": {
|
|
"hasCommittedMutations": false,
|
|
"hasLocalMutations": false
|
|
},
|
|
"value": {
|
|
"val": 1
|
|
},
|
|
"version": 1000
|
|
},
|
|
{
|
|
"createTime": 0,
|
|
"key": "cg/2",
|
|
"options": {
|
|
"hasCommittedMutations": false,
|
|
"hasLocalMutations": true
|
|
},
|
|
"value": {
|
|
"val": 2
|
|
},
|
|
"version": 0
|
|
},
|
|
{
|
|
"createTime": 0,
|
|
"key": "not-cg/nope/cg/3",
|
|
"options": {
|
|
"hasCommittedMutations": false,
|
|
"hasLocalMutations": true
|
|
},
|
|
"value": {
|
|
"val": 1
|
|
},
|
|
"version": 0
|
|
}
|
|
],
|
|
"errorCode": 0,
|
|
"fromCache": true,
|
|
"hasPendingWrites": true,
|
|
"query": {
|
|
"collectionGroup": "cg",
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": ""
|
|
}
|
|
}
|
|
],
|
|
"expectedState": {
|
|
"activeTargets": {
|
|
"2": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "cg/1"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
},
|
|
"4": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "not-cg/nope"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
},
|
|
"6": {
|
|
"queries": [
|
|
{
|
|
"collectionGroup": "cg",
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": ""
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"userListen": {
|
|
"query": {
|
|
"collectionGroup": "cg",
|
|
"filters": [
|
|
[
|
|
"val",
|
|
"==",
|
|
1
|
|
]
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": ""
|
|
},
|
|
"targetId": 8
|
|
},
|
|
"expectedSnapshotEvents": [
|
|
{
|
|
"added": [
|
|
{
|
|
"createTime": 0,
|
|
"key": "cg/1",
|
|
"options": {
|
|
"hasCommittedMutations": false,
|
|
"hasLocalMutations": false
|
|
},
|
|
"value": {
|
|
"val": 1
|
|
},
|
|
"version": 1000
|
|
},
|
|
{
|
|
"createTime": 0,
|
|
"key": "not-cg/nope/cg/3",
|
|
"options": {
|
|
"hasCommittedMutations": false,
|
|
"hasLocalMutations": true
|
|
},
|
|
"value": {
|
|
"val": 1
|
|
},
|
|
"version": 0
|
|
}
|
|
],
|
|
"errorCode": 0,
|
|
"fromCache": true,
|
|
"hasPendingWrites": true,
|
|
"query": {
|
|
"collectionGroup": "cg",
|
|
"filters": [
|
|
[
|
|
"val",
|
|
"==",
|
|
1
|
|
]
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": ""
|
|
}
|
|
}
|
|
],
|
|
"expectedState": {
|
|
"activeTargets": {
|
|
"2": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "cg/1"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
},
|
|
"4": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "not-cg/nope"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
},
|
|
"6": {
|
|
"queries": [
|
|
{
|
|
"collectionGroup": "cg",
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": ""
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
},
|
|
"8": {
|
|
"queries": [
|
|
{
|
|
"collectionGroup": "cg",
|
|
"filters": [
|
|
[
|
|
"val",
|
|
"==",
|
|
1
|
|
]
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": ""
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Latency-compensated updates are included in query results": {
|
|
"describeName": "Queries:",
|
|
"itName": "Latency-compensated updates are included in query results",
|
|
"tags": [
|
|
],
|
|
"config": {
|
|
"numClients": 1,
|
|
"useEagerGCForMemory": true
|
|
},
|
|
"steps": [
|
|
{
|
|
"userListen": {
|
|
"query": {
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "collection"
|
|
},
|
|
"targetId": 2
|
|
},
|
|
"expectedState": {
|
|
"activeTargets": {
|
|
"2": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "collection"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"watchAck": [
|
|
2
|
|
]
|
|
},
|
|
{
|
|
"watchEntity": {
|
|
"docs": [
|
|
{
|
|
"createTime": 0,
|
|
"key": "collection/a",
|
|
"options": {
|
|
"hasCommittedMutations": false,
|
|
"hasLocalMutations": false
|
|
},
|
|
"value": {
|
|
"match": false
|
|
},
|
|
"version": 1000
|
|
}
|
|
],
|
|
"targets": [
|
|
2
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"watchCurrent": [
|
|
[
|
|
2
|
|
],
|
|
"resume-token-1000"
|
|
]
|
|
},
|
|
{
|
|
"watchSnapshot": {
|
|
"targetIds": [
|
|
],
|
|
"version": 1000
|
|
},
|
|
"expectedSnapshotEvents": [
|
|
{
|
|
"added": [
|
|
{
|
|
"createTime": 0,
|
|
"key": "collection/a",
|
|
"options": {
|
|
"hasCommittedMutations": false,
|
|
"hasLocalMutations": false
|
|
},
|
|
"value": {
|
|
"match": false
|
|
},
|
|
"version": 1000
|
|
}
|
|
],
|
|
"errorCode": 0,
|
|
"fromCache": false,
|
|
"hasPendingWrites": false,
|
|
"query": {
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "collection"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"userPatch": [
|
|
"collection/a",
|
|
{
|
|
"match": true
|
|
}
|
|
],
|
|
"expectedSnapshotEvents": [
|
|
{
|
|
"errorCode": 0,
|
|
"fromCache": false,
|
|
"hasPendingWrites": true,
|
|
"modified": [
|
|
{
|
|
"createTime": 0,
|
|
"key": "collection/a",
|
|
"options": {
|
|
"hasCommittedMutations": false,
|
|
"hasLocalMutations": true
|
|
},
|
|
"value": {
|
|
"match": true
|
|
},
|
|
"version": 0
|
|
}
|
|
],
|
|
"query": {
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "collection"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"userListen": {
|
|
"query": {
|
|
"filters": [
|
|
[
|
|
"match",
|
|
"==",
|
|
true
|
|
]
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "collection"
|
|
},
|
|
"targetId": 4
|
|
},
|
|
"expectedSnapshotEvents": [
|
|
{
|
|
"added": [
|
|
{
|
|
"createTime": 0,
|
|
"key": "collection/a",
|
|
"options": {
|
|
"hasCommittedMutations": false,
|
|
"hasLocalMutations": true
|
|
},
|
|
"value": {
|
|
"match": true
|
|
},
|
|
"version": 0
|
|
}
|
|
],
|
|
"errorCode": 0,
|
|
"fromCache": true,
|
|
"hasPendingWrites": true,
|
|
"query": {
|
|
"filters": [
|
|
[
|
|
"match",
|
|
"==",
|
|
true
|
|
]
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "collection"
|
|
}
|
|
}
|
|
],
|
|
"expectedState": {
|
|
"activeTargets": {
|
|
"2": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "collection"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
},
|
|
"4": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
[
|
|
"match",
|
|
"==",
|
|
true
|
|
]
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "collection"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Queries in different tabs will not interfere": {
|
|
"describeName": "Queries:",
|
|
"itName": "Queries in different tabs will not interfere",
|
|
"tags": [
|
|
"multi-client"
|
|
],
|
|
"config": {
|
|
"numClients": 2,
|
|
"useEagerGCForMemory": false
|
|
},
|
|
"steps": [
|
|
{
|
|
"clientIndex": 0,
|
|
"drainQueue": true
|
|
},
|
|
{
|
|
"applyClientState": {
|
|
"visibility": "visible"
|
|
},
|
|
"clientIndex": 0,
|
|
"expectedState": {
|
|
"isPrimary": true
|
|
}
|
|
},
|
|
{
|
|
"clientIndex": 0,
|
|
"userListen": {
|
|
"query": {
|
|
"filters": [
|
|
[
|
|
"key",
|
|
"==",
|
|
"a"
|
|
]
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "collection"
|
|
},
|
|
"targetId": 2
|
|
},
|
|
"expectedState": {
|
|
"activeTargets": {
|
|
"2": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
[
|
|
"key",
|
|
"==",
|
|
"a"
|
|
]
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "collection"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"clientIndex": 0,
|
|
"watchAck": [
|
|
2
|
|
]
|
|
},
|
|
{
|
|
"clientIndex": 0,
|
|
"watchEntity": {
|
|
"docs": [
|
|
{
|
|
"createTime": 0,
|
|
"key": "collection/a",
|
|
"options": {
|
|
"hasCommittedMutations": false,
|
|
"hasLocalMutations": false
|
|
},
|
|
"value": {
|
|
"key": "a"
|
|
},
|
|
"version": 1000
|
|
}
|
|
],
|
|
"targets": [
|
|
2
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"clientIndex": 1,
|
|
"drainQueue": true
|
|
},
|
|
{
|
|
"clientIndex": 1,
|
|
"userListen": {
|
|
"query": {
|
|
"filters": [
|
|
[
|
|
"key",
|
|
"==",
|
|
"b"
|
|
]
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "collection"
|
|
},
|
|
"targetId": 4
|
|
},
|
|
"expectedState": {
|
|
"activeTargets": {
|
|
"4": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
[
|
|
"key",
|
|
"==",
|
|
"b"
|
|
]
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "collection"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"clientIndex": 0,
|
|
"drainQueue": true,
|
|
"expectedState": {
|
|
"activeTargets": {
|
|
"2": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
[
|
|
"key",
|
|
"==",
|
|
"a"
|
|
]
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "collection"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
},
|
|
"4": {
|
|
"queries": [
|
|
{
|
|
"filters": [
|
|
[
|
|
"key",
|
|
"==",
|
|
"b"
|
|
]
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "collection"
|
|
}
|
|
],
|
|
"resumeToken": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"clientIndex": 0,
|
|
"watchCurrent": [
|
|
[
|
|
2
|
|
],
|
|
"resume-token-1000"
|
|
]
|
|
},
|
|
{
|
|
"clientIndex": 0,
|
|
"watchSnapshot": {
|
|
"targetIds": [
|
|
],
|
|
"version": 1000
|
|
},
|
|
"expectedSnapshotEvents": [
|
|
{
|
|
"added": [
|
|
{
|
|
"createTime": 0,
|
|
"key": "collection/a",
|
|
"options": {
|
|
"hasCommittedMutations": false,
|
|
"hasLocalMutations": false
|
|
},
|
|
"value": {
|
|
"key": "a"
|
|
},
|
|
"version": 1000
|
|
}
|
|
],
|
|
"errorCode": 0,
|
|
"fromCache": false,
|
|
"hasPendingWrites": false,
|
|
"query": {
|
|
"filters": [
|
|
[
|
|
"key",
|
|
"==",
|
|
"a"
|
|
]
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "collection"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"clientIndex": 1,
|
|
"drainQueue": true
|
|
},
|
|
{
|
|
"clientIndex": 0,
|
|
"drainQueue": true
|
|
},
|
|
{
|
|
"clientIndex": 0,
|
|
"watchAck": [
|
|
4
|
|
]
|
|
},
|
|
{
|
|
"clientIndex": 0,
|
|
"watchEntity": {
|
|
"docs": [
|
|
{
|
|
"createTime": 0,
|
|
"key": "collection/b",
|
|
"options": {
|
|
"hasCommittedMutations": false,
|
|
"hasLocalMutations": false
|
|
},
|
|
"value": {
|
|
"key": "b"
|
|
},
|
|
"version": 1000
|
|
}
|
|
],
|
|
"targets": [
|
|
4
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"clientIndex": 0,
|
|
"watchCurrent": [
|
|
[
|
|
4
|
|
],
|
|
"resume-token-2000"
|
|
]
|
|
},
|
|
{
|
|
"clientIndex": 0,
|
|
"watchSnapshot": {
|
|
"targetIds": [
|
|
],
|
|
"version": 2000
|
|
}
|
|
},
|
|
{
|
|
"clientIndex": 1,
|
|
"drainQueue": true,
|
|
"expectedSnapshotEvents": [
|
|
{
|
|
"added": [
|
|
{
|
|
"createTime": 0,
|
|
"key": "collection/b",
|
|
"options": {
|
|
"hasCommittedMutations": false,
|
|
"hasLocalMutations": false
|
|
},
|
|
"value": {
|
|
"key": "b"
|
|
},
|
|
"version": 1000
|
|
}
|
|
],
|
|
"errorCode": 0,
|
|
"fromCache": false,
|
|
"hasPendingWrites": false,
|
|
"query": {
|
|
"filters": [
|
|
[
|
|
"key",
|
|
"==",
|
|
"b"
|
|
]
|
|
],
|
|
"orderBys": [
|
|
],
|
|
"path": "collection"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|