limit_spec_test.json 34 KB

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