limit_spec_test.json 34 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642
  1. {
  2. "Documents in limit are replaced by remote event": {
  3. "describeName": "Limits:",
  4. "itName": "Documents in limit are replaced by remote event",
  5. "tags": [],
  6. "config": {
  7. "useGarbageCollection": true
  8. },
  9. "steps": [
  10. {
  11. "userListen": [
  12. 2,
  13. {
  14. "path": "collection",
  15. "limit": 2,
  16. "filters": [],
  17. "orderBys": []
  18. }
  19. ],
  20. "stateExpect": {
  21. "activeTargets": {
  22. "2": {
  23. "query": {
  24. "path": "collection",
  25. "limit": 2,
  26. "filters": [],
  27. "orderBys": []
  28. },
  29. "resumeToken": ""
  30. }
  31. }
  32. }
  33. },
  34. {
  35. "watchAck": [
  36. 2
  37. ]
  38. },
  39. {
  40. "watchEntity": {
  41. "docs": [
  42. [
  43. "collection/a",
  44. 1000,
  45. {
  46. "key": "a"
  47. }
  48. ],
  49. [
  50. "collection/c",
  51. 1001,
  52. {
  53. "key": "c"
  54. }
  55. ]
  56. ],
  57. "targets": [
  58. 2
  59. ]
  60. }
  61. },
  62. {
  63. "watchCurrent": [
  64. [
  65. 2
  66. ],
  67. "resume-token-1001"
  68. ],
  69. "watchSnapshot": 1001,
  70. "expect": [
  71. {
  72. "query": {
  73. "path": "collection",
  74. "limit": 2,
  75. "filters": [],
  76. "orderBys": []
  77. },
  78. "added": [
  79. [
  80. "collection/a",
  81. 1000,
  82. {
  83. "key": "a"
  84. }
  85. ],
  86. [
  87. "collection/c",
  88. 1001,
  89. {
  90. "key": "c"
  91. }
  92. ]
  93. ],
  94. "errorCode": 0,
  95. "fromCache": false,
  96. "hasPendingWrites": false
  97. }
  98. ]
  99. },
  100. {
  101. "watchEntity": {
  102. "docs": [
  103. [
  104. "collection/b",
  105. 1002,
  106. {
  107. "key": "b"
  108. }
  109. ]
  110. ],
  111. "targets": [
  112. 2
  113. ]
  114. }
  115. },
  116. {
  117. "watchEntity": {
  118. "docs": [
  119. [
  120. "collection/c",
  121. 1001,
  122. {
  123. "key": "c"
  124. }
  125. ]
  126. ],
  127. "removedTargets": [
  128. 2
  129. ]
  130. },
  131. "watchSnapshot": 1002,
  132. "expect": [
  133. {
  134. "query": {
  135. "path": "collection",
  136. "limit": 2,
  137. "filters": [],
  138. "orderBys": []
  139. },
  140. "added": [
  141. [
  142. "collection/b",
  143. 1002,
  144. {
  145. "key": "b"
  146. }
  147. ]
  148. ],
  149. "removed": [
  150. [
  151. "collection/c",
  152. 1001,
  153. {
  154. "key": "c"
  155. }
  156. ]
  157. ],
  158. "errorCode": 0,
  159. "fromCache": false,
  160. "hasPendingWrites": false
  161. }
  162. ]
  163. }
  164. ]
  165. },
  166. "Deleted Document in limbo in full limit query": {
  167. "describeName": "Limits:",
  168. "itName": "Deleted Document in limbo in full limit query",
  169. "tags": [],
  170. "config": {
  171. "useGarbageCollection": true
  172. },
  173. "steps": [
  174. {
  175. "userListen": [
  176. 2,
  177. {
  178. "path": "collection",
  179. "limit": 2,
  180. "filters": [],
  181. "orderBys": []
  182. }
  183. ],
  184. "stateExpect": {
  185. "activeTargets": {
  186. "2": {
  187. "query": {
  188. "path": "collection",
  189. "limit": 2,
  190. "filters": [],
  191. "orderBys": []
  192. },
  193. "resumeToken": ""
  194. }
  195. }
  196. }
  197. },
  198. {
  199. "watchAck": [
  200. 2
  201. ]
  202. },
  203. {
  204. "watchEntity": {
  205. "docs": [
  206. [
  207. "collection/a",
  208. 1000,
  209. {
  210. "key": "a"
  211. }
  212. ],
  213. [
  214. "collection/b",
  215. 1001,
  216. {
  217. "key": "b"
  218. }
  219. ]
  220. ],
  221. "targets": [
  222. 2
  223. ]
  224. }
  225. },
  226. {
  227. "watchCurrent": [
  228. [
  229. 2
  230. ],
  231. "resume-token-1002"
  232. ],
  233. "watchSnapshot": 1002,
  234. "expect": [
  235. {
  236. "query": {
  237. "path": "collection",
  238. "limit": 2,
  239. "filters": [],
  240. "orderBys": []
  241. },
  242. "added": [
  243. [
  244. "collection/a",
  245. 1000,
  246. {
  247. "key": "a"
  248. }
  249. ],
  250. [
  251. "collection/b",
  252. 1001,
  253. {
  254. "key": "b"
  255. }
  256. ]
  257. ],
  258. "errorCode": 0,
  259. "fromCache": false,
  260. "hasPendingWrites": false
  261. }
  262. ]
  263. },
  264. {
  265. "watchReset": [
  266. 2
  267. ]
  268. },
  269. {
  270. "watchEntity": {
  271. "docs": [
  272. [
  273. "collection/b",
  274. 1001,
  275. {
  276. "key": "b"
  277. }
  278. ],
  279. [
  280. "collection/c",
  281. 1002,
  282. {
  283. "key": "c"
  284. }
  285. ]
  286. ],
  287. "targets": [
  288. 2
  289. ]
  290. }
  291. },
  292. {
  293. "watchCurrent": [
  294. [
  295. 2
  296. ],
  297. "resume-token-2000"
  298. ],
  299. "watchSnapshot": 2000,
  300. "stateExpect": {
  301. "limboDocs": [
  302. "collection/a"
  303. ],
  304. "activeTargets": {
  305. "1": {
  306. "query": {
  307. "path": "collection/a",
  308. "filters": [],
  309. "orderBys": []
  310. },
  311. "resumeToken": ""
  312. },
  313. "2": {
  314. "query": {
  315. "path": "collection",
  316. "limit": 2,
  317. "filters": [],
  318. "orderBys": []
  319. },
  320. "resumeToken": ""
  321. }
  322. }
  323. },
  324. "expect": [
  325. {
  326. "query": {
  327. "path": "collection",
  328. "limit": 2,
  329. "filters": [],
  330. "orderBys": []
  331. },
  332. "errorCode": 0,
  333. "fromCache": true,
  334. "hasPendingWrites": false
  335. }
  336. ]
  337. },
  338. {
  339. "watchAck": [
  340. 1
  341. ]
  342. },
  343. {
  344. "watchCurrent": [
  345. [
  346. 1
  347. ],
  348. "resume-token-2000"
  349. ],
  350. "watchSnapshot": 2000,
  351. "stateExpect": {
  352. "limboDocs": [],
  353. "activeTargets": {
  354. "2": {
  355. "query": {
  356. "path": "collection",
  357. "limit": 2,
  358. "filters": [],
  359. "orderBys": []
  360. },
  361. "resumeToken": ""
  362. }
  363. }
  364. },
  365. "expect": [
  366. {
  367. "query": {
  368. "path": "collection",
  369. "limit": 2,
  370. "filters": [],
  371. "orderBys": []
  372. },
  373. "added": [
  374. [
  375. "collection/c",
  376. 1002,
  377. {
  378. "key": "c"
  379. }
  380. ]
  381. ],
  382. "removed": [
  383. [
  384. "collection/a",
  385. 1000,
  386. {
  387. "key": "a"
  388. }
  389. ]
  390. ],
  391. "errorCode": 0,
  392. "fromCache": false,
  393. "hasPendingWrites": false
  394. }
  395. ]
  396. }
  397. ]
  398. },
  399. "Documents in limit can handle removed messages": {
  400. "describeName": "Limits:",
  401. "itName": "Documents in limit can handle removed messages",
  402. "tags": [],
  403. "config": {
  404. "useGarbageCollection": true
  405. },
  406. "steps": [
  407. {
  408. "userListen": [
  409. 2,
  410. {
  411. "path": "collection",
  412. "limit": 2,
  413. "filters": [],
  414. "orderBys": []
  415. }
  416. ],
  417. "stateExpect": {
  418. "activeTargets": {
  419. "2": {
  420. "query": {
  421. "path": "collection",
  422. "limit": 2,
  423. "filters": [],
  424. "orderBys": []
  425. },
  426. "resumeToken": ""
  427. }
  428. }
  429. }
  430. },
  431. {
  432. "watchAck": [
  433. 2
  434. ]
  435. },
  436. {
  437. "watchEntity": {
  438. "docs": [
  439. [
  440. "collection/a",
  441. 1000,
  442. {
  443. "key": "a"
  444. }
  445. ],
  446. [
  447. "collection/c",
  448. 1001,
  449. {
  450. "key": "c"
  451. }
  452. ]
  453. ],
  454. "targets": [
  455. 2
  456. ]
  457. }
  458. },
  459. {
  460. "watchCurrent": [
  461. [
  462. 2
  463. ],
  464. "resume-token-1001"
  465. ],
  466. "watchSnapshot": 1001,
  467. "expect": [
  468. {
  469. "query": {
  470. "path": "collection",
  471. "limit": 2,
  472. "filters": [],
  473. "orderBys": []
  474. },
  475. "added": [
  476. [
  477. "collection/a",
  478. 1000,
  479. {
  480. "key": "a"
  481. }
  482. ],
  483. [
  484. "collection/c",
  485. 1001,
  486. {
  487. "key": "c"
  488. }
  489. ]
  490. ],
  491. "errorCode": 0,
  492. "fromCache": false,
  493. "hasPendingWrites": false
  494. }
  495. ]
  496. },
  497. {
  498. "watchEntity": {
  499. "docs": [
  500. [
  501. "collection/b",
  502. 1002,
  503. {
  504. "key": "b"
  505. }
  506. ]
  507. ],
  508. "targets": [
  509. 2
  510. ]
  511. }
  512. },
  513. {
  514. "watchEntity": {
  515. "key": "collection/c",
  516. "removedTargets": [
  517. 2
  518. ]
  519. },
  520. "watchSnapshot": 1002,
  521. "stateExpect": {
  522. "limboDocs": [],
  523. "activeTargets": {
  524. "2": {
  525. "query": {
  526. "path": "collection",
  527. "limit": 2,
  528. "filters": [],
  529. "orderBys": []
  530. },
  531. "resumeToken": ""
  532. }
  533. }
  534. },
  535. "expect": [
  536. {
  537. "query": {
  538. "path": "collection",
  539. "limit": 2,
  540. "filters": [],
  541. "orderBys": []
  542. },
  543. "added": [
  544. [
  545. "collection/b",
  546. 1002,
  547. {
  548. "key": "b"
  549. }
  550. ]
  551. ],
  552. "removed": [
  553. [
  554. "collection/c",
  555. 1001,
  556. {
  557. "key": "c"
  558. }
  559. ]
  560. ],
  561. "errorCode": 0,
  562. "fromCache": false,
  563. "hasPendingWrites": false
  564. }
  565. ]
  566. }
  567. ]
  568. },
  569. "Documents in limit are can handle removed messages for only one of many query": {
  570. "describeName": "Limits:",
  571. "itName": "Documents in limit are can handle removed messages for only one of many query",
  572. "tags": [],
  573. "config": {
  574. "useGarbageCollection": true
  575. },
  576. "steps": [
  577. {
  578. "userListen": [
  579. 2,
  580. {
  581. "path": "collection",
  582. "limit": 2,
  583. "filters": [],
  584. "orderBys": []
  585. }
  586. ],
  587. "stateExpect": {
  588. "activeTargets": {
  589. "2": {
  590. "query": {
  591. "path": "collection",
  592. "limit": 2,
  593. "filters": [],
  594. "orderBys": []
  595. },
  596. "resumeToken": ""
  597. }
  598. }
  599. }
  600. },
  601. {
  602. "userListen": [
  603. 4,
  604. {
  605. "path": "collection",
  606. "limit": 3,
  607. "filters": [],
  608. "orderBys": []
  609. }
  610. ],
  611. "stateExpect": {
  612. "activeTargets": {
  613. "2": {
  614. "query": {
  615. "path": "collection",
  616. "limit": 2,
  617. "filters": [],
  618. "orderBys": []
  619. },
  620. "resumeToken": ""
  621. },
  622. "4": {
  623. "query": {
  624. "path": "collection",
  625. "limit": 3,
  626. "filters": [],
  627. "orderBys": []
  628. },
  629. "resumeToken": ""
  630. }
  631. }
  632. }
  633. },
  634. {
  635. "watchAck": [
  636. 2
  637. ]
  638. },
  639. {
  640. "watchAck": [
  641. 4
  642. ]
  643. },
  644. {
  645. "watchEntity": {
  646. "docs": [
  647. [
  648. "collection/a",
  649. 1000,
  650. {
  651. "key": "a"
  652. }
  653. ],
  654. [
  655. "collection/c",
  656. 1001,
  657. {
  658. "key": "c"
  659. }
  660. ]
  661. ],
  662. "targets": [
  663. 2
  664. ]
  665. }
  666. },
  667. {
  668. "watchEntity": {
  669. "docs": [
  670. [
  671. "collection/a",
  672. 1000,
  673. {
  674. "key": "a"
  675. }
  676. ],
  677. [
  678. "collection/c",
  679. 1001,
  680. {
  681. "key": "c"
  682. }
  683. ]
  684. ],
  685. "targets": [
  686. 4
  687. ]
  688. }
  689. },
  690. {
  691. "watchCurrent": [
  692. [
  693. 2
  694. ],
  695. "resume-token-1001"
  696. ]
  697. },
  698. {
  699. "watchCurrent": [
  700. [
  701. 4
  702. ],
  703. "resume-token-1001"
  704. ],
  705. "watchSnapshot": 1001,
  706. "expect": [
  707. {
  708. "query": {
  709. "path": "collection",
  710. "limit": 2,
  711. "filters": [],
  712. "orderBys": []
  713. },
  714. "added": [
  715. [
  716. "collection/a",
  717. 1000,
  718. {
  719. "key": "a"
  720. }
  721. ],
  722. [
  723. "collection/c",
  724. 1001,
  725. {
  726. "key": "c"
  727. }
  728. ]
  729. ],
  730. "errorCode": 0,
  731. "fromCache": false,
  732. "hasPendingWrites": false
  733. },
  734. {
  735. "query": {
  736. "path": "collection",
  737. "limit": 3,
  738. "filters": [],
  739. "orderBys": []
  740. },
  741. "added": [
  742. [
  743. "collection/a",
  744. 1000,
  745. {
  746. "key": "a"
  747. }
  748. ],
  749. [
  750. "collection/c",
  751. 1001,
  752. {
  753. "key": "c"
  754. }
  755. ]
  756. ],
  757. "errorCode": 0,
  758. "fromCache": false,
  759. "hasPendingWrites": false
  760. }
  761. ]
  762. },
  763. {
  764. "watchEntity": {
  765. "docs": [
  766. [
  767. "collection/b",
  768. 1002,
  769. {
  770. "key": "b"
  771. }
  772. ]
  773. ],
  774. "targets": [
  775. 2,
  776. 4
  777. ]
  778. }
  779. },
  780. {
  781. "watchEntity": {
  782. "key": "collection/c",
  783. "removedTargets": [
  784. 2
  785. ]
  786. },
  787. "watchSnapshot": 1002,
  788. "stateExpect": {
  789. "limboDocs": [],
  790. "activeTargets": {
  791. "2": {
  792. "query": {
  793. "path": "collection",
  794. "limit": 2,
  795. "filters": [],
  796. "orderBys": []
  797. },
  798. "resumeToken": ""
  799. },
  800. "4": {
  801. "query": {
  802. "path": "collection",
  803. "limit": 3,
  804. "filters": [],
  805. "orderBys": []
  806. },
  807. "resumeToken": ""
  808. }
  809. }
  810. },
  811. "expect": [
  812. {
  813. "query": {
  814. "path": "collection",
  815. "limit": 2,
  816. "filters": [],
  817. "orderBys": []
  818. },
  819. "added": [
  820. [
  821. "collection/b",
  822. 1002,
  823. {
  824. "key": "b"
  825. }
  826. ]
  827. ],
  828. "removed": [
  829. [
  830. "collection/c",
  831. 1001,
  832. {
  833. "key": "c"
  834. }
  835. ]
  836. ],
  837. "errorCode": 0,
  838. "fromCache": false,
  839. "hasPendingWrites": false
  840. },
  841. {
  842. "query": {
  843. "path": "collection",
  844. "limit": 3,
  845. "filters": [],
  846. "orderBys": []
  847. },
  848. "added": [
  849. [
  850. "collection/b",
  851. 1002,
  852. {
  853. "key": "b"
  854. }
  855. ]
  856. ],
  857. "errorCode": 0,
  858. "fromCache": false,
  859. "hasPendingWrites": false
  860. }
  861. ]
  862. }
  863. ]
  864. },
  865. "Multiple docs in limbo in full limit query": {
  866. "describeName": "Limits:",
  867. "itName": "Multiple docs in limbo in full limit query",
  868. "tags": [],
  869. "config": {
  870. "useGarbageCollection": true
  871. },
  872. "steps": [
  873. {
  874. "userListen": [
  875. 2,
  876. {
  877. "path": "collection",
  878. "limit": 2,
  879. "filters": [],
  880. "orderBys": []
  881. }
  882. ],
  883. "stateExpect": {
  884. "activeTargets": {
  885. "2": {
  886. "query": {
  887. "path": "collection",
  888. "limit": 2,
  889. "filters": [],
  890. "orderBys": []
  891. },
  892. "resumeToken": ""
  893. }
  894. }
  895. }
  896. },
  897. {
  898. "watchAck": [
  899. 2
  900. ]
  901. },
  902. {
  903. "watchEntity": {
  904. "docs": [
  905. [
  906. "collection/a",
  907. 1000,
  908. {
  909. "key": "a"
  910. }
  911. ],
  912. [
  913. "collection/b",
  914. 1001,
  915. {
  916. "key": "b"
  917. }
  918. ]
  919. ],
  920. "targets": [
  921. 2
  922. ]
  923. }
  924. },
  925. {
  926. "watchCurrent": [
  927. [
  928. 2
  929. ],
  930. "resume-token-1001"
  931. ],
  932. "watchSnapshot": 1001,
  933. "expect": [
  934. {
  935. "query": {
  936. "path": "collection",
  937. "limit": 2,
  938. "filters": [],
  939. "orderBys": []
  940. },
  941. "added": [
  942. [
  943. "collection/a",
  944. 1000,
  945. {
  946. "key": "a"
  947. }
  948. ],
  949. [
  950. "collection/b",
  951. 1001,
  952. {
  953. "key": "b"
  954. }
  955. ]
  956. ],
  957. "errorCode": 0,
  958. "fromCache": false,
  959. "hasPendingWrites": false
  960. }
  961. ]
  962. },
  963. {
  964. "userListen": [
  965. 4,
  966. {
  967. "path": "collection",
  968. "filters": [],
  969. "orderBys": []
  970. }
  971. ],
  972. "stateExpect": {
  973. "activeTargets": {
  974. "2": {
  975. "query": {
  976. "path": "collection",
  977. "limit": 2,
  978. "filters": [],
  979. "orderBys": []
  980. },
  981. "resumeToken": ""
  982. },
  983. "4": {
  984. "query": {
  985. "path": "collection",
  986. "filters": [],
  987. "orderBys": []
  988. },
  989. "resumeToken": ""
  990. }
  991. }
  992. },
  993. "expect": [
  994. {
  995. "query": {
  996. "path": "collection",
  997. "filters": [],
  998. "orderBys": []
  999. },
  1000. "added": [
  1001. [
  1002. "collection/a",
  1003. 1000,
  1004. {
  1005. "key": "a"
  1006. }
  1007. ],
  1008. [
  1009. "collection/b",
  1010. 1001,
  1011. {
  1012. "key": "b"
  1013. }
  1014. ]
  1015. ],
  1016. "errorCode": 0,
  1017. "fromCache": true,
  1018. "hasPendingWrites": false
  1019. }
  1020. ]
  1021. },
  1022. {
  1023. "watchAck": [
  1024. 4
  1025. ]
  1026. },
  1027. {
  1028. "watchEntity": {
  1029. "docs": [
  1030. [
  1031. "collection/a",
  1032. 1000,
  1033. {
  1034. "key": "a"
  1035. }
  1036. ],
  1037. [
  1038. "collection/b",
  1039. 1001,
  1040. {
  1041. "key": "b"
  1042. }
  1043. ],
  1044. [
  1045. "collection/c",
  1046. 1002,
  1047. {
  1048. "key": "c"
  1049. }
  1050. ],
  1051. [
  1052. "collection/d",
  1053. 1003,
  1054. {
  1055. "key": "d"
  1056. }
  1057. ],
  1058. [
  1059. "collection/e",
  1060. 1004,
  1061. {
  1062. "key": "e"
  1063. }
  1064. ],
  1065. [
  1066. "collection/f",
  1067. 1005,
  1068. {
  1069. "key": "f"
  1070. }
  1071. ]
  1072. ],
  1073. "targets": [
  1074. 4
  1075. ]
  1076. }
  1077. },
  1078. {
  1079. "watchCurrent": [
  1080. [
  1081. 4
  1082. ],
  1083. "resume-token-1005"
  1084. ],
  1085. "watchSnapshot": 1005,
  1086. "expect": [
  1087. {
  1088. "query": {
  1089. "path": "collection",
  1090. "filters": [],
  1091. "orderBys": []
  1092. },
  1093. "added": [
  1094. [
  1095. "collection/c",
  1096. 1002,
  1097. {
  1098. "key": "c"
  1099. }
  1100. ],
  1101. [
  1102. "collection/d",
  1103. 1003,
  1104. {
  1105. "key": "d"
  1106. }
  1107. ],
  1108. [
  1109. "collection/e",
  1110. 1004,
  1111. {
  1112. "key": "e"
  1113. }
  1114. ],
  1115. [
  1116. "collection/f",
  1117. 1005,
  1118. {
  1119. "key": "f"
  1120. }
  1121. ]
  1122. ],
  1123. "errorCode": 0,
  1124. "fromCache": false,
  1125. "hasPendingWrites": false
  1126. }
  1127. ]
  1128. },
  1129. {
  1130. "watchReset": [
  1131. 2
  1132. ]
  1133. },
  1134. {
  1135. "watchEntity": {
  1136. "docs": [
  1137. [
  1138. "collection/e",
  1139. 1004,
  1140. {
  1141. "key": "e"
  1142. }
  1143. ],
  1144. [
  1145. "collection/f",
  1146. 1005,
  1147. {
  1148. "key": "f"
  1149. }
  1150. ]
  1151. ],
  1152. "targets": [
  1153. 2
  1154. ]
  1155. }
  1156. },
  1157. {
  1158. "watchCurrent": [
  1159. [
  1160. 2
  1161. ],
  1162. "resume-token-2000"
  1163. ],
  1164. "watchSnapshot": 2000,
  1165. "stateExpect": {
  1166. "limboDocs": [
  1167. "collection/a",
  1168. "collection/b"
  1169. ],
  1170. "activeTargets": {
  1171. "1": {
  1172. "query": {
  1173. "path": "collection/a",
  1174. "filters": [],
  1175. "orderBys": []
  1176. },
  1177. "resumeToken": ""
  1178. },
  1179. "2": {
  1180. "query": {
  1181. "path": "collection",
  1182. "limit": 2,
  1183. "filters": [],
  1184. "orderBys": []
  1185. },
  1186. "resumeToken": ""
  1187. },
  1188. "3": {
  1189. "query": {
  1190. "path": "collection/b",
  1191. "filters": [],
  1192. "orderBys": []
  1193. },
  1194. "resumeToken": ""
  1195. },
  1196. "4": {
  1197. "query": {
  1198. "path": "collection",
  1199. "filters": [],
  1200. "orderBys": []
  1201. },
  1202. "resumeToken": ""
  1203. }
  1204. }
  1205. },
  1206. "expect": [
  1207. {
  1208. "query": {
  1209. "path": "collection",
  1210. "limit": 2,
  1211. "filters": [],
  1212. "orderBys": []
  1213. },
  1214. "errorCode": 0,
  1215. "fromCache": true,
  1216. "hasPendingWrites": false
  1217. }
  1218. ]
  1219. },
  1220. {
  1221. "watchAck": [
  1222. 1
  1223. ]
  1224. },
  1225. {
  1226. "watchCurrent": [
  1227. [
  1228. 1
  1229. ],
  1230. "resume-token-2000"
  1231. ],
  1232. "watchSnapshot": 2000,
  1233. "stateExpect": {
  1234. "limboDocs": [
  1235. "collection/b",
  1236. "collection/c"
  1237. ],
  1238. "activeTargets": {
  1239. "2": {
  1240. "query": {
  1241. "path": "collection",
  1242. "limit": 2,
  1243. "filters": [],
  1244. "orderBys": []
  1245. },
  1246. "resumeToken": ""
  1247. },
  1248. "3": {
  1249. "query": {
  1250. "path": "collection/b",
  1251. "filters": [],
  1252. "orderBys": []
  1253. },
  1254. "resumeToken": ""
  1255. },
  1256. "4": {
  1257. "query": {
  1258. "path": "collection",
  1259. "filters": [],
  1260. "orderBys": []
  1261. },
  1262. "resumeToken": ""
  1263. },
  1264. "5": {
  1265. "query": {
  1266. "path": "collection/c",
  1267. "filters": [],
  1268. "orderBys": []
  1269. },
  1270. "resumeToken": ""
  1271. }
  1272. }
  1273. },
  1274. "expect": [
  1275. {
  1276. "query": {
  1277. "path": "collection",
  1278. "filters": [],
  1279. "orderBys": []
  1280. },
  1281. "removed": [
  1282. [
  1283. "collection/a",
  1284. 1000,
  1285. {
  1286. "key": "a"
  1287. }
  1288. ]
  1289. ],
  1290. "errorCode": 0,
  1291. "fromCache": false,
  1292. "hasPendingWrites": false
  1293. },
  1294. {
  1295. "query": {
  1296. "path": "collection",
  1297. "limit": 2,
  1298. "filters": [],
  1299. "orderBys": []
  1300. },
  1301. "added": [
  1302. [
  1303. "collection/c",
  1304. 1002,
  1305. {
  1306. "key": "c"
  1307. }
  1308. ]
  1309. ],
  1310. "removed": [
  1311. [
  1312. "collection/a",
  1313. 1000,
  1314. {
  1315. "key": "a"
  1316. }
  1317. ]
  1318. ],
  1319. "errorCode": 0,
  1320. "fromCache": true,
  1321. "hasPendingWrites": false
  1322. }
  1323. ]
  1324. },
  1325. {
  1326. "watchRemove": {
  1327. "targetIds": [
  1328. 1
  1329. ]
  1330. }
  1331. },
  1332. {
  1333. "watchAck": [
  1334. 3
  1335. ]
  1336. },
  1337. {
  1338. "watchCurrent": [
  1339. [
  1340. 3
  1341. ],
  1342. "resume-token-2001"
  1343. ],
  1344. "watchSnapshot": 2001,
  1345. "stateExpect": {
  1346. "limboDocs": [
  1347. "collection/c",
  1348. "collection/d"
  1349. ],
  1350. "activeTargets": {
  1351. "2": {
  1352. "query": {
  1353. "path": "collection",
  1354. "limit": 2,
  1355. "filters": [],
  1356. "orderBys": []
  1357. },
  1358. "resumeToken": ""
  1359. },
  1360. "4": {
  1361. "query": {
  1362. "path": "collection",
  1363. "filters": [],
  1364. "orderBys": []
  1365. },
  1366. "resumeToken": ""
  1367. },
  1368. "5": {
  1369. "query": {
  1370. "path": "collection/c",
  1371. "filters": [],
  1372. "orderBys": []
  1373. },
  1374. "resumeToken": ""
  1375. },
  1376. "7": {
  1377. "query": {
  1378. "path": "collection/d",
  1379. "filters": [],
  1380. "orderBys": []
  1381. },
  1382. "resumeToken": ""
  1383. }
  1384. }
  1385. },
  1386. "expect": [
  1387. {
  1388. "query": {
  1389. "path": "collection",
  1390. "filters": [],
  1391. "orderBys": []
  1392. },
  1393. "removed": [
  1394. [
  1395. "collection/b",
  1396. 1001,
  1397. {
  1398. "key": "b"
  1399. }
  1400. ]
  1401. ],
  1402. "errorCode": 0,
  1403. "fromCache": false,
  1404. "hasPendingWrites": false
  1405. },
  1406. {
  1407. "query": {
  1408. "path": "collection",
  1409. "limit": 2,
  1410. "filters": [],
  1411. "orderBys": []
  1412. },
  1413. "added": [
  1414. [
  1415. "collection/d",
  1416. 1003,
  1417. {
  1418. "key": "d"
  1419. }
  1420. ]
  1421. ],
  1422. "removed": [
  1423. [
  1424. "collection/b",
  1425. 1001,
  1426. {
  1427. "key": "b"
  1428. }
  1429. ]
  1430. ],
  1431. "errorCode": 0,
  1432. "fromCache": true,
  1433. "hasPendingWrites": false
  1434. }
  1435. ]
  1436. },
  1437. {
  1438. "watchRemove": {
  1439. "targetIds": [
  1440. 3
  1441. ]
  1442. }
  1443. },
  1444. {
  1445. "watchAck": [
  1446. 5
  1447. ]
  1448. },
  1449. {
  1450. "watchCurrent": [
  1451. [
  1452. 5
  1453. ],
  1454. "resume-token-2002"
  1455. ],
  1456. "watchSnapshot": 2002,
  1457. "stateExpect": {
  1458. "limboDocs": [
  1459. "collection/d"
  1460. ],
  1461. "activeTargets": {
  1462. "2": {
  1463. "query": {
  1464. "path": "collection",
  1465. "limit": 2,
  1466. "filters": [],
  1467. "orderBys": []
  1468. },
  1469. "resumeToken": ""
  1470. },
  1471. "4": {
  1472. "query": {
  1473. "path": "collection",
  1474. "filters": [],
  1475. "orderBys": []
  1476. },
  1477. "resumeToken": ""
  1478. },
  1479. "7": {
  1480. "query": {
  1481. "path": "collection/d",
  1482. "filters": [],
  1483. "orderBys": []
  1484. },
  1485. "resumeToken": ""
  1486. }
  1487. }
  1488. },
  1489. "expect": [
  1490. {
  1491. "query": {
  1492. "path": "collection",
  1493. "filters": [],
  1494. "orderBys": []
  1495. },
  1496. "removed": [
  1497. [
  1498. "collection/c",
  1499. 1002,
  1500. {
  1501. "key": "c"
  1502. }
  1503. ]
  1504. ],
  1505. "errorCode": 0,
  1506. "fromCache": false,
  1507. "hasPendingWrites": false
  1508. },
  1509. {
  1510. "query": {
  1511. "path": "collection",
  1512. "limit": 2,
  1513. "filters": [],
  1514. "orderBys": []
  1515. },
  1516. "added": [
  1517. [
  1518. "collection/e",
  1519. 1004,
  1520. {
  1521. "key": "e"
  1522. }
  1523. ]
  1524. ],
  1525. "removed": [
  1526. [
  1527. "collection/c",
  1528. 1002,
  1529. {
  1530. "key": "c"
  1531. }
  1532. ]
  1533. ],
  1534. "errorCode": 0,
  1535. "fromCache": true,
  1536. "hasPendingWrites": false
  1537. }
  1538. ]
  1539. },
  1540. {
  1541. "watchRemove": {
  1542. "targetIds": [
  1543. 5
  1544. ]
  1545. }
  1546. },
  1547. {
  1548. "watchAck": [
  1549. 7
  1550. ]
  1551. },
  1552. {
  1553. "watchCurrent": [
  1554. [
  1555. 7
  1556. ],
  1557. "resume-token-2003"
  1558. ],
  1559. "watchSnapshot": 2003,
  1560. "stateExpect": {
  1561. "limboDocs": [],
  1562. "activeTargets": {
  1563. "2": {
  1564. "query": {
  1565. "path": "collection",
  1566. "limit": 2,
  1567. "filters": [],
  1568. "orderBys": []
  1569. },
  1570. "resumeToken": ""
  1571. },
  1572. "4": {
  1573. "query": {
  1574. "path": "collection",
  1575. "filters": [],
  1576. "orderBys": []
  1577. },
  1578. "resumeToken": ""
  1579. }
  1580. }
  1581. },
  1582. "expect": [
  1583. {
  1584. "query": {
  1585. "path": "collection",
  1586. "filters": [],
  1587. "orderBys": []
  1588. },
  1589. "removed": [
  1590. [
  1591. "collection/d",
  1592. 1003,
  1593. {
  1594. "key": "d"
  1595. }
  1596. ]
  1597. ],
  1598. "errorCode": 0,
  1599. "fromCache": false,
  1600. "hasPendingWrites": false
  1601. },
  1602. {
  1603. "query": {
  1604. "path": "collection",
  1605. "limit": 2,
  1606. "filters": [],
  1607. "orderBys": []
  1608. },
  1609. "added": [
  1610. [
  1611. "collection/f",
  1612. 1005,
  1613. {
  1614. "key": "f"
  1615. }
  1616. ]
  1617. ],
  1618. "removed": [
  1619. [
  1620. "collection/d",
  1621. 1003,
  1622. {
  1623. "key": "d"
  1624. }
  1625. ]
  1626. ],
  1627. "errorCode": 0,
  1628. "fromCache": false,
  1629. "hasPendingWrites": false
  1630. }
  1631. ]
  1632. },
  1633. {
  1634. "watchRemove": {
  1635. "targetIds": [
  1636. 7
  1637. ]
  1638. }
  1639. }
  1640. ]
  1641. }
  1642. }