diff options
author | Sebastian Schmidt <mrschmidt@google.com> | 2017-11-08 17:04:41 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-08 17:04:41 -0800 |
commit | 9044d2ce212d3fffe6bfb3793fdb5c58cb18f49b (patch) | |
tree | 3c781a1eb45c718b2410475b253b9dfa17fae2b3 /Firestore/Example/Tests/SpecTests/json/listen_spec_test.json | |
parent | c4c7777e75bfc84ba144f13014f312230a0cc7ed (diff) |
Sending an empty write request before tearing down the stream (#438)
Diffstat (limited to 'Firestore/Example/Tests/SpecTests/json/listen_spec_test.json')
-rw-r--r-- | Firestore/Example/Tests/SpecTests/json/listen_spec_test.json | 158 |
1 files changed, 158 insertions, 0 deletions
diff --git a/Firestore/Example/Tests/SpecTests/json/listen_spec_test.json b/Firestore/Example/Tests/SpecTests/json/listen_spec_test.json index 35704f2..e607710 100644 --- a/Firestore/Example/Tests/SpecTests/json/listen_spec_test.json +++ b/Firestore/Example/Tests/SpecTests/json/listen_spec_test.json @@ -1520,5 +1520,163 @@ ] } ] + }, + "Listens are reestablished after network disconnect": { + "describeName": "Listens:", + "itName": "Listens are reestablished after network disconnect", + "tags": [], + "config": { + "useGarbageCollection": true + }, + "steps": [ + { + "userListen": [ + 2, + { + "path": "collection", + "filters": [], + "orderBys": [] + } + ], + "stateExpect": { + "activeTargets": { + "2": { + "query": { + "path": "collection", + "filters": [], + "orderBys": [] + }, + "resumeToken": "" + } + }, + "watchStreamRequestCount": 1 + } + }, + { + "watchAck": [ + 2 + ] + }, + { + "watchEntity": { + "docs": [ + [ + "collection/a", + 1000, + { + "key": "a" + } + ] + ], + "targets": [ + 2 + ] + } + }, + { + "watchCurrent": [ + [ + 2 + ], + "resume-token-1000" + ], + "watchSnapshot": 1000, + "expect": [ + { + "query": { + "path": "collection", + "filters": [], + "orderBys": [] + }, + "added": [ + [ + "collection/a", + 1000, + { + "key": "a" + } + ] + ], + "errorCode": 0, + "fromCache": false, + "hasPendingWrites": false + } + ] + }, + { + "enableNetwork": false, + "stateExpect": { + "activeTargets": {}, + "limboDocs": [] + } + }, + { + "enableNetwork": true, + "stateExpect": { + "activeTargets": { + "2": { + "query": { + "path": "collection", + "filters": [], + "orderBys": [] + }, + "resumeToken": "resume-token-1000" + } + }, + "watchStreamRequestCount": 2 + } + }, + { + "watchAck": [ + 2 + ] + }, + { + "watchEntity": { + "docs": [ + [ + "collection/b", + 2000, + { + "key": "b" + } + ] + ], + "targets": [ + 2 + ] + } + }, + { + "watchCurrent": [ + [ + 2 + ], + "resume-token-2000" + ], + "watchSnapshot": 2000, + "expect": [ + { + "query": { + "path": "collection", + "filters": [], + "orderBys": [] + }, + "added": [ + [ + "collection/b", + 2000, + { + "key": "b" + } + ] + ], + "errorCode": 0, + "fromCache": false, + "hasPendingWrites": false + } + ] + } + ] } } |