limit_spec_test.json 33 KB

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