limit_spec_test.json 63 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773
  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. "numClients": 1
  9. },
  10. "steps": [
  11. {
  12. "userListen": [
  13. 2,
  14. {
  15. "path": "collection",
  16. "limit": 2,
  17. "filters": [],
  18. "orderBys": []
  19. }
  20. ],
  21. "stateExpect": {
  22. "activeTargets": {
  23. "2": {
  24. "query": {
  25. "path": "collection",
  26. "limit": 2,
  27. "filters": [],
  28. "orderBys": []
  29. },
  30. "resumeToken": ""
  31. }
  32. }
  33. }
  34. },
  35. {
  36. "watchAck": [
  37. 2
  38. ]
  39. },
  40. {
  41. "watchEntity": {
  42. "docs": [
  43. {
  44. "key": "collection/a",
  45. "version": 1000,
  46. "value": {
  47. "key": "a"
  48. },
  49. "options": {
  50. "hasLocalMutations": false,
  51. "hasCommittedMutations": false
  52. }
  53. },
  54. {
  55. "key": "collection/c",
  56. "version": 1001,
  57. "value": {
  58. "key": "c"
  59. },
  60. "options": {
  61. "hasLocalMutations": false,
  62. "hasCommittedMutations": false
  63. }
  64. }
  65. ],
  66. "targets": [
  67. 2
  68. ]
  69. }
  70. },
  71. {
  72. "watchCurrent": [
  73. [
  74. 2
  75. ],
  76. "resume-token-1001"
  77. ]
  78. },
  79. {
  80. "watchSnapshot": {
  81. "version": 1001,
  82. "targetIds": []
  83. },
  84. "expect": [
  85. {
  86. "query": {
  87. "path": "collection",
  88. "limit": 2,
  89. "filters": [],
  90. "orderBys": []
  91. },
  92. "added": [
  93. {
  94. "key": "collection/a",
  95. "version": 1000,
  96. "value": {
  97. "key": "a"
  98. },
  99. "options": {
  100. "hasLocalMutations": false,
  101. "hasCommittedMutations": false
  102. }
  103. },
  104. {
  105. "key": "collection/c",
  106. "version": 1001,
  107. "value": {
  108. "key": "c"
  109. },
  110. "options": {
  111. "hasLocalMutations": false,
  112. "hasCommittedMutations": false
  113. }
  114. }
  115. ],
  116. "errorCode": 0,
  117. "fromCache": false,
  118. "hasPendingWrites": false
  119. }
  120. ]
  121. },
  122. {
  123. "watchEntity": {
  124. "docs": [
  125. {
  126. "key": "collection/b",
  127. "version": 1002,
  128. "value": {
  129. "key": "b"
  130. },
  131. "options": {
  132. "hasLocalMutations": false,
  133. "hasCommittedMutations": false
  134. }
  135. }
  136. ],
  137. "targets": [
  138. 2
  139. ]
  140. }
  141. },
  142. {
  143. "watchEntity": {
  144. "docs": [
  145. {
  146. "key": "collection/c",
  147. "version": 1001,
  148. "value": {
  149. "key": "c"
  150. },
  151. "options": {
  152. "hasLocalMutations": false,
  153. "hasCommittedMutations": false
  154. }
  155. }
  156. ],
  157. "removedTargets": [
  158. 2
  159. ]
  160. }
  161. },
  162. {
  163. "watchSnapshot": {
  164. "version": 1002,
  165. "targetIds": []
  166. },
  167. "expect": [
  168. {
  169. "query": {
  170. "path": "collection",
  171. "limit": 2,
  172. "filters": [],
  173. "orderBys": []
  174. },
  175. "added": [
  176. {
  177. "key": "collection/b",
  178. "version": 1002,
  179. "value": {
  180. "key": "b"
  181. },
  182. "options": {
  183. "hasLocalMutations": false,
  184. "hasCommittedMutations": false
  185. }
  186. }
  187. ],
  188. "removed": [
  189. {
  190. "key": "collection/c",
  191. "version": 1001,
  192. "value": {
  193. "key": "c"
  194. },
  195. "options": {
  196. "hasLocalMutations": false,
  197. "hasCommittedMutations": false
  198. }
  199. }
  200. ],
  201. "errorCode": 0,
  202. "fromCache": false,
  203. "hasPendingWrites": false
  204. }
  205. ]
  206. }
  207. ]
  208. },
  209. "Documents outside of limit don't raise hasPendingWrites": {
  210. "describeName": "Limits:",
  211. "itName": "Documents outside of limit don't raise hasPendingWrites",
  212. "tags": [],
  213. "config": {
  214. "useGarbageCollection": false,
  215. "numClients": 1
  216. },
  217. "steps": [
  218. {
  219. "userListen": [
  220. 2,
  221. {
  222. "path": "collection",
  223. "limit": 2,
  224. "filters": [],
  225. "orderBys": []
  226. }
  227. ],
  228. "stateExpect": {
  229. "activeTargets": {
  230. "2": {
  231. "query": {
  232. "path": "collection",
  233. "limit": 2,
  234. "filters": [],
  235. "orderBys": []
  236. },
  237. "resumeToken": ""
  238. }
  239. }
  240. }
  241. },
  242. {
  243. "watchAck": [
  244. 2
  245. ]
  246. },
  247. {
  248. "watchEntity": {
  249. "docs": [
  250. {
  251. "key": "collection/a",
  252. "version": 1000,
  253. "value": {
  254. "key": "a"
  255. },
  256. "options": {
  257. "hasLocalMutations": false,
  258. "hasCommittedMutations": false
  259. }
  260. },
  261. {
  262. "key": "collection/b",
  263. "version": 1000,
  264. "value": {
  265. "key": "b"
  266. },
  267. "options": {
  268. "hasLocalMutations": false,
  269. "hasCommittedMutations": false
  270. }
  271. }
  272. ],
  273. "targets": [
  274. 2
  275. ]
  276. }
  277. },
  278. {
  279. "watchCurrent": [
  280. [
  281. 2
  282. ],
  283. "resume-token-1000"
  284. ]
  285. },
  286. {
  287. "watchSnapshot": {
  288. "version": 1000,
  289. "targetIds": []
  290. },
  291. "expect": [
  292. {
  293. "query": {
  294. "path": "collection",
  295. "limit": 2,
  296. "filters": [],
  297. "orderBys": []
  298. },
  299. "added": [
  300. {
  301. "key": "collection/a",
  302. "version": 1000,
  303. "value": {
  304. "key": "a"
  305. },
  306. "options": {
  307. "hasLocalMutations": false,
  308. "hasCommittedMutations": false
  309. }
  310. },
  311. {
  312. "key": "collection/b",
  313. "version": 1000,
  314. "value": {
  315. "key": "b"
  316. },
  317. "options": {
  318. "hasLocalMutations": false,
  319. "hasCommittedMutations": false
  320. }
  321. }
  322. ],
  323. "errorCode": 0,
  324. "fromCache": false,
  325. "hasPendingWrites": false
  326. }
  327. ]
  328. },
  329. {
  330. "userUnlisten": [
  331. 2,
  332. {
  333. "path": "collection",
  334. "limit": 2,
  335. "filters": [],
  336. "orderBys": []
  337. }
  338. ],
  339. "stateExpect": {
  340. "activeTargets": {}
  341. }
  342. },
  343. {
  344. "userSet": [
  345. "collection/c",
  346. {
  347. "key": "c"
  348. }
  349. ]
  350. },
  351. {
  352. "userListen": [
  353. 2,
  354. {
  355. "path": "collection",
  356. "limit": 2,
  357. "filters": [],
  358. "orderBys": []
  359. }
  360. ],
  361. "stateExpect": {
  362. "activeTargets": {
  363. "2": {
  364. "query": {
  365. "path": "collection",
  366. "limit": 2,
  367. "filters": [],
  368. "orderBys": []
  369. },
  370. "resumeToken": "resume-token-1000"
  371. }
  372. }
  373. },
  374. "expect": [
  375. {
  376. "query": {
  377. "path": "collection",
  378. "limit": 2,
  379. "filters": [],
  380. "orderBys": []
  381. },
  382. "added": [
  383. {
  384. "key": "collection/a",
  385. "version": 1000,
  386. "value": {
  387. "key": "a"
  388. },
  389. "options": {
  390. "hasLocalMutations": false,
  391. "hasCommittedMutations": false
  392. }
  393. },
  394. {
  395. "key": "collection/b",
  396. "version": 1000,
  397. "value": {
  398. "key": "b"
  399. },
  400. "options": {
  401. "hasLocalMutations": false,
  402. "hasCommittedMutations": false
  403. }
  404. }
  405. ],
  406. "errorCode": 0,
  407. "fromCache": true,
  408. "hasPendingWrites": false
  409. }
  410. ]
  411. }
  412. ]
  413. },
  414. "Deleted Document in limbo in full limit query": {
  415. "describeName": "Limits:",
  416. "itName": "Deleted Document in limbo in full limit query",
  417. "tags": [],
  418. "config": {
  419. "useGarbageCollection": true,
  420. "numClients": 1
  421. },
  422. "steps": [
  423. {
  424. "userListen": [
  425. 2,
  426. {
  427. "path": "collection",
  428. "limit": 2,
  429. "filters": [],
  430. "orderBys": []
  431. }
  432. ],
  433. "stateExpect": {
  434. "activeTargets": {
  435. "2": {
  436. "query": {
  437. "path": "collection",
  438. "limit": 2,
  439. "filters": [],
  440. "orderBys": []
  441. },
  442. "resumeToken": ""
  443. }
  444. }
  445. }
  446. },
  447. {
  448. "watchAck": [
  449. 2
  450. ]
  451. },
  452. {
  453. "watchEntity": {
  454. "docs": [
  455. {
  456. "key": "collection/a",
  457. "version": 1000,
  458. "value": {
  459. "key": "a"
  460. },
  461. "options": {
  462. "hasLocalMutations": false,
  463. "hasCommittedMutations": false
  464. }
  465. },
  466. {
  467. "key": "collection/b",
  468. "version": 1001,
  469. "value": {
  470. "key": "b"
  471. },
  472. "options": {
  473. "hasLocalMutations": false,
  474. "hasCommittedMutations": false
  475. }
  476. }
  477. ],
  478. "targets": [
  479. 2
  480. ]
  481. }
  482. },
  483. {
  484. "watchCurrent": [
  485. [
  486. 2
  487. ],
  488. "resume-token-1002"
  489. ]
  490. },
  491. {
  492. "watchSnapshot": {
  493. "version": 1002,
  494. "targetIds": []
  495. },
  496. "expect": [
  497. {
  498. "query": {
  499. "path": "collection",
  500. "limit": 2,
  501. "filters": [],
  502. "orderBys": []
  503. },
  504. "added": [
  505. {
  506. "key": "collection/a",
  507. "version": 1000,
  508. "value": {
  509. "key": "a"
  510. },
  511. "options": {
  512. "hasLocalMutations": false,
  513. "hasCommittedMutations": false
  514. }
  515. },
  516. {
  517. "key": "collection/b",
  518. "version": 1001,
  519. "value": {
  520. "key": "b"
  521. },
  522. "options": {
  523. "hasLocalMutations": false,
  524. "hasCommittedMutations": false
  525. }
  526. }
  527. ],
  528. "errorCode": 0,
  529. "fromCache": false,
  530. "hasPendingWrites": false
  531. }
  532. ]
  533. },
  534. {
  535. "watchReset": [
  536. 2
  537. ]
  538. },
  539. {
  540. "watchEntity": {
  541. "docs": [
  542. {
  543. "key": "collection/b",
  544. "version": 1001,
  545. "value": {
  546. "key": "b"
  547. },
  548. "options": {
  549. "hasLocalMutations": false,
  550. "hasCommittedMutations": false
  551. }
  552. },
  553. {
  554. "key": "collection/c",
  555. "version": 1002,
  556. "value": {
  557. "key": "c"
  558. },
  559. "options": {
  560. "hasLocalMutations": false,
  561. "hasCommittedMutations": false
  562. }
  563. }
  564. ],
  565. "targets": [
  566. 2
  567. ]
  568. }
  569. },
  570. {
  571. "watchCurrent": [
  572. [
  573. 2
  574. ],
  575. "resume-token-2000"
  576. ]
  577. },
  578. {
  579. "watchSnapshot": {
  580. "version": 2000,
  581. "targetIds": []
  582. },
  583. "stateExpect": {
  584. "limboDocs": [
  585. "collection/a"
  586. ],
  587. "activeTargets": {
  588. "1": {
  589. "query": {
  590. "path": "collection/a",
  591. "filters": [],
  592. "orderBys": []
  593. },
  594. "resumeToken": ""
  595. },
  596. "2": {
  597. "query": {
  598. "path": "collection",
  599. "limit": 2,
  600. "filters": [],
  601. "orderBys": []
  602. },
  603. "resumeToken": ""
  604. }
  605. }
  606. },
  607. "expect": [
  608. {
  609. "query": {
  610. "path": "collection",
  611. "limit": 2,
  612. "filters": [],
  613. "orderBys": []
  614. },
  615. "errorCode": 0,
  616. "fromCache": true,
  617. "hasPendingWrites": false
  618. }
  619. ]
  620. },
  621. {
  622. "watchAck": [
  623. 1
  624. ]
  625. },
  626. {
  627. "watchCurrent": [
  628. [
  629. 1
  630. ],
  631. "resume-token-2000"
  632. ]
  633. },
  634. {
  635. "watchSnapshot": {
  636. "version": 2000,
  637. "targetIds": []
  638. },
  639. "stateExpect": {
  640. "limboDocs": [],
  641. "activeTargets": {
  642. "2": {
  643. "query": {
  644. "path": "collection",
  645. "limit": 2,
  646. "filters": [],
  647. "orderBys": []
  648. },
  649. "resumeToken": ""
  650. }
  651. }
  652. },
  653. "expect": [
  654. {
  655. "query": {
  656. "path": "collection",
  657. "limit": 2,
  658. "filters": [],
  659. "orderBys": []
  660. },
  661. "added": [
  662. {
  663. "key": "collection/c",
  664. "version": 1002,
  665. "value": {
  666. "key": "c"
  667. },
  668. "options": {
  669. "hasLocalMutations": false,
  670. "hasCommittedMutations": false
  671. }
  672. }
  673. ],
  674. "removed": [
  675. {
  676. "key": "collection/a",
  677. "version": 1000,
  678. "value": {
  679. "key": "a"
  680. },
  681. "options": {
  682. "hasLocalMutations": false,
  683. "hasCommittedMutations": false
  684. }
  685. }
  686. ],
  687. "errorCode": 0,
  688. "fromCache": false,
  689. "hasPendingWrites": false
  690. }
  691. ]
  692. }
  693. ]
  694. },
  695. "Documents in limit can handle removed messages": {
  696. "describeName": "Limits:",
  697. "itName": "Documents in limit can handle removed messages",
  698. "tags": [],
  699. "config": {
  700. "useGarbageCollection": true,
  701. "numClients": 1
  702. },
  703. "steps": [
  704. {
  705. "userListen": [
  706. 2,
  707. {
  708. "path": "collection",
  709. "limit": 2,
  710. "filters": [],
  711. "orderBys": []
  712. }
  713. ],
  714. "stateExpect": {
  715. "activeTargets": {
  716. "2": {
  717. "query": {
  718. "path": "collection",
  719. "limit": 2,
  720. "filters": [],
  721. "orderBys": []
  722. },
  723. "resumeToken": ""
  724. }
  725. }
  726. }
  727. },
  728. {
  729. "watchAck": [
  730. 2
  731. ]
  732. },
  733. {
  734. "watchEntity": {
  735. "docs": [
  736. {
  737. "key": "collection/a",
  738. "version": 1000,
  739. "value": {
  740. "key": "a"
  741. },
  742. "options": {
  743. "hasLocalMutations": false,
  744. "hasCommittedMutations": false
  745. }
  746. },
  747. {
  748. "key": "collection/c",
  749. "version": 1001,
  750. "value": {
  751. "key": "c"
  752. },
  753. "options": {
  754. "hasLocalMutations": false,
  755. "hasCommittedMutations": false
  756. }
  757. }
  758. ],
  759. "targets": [
  760. 2
  761. ]
  762. }
  763. },
  764. {
  765. "watchCurrent": [
  766. [
  767. 2
  768. ],
  769. "resume-token-1001"
  770. ]
  771. },
  772. {
  773. "watchSnapshot": {
  774. "version": 1001,
  775. "targetIds": []
  776. },
  777. "expect": [
  778. {
  779. "query": {
  780. "path": "collection",
  781. "limit": 2,
  782. "filters": [],
  783. "orderBys": []
  784. },
  785. "added": [
  786. {
  787. "key": "collection/a",
  788. "version": 1000,
  789. "value": {
  790. "key": "a"
  791. },
  792. "options": {
  793. "hasLocalMutations": false,
  794. "hasCommittedMutations": false
  795. }
  796. },
  797. {
  798. "key": "collection/c",
  799. "version": 1001,
  800. "value": {
  801. "key": "c"
  802. },
  803. "options": {
  804. "hasLocalMutations": false,
  805. "hasCommittedMutations": false
  806. }
  807. }
  808. ],
  809. "errorCode": 0,
  810. "fromCache": false,
  811. "hasPendingWrites": false
  812. }
  813. ]
  814. },
  815. {
  816. "watchEntity": {
  817. "docs": [
  818. {
  819. "key": "collection/b",
  820. "version": 1002,
  821. "value": {
  822. "key": "b"
  823. },
  824. "options": {
  825. "hasLocalMutations": false,
  826. "hasCommittedMutations": false
  827. }
  828. }
  829. ],
  830. "targets": [
  831. 2
  832. ]
  833. }
  834. },
  835. {
  836. "watchEntity": {
  837. "key": "collection/c",
  838. "removedTargets": [
  839. 2
  840. ]
  841. }
  842. },
  843. {
  844. "watchSnapshot": {
  845. "version": 1002,
  846. "targetIds": []
  847. },
  848. "stateExpect": {
  849. "limboDocs": [],
  850. "activeTargets": {
  851. "2": {
  852. "query": {
  853. "path": "collection",
  854. "limit": 2,
  855. "filters": [],
  856. "orderBys": []
  857. },
  858. "resumeToken": ""
  859. }
  860. }
  861. },
  862. "expect": [
  863. {
  864. "query": {
  865. "path": "collection",
  866. "limit": 2,
  867. "filters": [],
  868. "orderBys": []
  869. },
  870. "added": [
  871. {
  872. "key": "collection/b",
  873. "version": 1002,
  874. "value": {
  875. "key": "b"
  876. },
  877. "options": {
  878. "hasLocalMutations": false,
  879. "hasCommittedMutations": false
  880. }
  881. }
  882. ],
  883. "removed": [
  884. {
  885. "key": "collection/c",
  886. "version": 1001,
  887. "value": {
  888. "key": "c"
  889. },
  890. "options": {
  891. "hasLocalMutations": false,
  892. "hasCommittedMutations": false
  893. }
  894. }
  895. ],
  896. "errorCode": 0,
  897. "fromCache": false,
  898. "hasPendingWrites": false
  899. }
  900. ]
  901. }
  902. ]
  903. },
  904. "Documents in limit are can handle removed messages for only one of many query": {
  905. "describeName": "Limits:",
  906. "itName": "Documents in limit are can handle removed messages for only one of many query",
  907. "tags": [],
  908. "config": {
  909. "useGarbageCollection": true,
  910. "numClients": 1
  911. },
  912. "steps": [
  913. {
  914. "userListen": [
  915. 2,
  916. {
  917. "path": "collection",
  918. "limit": 2,
  919. "filters": [],
  920. "orderBys": []
  921. }
  922. ],
  923. "stateExpect": {
  924. "activeTargets": {
  925. "2": {
  926. "query": {
  927. "path": "collection",
  928. "limit": 2,
  929. "filters": [],
  930. "orderBys": []
  931. },
  932. "resumeToken": ""
  933. }
  934. }
  935. }
  936. },
  937. {
  938. "userListen": [
  939. 4,
  940. {
  941. "path": "collection",
  942. "limit": 3,
  943. "filters": [],
  944. "orderBys": []
  945. }
  946. ],
  947. "stateExpect": {
  948. "activeTargets": {
  949. "2": {
  950. "query": {
  951. "path": "collection",
  952. "limit": 2,
  953. "filters": [],
  954. "orderBys": []
  955. },
  956. "resumeToken": ""
  957. },
  958. "4": {
  959. "query": {
  960. "path": "collection",
  961. "limit": 3,
  962. "filters": [],
  963. "orderBys": []
  964. },
  965. "resumeToken": ""
  966. }
  967. }
  968. }
  969. },
  970. {
  971. "watchAck": [
  972. 2
  973. ]
  974. },
  975. {
  976. "watchAck": [
  977. 4
  978. ]
  979. },
  980. {
  981. "watchEntity": {
  982. "docs": [
  983. {
  984. "key": "collection/a",
  985. "version": 1000,
  986. "value": {
  987. "key": "a"
  988. },
  989. "options": {
  990. "hasLocalMutations": false,
  991. "hasCommittedMutations": false
  992. }
  993. },
  994. {
  995. "key": "collection/c",
  996. "version": 1001,
  997. "value": {
  998. "key": "c"
  999. },
  1000. "options": {
  1001. "hasLocalMutations": false,
  1002. "hasCommittedMutations": false
  1003. }
  1004. }
  1005. ],
  1006. "targets": [
  1007. 2
  1008. ]
  1009. }
  1010. },
  1011. {
  1012. "watchEntity": {
  1013. "docs": [
  1014. {
  1015. "key": "collection/a",
  1016. "version": 1000,
  1017. "value": {
  1018. "key": "a"
  1019. },
  1020. "options": {
  1021. "hasLocalMutations": false,
  1022. "hasCommittedMutations": false
  1023. }
  1024. },
  1025. {
  1026. "key": "collection/c",
  1027. "version": 1001,
  1028. "value": {
  1029. "key": "c"
  1030. },
  1031. "options": {
  1032. "hasLocalMutations": false,
  1033. "hasCommittedMutations": false
  1034. }
  1035. }
  1036. ],
  1037. "targets": [
  1038. 4
  1039. ]
  1040. }
  1041. },
  1042. {
  1043. "watchCurrent": [
  1044. [
  1045. 2
  1046. ],
  1047. "resume-token-1001"
  1048. ]
  1049. },
  1050. {
  1051. "watchCurrent": [
  1052. [
  1053. 4
  1054. ],
  1055. "resume-token-1001"
  1056. ]
  1057. },
  1058. {
  1059. "watchSnapshot": {
  1060. "version": 1001,
  1061. "targetIds": []
  1062. },
  1063. "expect": [
  1064. {
  1065. "query": {
  1066. "path": "collection",
  1067. "limit": 2,
  1068. "filters": [],
  1069. "orderBys": []
  1070. },
  1071. "added": [
  1072. {
  1073. "key": "collection/a",
  1074. "version": 1000,
  1075. "value": {
  1076. "key": "a"
  1077. },
  1078. "options": {
  1079. "hasLocalMutations": false,
  1080. "hasCommittedMutations": false
  1081. }
  1082. },
  1083. {
  1084. "key": "collection/c",
  1085. "version": 1001,
  1086. "value": {
  1087. "key": "c"
  1088. },
  1089. "options": {
  1090. "hasLocalMutations": false,
  1091. "hasCommittedMutations": false
  1092. }
  1093. }
  1094. ],
  1095. "errorCode": 0,
  1096. "fromCache": false,
  1097. "hasPendingWrites": false
  1098. },
  1099. {
  1100. "query": {
  1101. "path": "collection",
  1102. "limit": 3,
  1103. "filters": [],
  1104. "orderBys": []
  1105. },
  1106. "added": [
  1107. {
  1108. "key": "collection/a",
  1109. "version": 1000,
  1110. "value": {
  1111. "key": "a"
  1112. },
  1113. "options": {
  1114. "hasLocalMutations": false,
  1115. "hasCommittedMutations": false
  1116. }
  1117. },
  1118. {
  1119. "key": "collection/c",
  1120. "version": 1001,
  1121. "value": {
  1122. "key": "c"
  1123. },
  1124. "options": {
  1125. "hasLocalMutations": false,
  1126. "hasCommittedMutations": false
  1127. }
  1128. }
  1129. ],
  1130. "errorCode": 0,
  1131. "fromCache": false,
  1132. "hasPendingWrites": false
  1133. }
  1134. ]
  1135. },
  1136. {
  1137. "watchEntity": {
  1138. "docs": [
  1139. {
  1140. "key": "collection/b",
  1141. "version": 1002,
  1142. "value": {
  1143. "key": "b"
  1144. },
  1145. "options": {
  1146. "hasLocalMutations": false,
  1147. "hasCommittedMutations": false
  1148. }
  1149. }
  1150. ],
  1151. "targets": [
  1152. 2,
  1153. 4
  1154. ]
  1155. }
  1156. },
  1157. {
  1158. "watchEntity": {
  1159. "key": "collection/c",
  1160. "removedTargets": [
  1161. 2
  1162. ]
  1163. }
  1164. },
  1165. {
  1166. "watchSnapshot": {
  1167. "version": 1002,
  1168. "targetIds": []
  1169. },
  1170. "stateExpect": {
  1171. "limboDocs": [],
  1172. "activeTargets": {
  1173. "2": {
  1174. "query": {
  1175. "path": "collection",
  1176. "limit": 2,
  1177. "filters": [],
  1178. "orderBys": []
  1179. },
  1180. "resumeToken": ""
  1181. },
  1182. "4": {
  1183. "query": {
  1184. "path": "collection",
  1185. "limit": 3,
  1186. "filters": [],
  1187. "orderBys": []
  1188. },
  1189. "resumeToken": ""
  1190. }
  1191. }
  1192. },
  1193. "expect": [
  1194. {
  1195. "query": {
  1196. "path": "collection",
  1197. "limit": 2,
  1198. "filters": [],
  1199. "orderBys": []
  1200. },
  1201. "added": [
  1202. {
  1203. "key": "collection/b",
  1204. "version": 1002,
  1205. "value": {
  1206. "key": "b"
  1207. },
  1208. "options": {
  1209. "hasLocalMutations": false,
  1210. "hasCommittedMutations": false
  1211. }
  1212. }
  1213. ],
  1214. "removed": [
  1215. {
  1216. "key": "collection/c",
  1217. "version": 1001,
  1218. "value": {
  1219. "key": "c"
  1220. },
  1221. "options": {
  1222. "hasLocalMutations": false,
  1223. "hasCommittedMutations": false
  1224. }
  1225. }
  1226. ],
  1227. "errorCode": 0,
  1228. "fromCache": false,
  1229. "hasPendingWrites": false
  1230. },
  1231. {
  1232. "query": {
  1233. "path": "collection",
  1234. "limit": 3,
  1235. "filters": [],
  1236. "orderBys": []
  1237. },
  1238. "added": [
  1239. {
  1240. "key": "collection/b",
  1241. "version": 1002,
  1242. "value": {
  1243. "key": "b"
  1244. },
  1245. "options": {
  1246. "hasLocalMutations": false,
  1247. "hasCommittedMutations": false
  1248. }
  1249. }
  1250. ],
  1251. "errorCode": 0,
  1252. "fromCache": false,
  1253. "hasPendingWrites": false
  1254. }
  1255. ]
  1256. }
  1257. ]
  1258. },
  1259. "Multiple docs in limbo in full limit query": {
  1260. "describeName": "Limits:",
  1261. "itName": "Multiple docs in limbo in full limit query",
  1262. "tags": [],
  1263. "config": {
  1264. "useGarbageCollection": true,
  1265. "numClients": 1
  1266. },
  1267. "steps": [
  1268. {
  1269. "userListen": [
  1270. 2,
  1271. {
  1272. "path": "collection",
  1273. "limit": 2,
  1274. "filters": [],
  1275. "orderBys": []
  1276. }
  1277. ],
  1278. "stateExpect": {
  1279. "activeTargets": {
  1280. "2": {
  1281. "query": {
  1282. "path": "collection",
  1283. "limit": 2,
  1284. "filters": [],
  1285. "orderBys": []
  1286. },
  1287. "resumeToken": ""
  1288. }
  1289. }
  1290. }
  1291. },
  1292. {
  1293. "watchAck": [
  1294. 2
  1295. ]
  1296. },
  1297. {
  1298. "watchEntity": {
  1299. "docs": [
  1300. {
  1301. "key": "collection/a",
  1302. "version": 1000,
  1303. "value": {
  1304. "key": "a"
  1305. },
  1306. "options": {
  1307. "hasLocalMutations": false,
  1308. "hasCommittedMutations": false
  1309. }
  1310. },
  1311. {
  1312. "key": "collection/b",
  1313. "version": 1001,
  1314. "value": {
  1315. "key": "b"
  1316. },
  1317. "options": {
  1318. "hasLocalMutations": false,
  1319. "hasCommittedMutations": false
  1320. }
  1321. }
  1322. ],
  1323. "targets": [
  1324. 2
  1325. ]
  1326. }
  1327. },
  1328. {
  1329. "watchCurrent": [
  1330. [
  1331. 2
  1332. ],
  1333. "resume-token-1001"
  1334. ]
  1335. },
  1336. {
  1337. "watchSnapshot": {
  1338. "version": 1001,
  1339. "targetIds": []
  1340. },
  1341. "expect": [
  1342. {
  1343. "query": {
  1344. "path": "collection",
  1345. "limit": 2,
  1346. "filters": [],
  1347. "orderBys": []
  1348. },
  1349. "added": [
  1350. {
  1351. "key": "collection/a",
  1352. "version": 1000,
  1353. "value": {
  1354. "key": "a"
  1355. },
  1356. "options": {
  1357. "hasLocalMutations": false,
  1358. "hasCommittedMutations": false
  1359. }
  1360. },
  1361. {
  1362. "key": "collection/b",
  1363. "version": 1001,
  1364. "value": {
  1365. "key": "b"
  1366. },
  1367. "options": {
  1368. "hasLocalMutations": false,
  1369. "hasCommittedMutations": false
  1370. }
  1371. }
  1372. ],
  1373. "errorCode": 0,
  1374. "fromCache": false,
  1375. "hasPendingWrites": false
  1376. }
  1377. ]
  1378. },
  1379. {
  1380. "userListen": [
  1381. 4,
  1382. {
  1383. "path": "collection",
  1384. "filters": [],
  1385. "orderBys": []
  1386. }
  1387. ],
  1388. "stateExpect": {
  1389. "activeTargets": {
  1390. "2": {
  1391. "query": {
  1392. "path": "collection",
  1393. "limit": 2,
  1394. "filters": [],
  1395. "orderBys": []
  1396. },
  1397. "resumeToken": ""
  1398. },
  1399. "4": {
  1400. "query": {
  1401. "path": "collection",
  1402. "filters": [],
  1403. "orderBys": []
  1404. },
  1405. "resumeToken": ""
  1406. }
  1407. }
  1408. },
  1409. "expect": [
  1410. {
  1411. "query": {
  1412. "path": "collection",
  1413. "filters": [],
  1414. "orderBys": []
  1415. },
  1416. "added": [
  1417. {
  1418. "key": "collection/a",
  1419. "version": 1000,
  1420. "value": {
  1421. "key": "a"
  1422. },
  1423. "options": {
  1424. "hasLocalMutations": false,
  1425. "hasCommittedMutations": false
  1426. }
  1427. },
  1428. {
  1429. "key": "collection/b",
  1430. "version": 1001,
  1431. "value": {
  1432. "key": "b"
  1433. },
  1434. "options": {
  1435. "hasLocalMutations": false,
  1436. "hasCommittedMutations": false
  1437. }
  1438. }
  1439. ],
  1440. "errorCode": 0,
  1441. "fromCache": true,
  1442. "hasPendingWrites": false
  1443. }
  1444. ]
  1445. },
  1446. {
  1447. "watchAck": [
  1448. 4
  1449. ]
  1450. },
  1451. {
  1452. "watchEntity": {
  1453. "docs": [
  1454. {
  1455. "key": "collection/a",
  1456. "version": 1000,
  1457. "value": {
  1458. "key": "a"
  1459. },
  1460. "options": {
  1461. "hasLocalMutations": false,
  1462. "hasCommittedMutations": false
  1463. }
  1464. },
  1465. {
  1466. "key": "collection/b",
  1467. "version": 1001,
  1468. "value": {
  1469. "key": "b"
  1470. },
  1471. "options": {
  1472. "hasLocalMutations": false,
  1473. "hasCommittedMutations": false
  1474. }
  1475. },
  1476. {
  1477. "key": "collection/c",
  1478. "version": 1002,
  1479. "value": {
  1480. "key": "c"
  1481. },
  1482. "options": {
  1483. "hasLocalMutations": false,
  1484. "hasCommittedMutations": false
  1485. }
  1486. },
  1487. {
  1488. "key": "collection/d",
  1489. "version": 1003,
  1490. "value": {
  1491. "key": "d"
  1492. },
  1493. "options": {
  1494. "hasLocalMutations": false,
  1495. "hasCommittedMutations": false
  1496. }
  1497. },
  1498. {
  1499. "key": "collection/e",
  1500. "version": 1004,
  1501. "value": {
  1502. "key": "e"
  1503. },
  1504. "options": {
  1505. "hasLocalMutations": false,
  1506. "hasCommittedMutations": false
  1507. }
  1508. },
  1509. {
  1510. "key": "collection/f",
  1511. "version": 1005,
  1512. "value": {
  1513. "key": "f"
  1514. },
  1515. "options": {
  1516. "hasLocalMutations": false,
  1517. "hasCommittedMutations": false
  1518. }
  1519. }
  1520. ],
  1521. "targets": [
  1522. 4
  1523. ]
  1524. }
  1525. },
  1526. {
  1527. "watchCurrent": [
  1528. [
  1529. 4
  1530. ],
  1531. "resume-token-1005"
  1532. ]
  1533. },
  1534. {
  1535. "watchSnapshot": {
  1536. "version": 1005,
  1537. "targetIds": []
  1538. },
  1539. "expect": [
  1540. {
  1541. "query": {
  1542. "path": "collection",
  1543. "filters": [],
  1544. "orderBys": []
  1545. },
  1546. "added": [
  1547. {
  1548. "key": "collection/c",
  1549. "version": 1002,
  1550. "value": {
  1551. "key": "c"
  1552. },
  1553. "options": {
  1554. "hasLocalMutations": false,
  1555. "hasCommittedMutations": false
  1556. }
  1557. },
  1558. {
  1559. "key": "collection/d",
  1560. "version": 1003,
  1561. "value": {
  1562. "key": "d"
  1563. },
  1564. "options": {
  1565. "hasLocalMutations": false,
  1566. "hasCommittedMutations": false
  1567. }
  1568. },
  1569. {
  1570. "key": "collection/e",
  1571. "version": 1004,
  1572. "value": {
  1573. "key": "e"
  1574. },
  1575. "options": {
  1576. "hasLocalMutations": false,
  1577. "hasCommittedMutations": false
  1578. }
  1579. },
  1580. {
  1581. "key": "collection/f",
  1582. "version": 1005,
  1583. "value": {
  1584. "key": "f"
  1585. },
  1586. "options": {
  1587. "hasLocalMutations": false,
  1588. "hasCommittedMutations": false
  1589. }
  1590. }
  1591. ],
  1592. "errorCode": 0,
  1593. "fromCache": false,
  1594. "hasPendingWrites": false
  1595. }
  1596. ]
  1597. },
  1598. {
  1599. "watchReset": [
  1600. 2
  1601. ]
  1602. },
  1603. {
  1604. "watchEntity": {
  1605. "docs": [
  1606. {
  1607. "key": "collection/e",
  1608. "version": 1004,
  1609. "value": {
  1610. "key": "e"
  1611. },
  1612. "options": {
  1613. "hasLocalMutations": false,
  1614. "hasCommittedMutations": false
  1615. }
  1616. },
  1617. {
  1618. "key": "collection/f",
  1619. "version": 1005,
  1620. "value": {
  1621. "key": "f"
  1622. },
  1623. "options": {
  1624. "hasLocalMutations": false,
  1625. "hasCommittedMutations": false
  1626. }
  1627. }
  1628. ],
  1629. "targets": [
  1630. 2
  1631. ]
  1632. }
  1633. },
  1634. {
  1635. "watchCurrent": [
  1636. [
  1637. 2
  1638. ],
  1639. "resume-token-2000"
  1640. ]
  1641. },
  1642. {
  1643. "watchSnapshot": {
  1644. "version": 2000,
  1645. "targetIds": []
  1646. },
  1647. "stateExpect": {
  1648. "limboDocs": [
  1649. "collection/a",
  1650. "collection/b"
  1651. ],
  1652. "activeTargets": {
  1653. "1": {
  1654. "query": {
  1655. "path": "collection/a",
  1656. "filters": [],
  1657. "orderBys": []
  1658. },
  1659. "resumeToken": ""
  1660. },
  1661. "2": {
  1662. "query": {
  1663. "path": "collection",
  1664. "limit": 2,
  1665. "filters": [],
  1666. "orderBys": []
  1667. },
  1668. "resumeToken": ""
  1669. },
  1670. "3": {
  1671. "query": {
  1672. "path": "collection/b",
  1673. "filters": [],
  1674. "orderBys": []
  1675. },
  1676. "resumeToken": ""
  1677. },
  1678. "4": {
  1679. "query": {
  1680. "path": "collection",
  1681. "filters": [],
  1682. "orderBys": []
  1683. },
  1684. "resumeToken": ""
  1685. }
  1686. }
  1687. },
  1688. "expect": [
  1689. {
  1690. "query": {
  1691. "path": "collection",
  1692. "limit": 2,
  1693. "filters": [],
  1694. "orderBys": []
  1695. },
  1696. "errorCode": 0,
  1697. "fromCache": true,
  1698. "hasPendingWrites": false
  1699. }
  1700. ]
  1701. },
  1702. {
  1703. "watchAck": [
  1704. 1
  1705. ]
  1706. },
  1707. {
  1708. "watchCurrent": [
  1709. [
  1710. 1
  1711. ],
  1712. "resume-token-2000"
  1713. ]
  1714. },
  1715. {
  1716. "watchSnapshot": {
  1717. "version": 2000,
  1718. "targetIds": []
  1719. },
  1720. "stateExpect": {
  1721. "limboDocs": [
  1722. "collection/b",
  1723. "collection/c"
  1724. ],
  1725. "activeTargets": {
  1726. "2": {
  1727. "query": {
  1728. "path": "collection",
  1729. "limit": 2,
  1730. "filters": [],
  1731. "orderBys": []
  1732. },
  1733. "resumeToken": ""
  1734. },
  1735. "3": {
  1736. "query": {
  1737. "path": "collection/b",
  1738. "filters": [],
  1739. "orderBys": []
  1740. },
  1741. "resumeToken": ""
  1742. },
  1743. "4": {
  1744. "query": {
  1745. "path": "collection",
  1746. "filters": [],
  1747. "orderBys": []
  1748. },
  1749. "resumeToken": ""
  1750. },
  1751. "5": {
  1752. "query": {
  1753. "path": "collection/c",
  1754. "filters": [],
  1755. "orderBys": []
  1756. },
  1757. "resumeToken": ""
  1758. }
  1759. }
  1760. },
  1761. "expect": [
  1762. {
  1763. "query": {
  1764. "path": "collection",
  1765. "filters": [],
  1766. "orderBys": []
  1767. },
  1768. "removed": [
  1769. {
  1770. "key": "collection/a",
  1771. "version": 1000,
  1772. "value": {
  1773. "key": "a"
  1774. },
  1775. "options": {
  1776. "hasLocalMutations": false,
  1777. "hasCommittedMutations": false
  1778. }
  1779. }
  1780. ],
  1781. "errorCode": 0,
  1782. "fromCache": false,
  1783. "hasPendingWrites": false
  1784. },
  1785. {
  1786. "query": {
  1787. "path": "collection",
  1788. "limit": 2,
  1789. "filters": [],
  1790. "orderBys": []
  1791. },
  1792. "added": [
  1793. {
  1794. "key": "collection/c",
  1795. "version": 1002,
  1796. "value": {
  1797. "key": "c"
  1798. },
  1799. "options": {
  1800. "hasLocalMutations": false,
  1801. "hasCommittedMutations": false
  1802. }
  1803. }
  1804. ],
  1805. "removed": [
  1806. {
  1807. "key": "collection/a",
  1808. "version": 1000,
  1809. "value": {
  1810. "key": "a"
  1811. },
  1812. "options": {
  1813. "hasLocalMutations": false,
  1814. "hasCommittedMutations": false
  1815. }
  1816. }
  1817. ],
  1818. "errorCode": 0,
  1819. "fromCache": true,
  1820. "hasPendingWrites": false
  1821. }
  1822. ]
  1823. },
  1824. {
  1825. "watchRemove": {
  1826. "targetIds": [
  1827. 1
  1828. ]
  1829. }
  1830. },
  1831. {
  1832. "watchAck": [
  1833. 3
  1834. ]
  1835. },
  1836. {
  1837. "watchCurrent": [
  1838. [
  1839. 3
  1840. ],
  1841. "resume-token-2001"
  1842. ]
  1843. },
  1844. {
  1845. "watchSnapshot": {
  1846. "version": 2001,
  1847. "targetIds": []
  1848. },
  1849. "stateExpect": {
  1850. "limboDocs": [
  1851. "collection/c",
  1852. "collection/d"
  1853. ],
  1854. "activeTargets": {
  1855. "2": {
  1856. "query": {
  1857. "path": "collection",
  1858. "limit": 2,
  1859. "filters": [],
  1860. "orderBys": []
  1861. },
  1862. "resumeToken": ""
  1863. },
  1864. "4": {
  1865. "query": {
  1866. "path": "collection",
  1867. "filters": [],
  1868. "orderBys": []
  1869. },
  1870. "resumeToken": ""
  1871. },
  1872. "5": {
  1873. "query": {
  1874. "path": "collection/c",
  1875. "filters": [],
  1876. "orderBys": []
  1877. },
  1878. "resumeToken": ""
  1879. },
  1880. "7": {
  1881. "query": {
  1882. "path": "collection/d",
  1883. "filters": [],
  1884. "orderBys": []
  1885. },
  1886. "resumeToken": ""
  1887. }
  1888. }
  1889. },
  1890. "expect": [
  1891. {
  1892. "query": {
  1893. "path": "collection",
  1894. "filters": [],
  1895. "orderBys": []
  1896. },
  1897. "removed": [
  1898. {
  1899. "key": "collection/b",
  1900. "version": 1001,
  1901. "value": {
  1902. "key": "b"
  1903. },
  1904. "options": {
  1905. "hasLocalMutations": false,
  1906. "hasCommittedMutations": false
  1907. }
  1908. }
  1909. ],
  1910. "errorCode": 0,
  1911. "fromCache": false,
  1912. "hasPendingWrites": false
  1913. },
  1914. {
  1915. "query": {
  1916. "path": "collection",
  1917. "limit": 2,
  1918. "filters": [],
  1919. "orderBys": []
  1920. },
  1921. "added": [
  1922. {
  1923. "key": "collection/d",
  1924. "version": 1003,
  1925. "value": {
  1926. "key": "d"
  1927. },
  1928. "options": {
  1929. "hasLocalMutations": false,
  1930. "hasCommittedMutations": false
  1931. }
  1932. }
  1933. ],
  1934. "removed": [
  1935. {
  1936. "key": "collection/b",
  1937. "version": 1001,
  1938. "value": {
  1939. "key": "b"
  1940. },
  1941. "options": {
  1942. "hasLocalMutations": false,
  1943. "hasCommittedMutations": false
  1944. }
  1945. }
  1946. ],
  1947. "errorCode": 0,
  1948. "fromCache": true,
  1949. "hasPendingWrites": false
  1950. }
  1951. ]
  1952. },
  1953. {
  1954. "watchRemove": {
  1955. "targetIds": [
  1956. 3
  1957. ]
  1958. }
  1959. },
  1960. {
  1961. "watchAck": [
  1962. 5
  1963. ]
  1964. },
  1965. {
  1966. "watchCurrent": [
  1967. [
  1968. 5
  1969. ],
  1970. "resume-token-2002"
  1971. ]
  1972. },
  1973. {
  1974. "watchSnapshot": {
  1975. "version": 2002,
  1976. "targetIds": []
  1977. },
  1978. "stateExpect": {
  1979. "limboDocs": [
  1980. "collection/d"
  1981. ],
  1982. "activeTargets": {
  1983. "2": {
  1984. "query": {
  1985. "path": "collection",
  1986. "limit": 2,
  1987. "filters": [],
  1988. "orderBys": []
  1989. },
  1990. "resumeToken": ""
  1991. },
  1992. "4": {
  1993. "query": {
  1994. "path": "collection",
  1995. "filters": [],
  1996. "orderBys": []
  1997. },
  1998. "resumeToken": ""
  1999. },
  2000. "7": {
  2001. "query": {
  2002. "path": "collection/d",
  2003. "filters": [],
  2004. "orderBys": []
  2005. },
  2006. "resumeToken": ""
  2007. }
  2008. }
  2009. },
  2010. "expect": [
  2011. {
  2012. "query": {
  2013. "path": "collection",
  2014. "filters": [],
  2015. "orderBys": []
  2016. },
  2017. "removed": [
  2018. {
  2019. "key": "collection/c",
  2020. "version": 1002,
  2021. "value": {
  2022. "key": "c"
  2023. },
  2024. "options": {
  2025. "hasLocalMutations": false,
  2026. "hasCommittedMutations": false
  2027. }
  2028. }
  2029. ],
  2030. "errorCode": 0,
  2031. "fromCache": false,
  2032. "hasPendingWrites": false
  2033. },
  2034. {
  2035. "query": {
  2036. "path": "collection",
  2037. "limit": 2,
  2038. "filters": [],
  2039. "orderBys": []
  2040. },
  2041. "added": [
  2042. {
  2043. "key": "collection/e",
  2044. "version": 1004,
  2045. "value": {
  2046. "key": "e"
  2047. },
  2048. "options": {
  2049. "hasLocalMutations": false,
  2050. "hasCommittedMutations": false
  2051. }
  2052. }
  2053. ],
  2054. "removed": [
  2055. {
  2056. "key": "collection/c",
  2057. "version": 1002,
  2058. "value": {
  2059. "key": "c"
  2060. },
  2061. "options": {
  2062. "hasLocalMutations": false,
  2063. "hasCommittedMutations": false
  2064. }
  2065. }
  2066. ],
  2067. "errorCode": 0,
  2068. "fromCache": true,
  2069. "hasPendingWrites": false
  2070. }
  2071. ]
  2072. },
  2073. {
  2074. "watchRemove": {
  2075. "targetIds": [
  2076. 5
  2077. ]
  2078. }
  2079. },
  2080. {
  2081. "watchAck": [
  2082. 7
  2083. ]
  2084. },
  2085. {
  2086. "watchCurrent": [
  2087. [
  2088. 7
  2089. ],
  2090. "resume-token-2003"
  2091. ]
  2092. },
  2093. {
  2094. "watchSnapshot": {
  2095. "version": 2003,
  2096. "targetIds": []
  2097. },
  2098. "stateExpect": {
  2099. "limboDocs": [],
  2100. "activeTargets": {
  2101. "2": {
  2102. "query": {
  2103. "path": "collection",
  2104. "limit": 2,
  2105. "filters": [],
  2106. "orderBys": []
  2107. },
  2108. "resumeToken": ""
  2109. },
  2110. "4": {
  2111. "query": {
  2112. "path": "collection",
  2113. "filters": [],
  2114. "orderBys": []
  2115. },
  2116. "resumeToken": ""
  2117. }
  2118. }
  2119. },
  2120. "expect": [
  2121. {
  2122. "query": {
  2123. "path": "collection",
  2124. "filters": [],
  2125. "orderBys": []
  2126. },
  2127. "removed": [
  2128. {
  2129. "key": "collection/d",
  2130. "version": 1003,
  2131. "value": {
  2132. "key": "d"
  2133. },
  2134. "options": {
  2135. "hasLocalMutations": false,
  2136. "hasCommittedMutations": false
  2137. }
  2138. }
  2139. ],
  2140. "errorCode": 0,
  2141. "fromCache": false,
  2142. "hasPendingWrites": false
  2143. },
  2144. {
  2145. "query": {
  2146. "path": "collection",
  2147. "limit": 2,
  2148. "filters": [],
  2149. "orderBys": []
  2150. },
  2151. "added": [
  2152. {
  2153. "key": "collection/f",
  2154. "version": 1005,
  2155. "value": {
  2156. "key": "f"
  2157. },
  2158. "options": {
  2159. "hasLocalMutations": false,
  2160. "hasCommittedMutations": false
  2161. }
  2162. }
  2163. ],
  2164. "removed": [
  2165. {
  2166. "key": "collection/d",
  2167. "version": 1003,
  2168. "value": {
  2169. "key": "d"
  2170. },
  2171. "options": {
  2172. "hasLocalMutations": false,
  2173. "hasCommittedMutations": false
  2174. }
  2175. }
  2176. ],
  2177. "errorCode": 0,
  2178. "fromCache": false,
  2179. "hasPendingWrites": false
  2180. }
  2181. ]
  2182. },
  2183. {
  2184. "watchRemove": {
  2185. "targetIds": [
  2186. 7
  2187. ]
  2188. }
  2189. }
  2190. ]
  2191. },
  2192. "Limit query is refilled by primary client": {
  2193. "describeName": "Limits:",
  2194. "itName": "Limit query is refilled by primary client",
  2195. "tags": [
  2196. "multi-client"
  2197. ],
  2198. "config": {
  2199. "useGarbageCollection": false,
  2200. "numClients": 2
  2201. },
  2202. "steps": [
  2203. {
  2204. "drainQueue": true,
  2205. "clientIndex": 0
  2206. },
  2207. {
  2208. "applyClientState": {
  2209. "visibility": "visible"
  2210. },
  2211. "clientIndex": 0
  2212. },
  2213. {
  2214. "drainQueue": true,
  2215. "clientIndex": 1
  2216. },
  2217. {
  2218. "userListen": [
  2219. 2,
  2220. {
  2221. "path": "collection",
  2222. "limit": 2,
  2223. "filters": [],
  2224. "orderBys": []
  2225. }
  2226. ],
  2227. "stateExpect": {
  2228. "activeTargets": {
  2229. "2": {
  2230. "query": {
  2231. "path": "collection",
  2232. "limit": 2,
  2233. "filters": [],
  2234. "orderBys": []
  2235. },
  2236. "resumeToken": ""
  2237. }
  2238. }
  2239. },
  2240. "clientIndex": 1
  2241. },
  2242. {
  2243. "drainQueue": true,
  2244. "stateExpect": {
  2245. "activeTargets": {
  2246. "2": {
  2247. "query": {
  2248. "path": "collection",
  2249. "limit": 2,
  2250. "filters": [],
  2251. "orderBys": []
  2252. },
  2253. "resumeToken": ""
  2254. }
  2255. }
  2256. },
  2257. "clientIndex": 0
  2258. },
  2259. {
  2260. "watchAck": [
  2261. 2
  2262. ],
  2263. "clientIndex": 0
  2264. },
  2265. {
  2266. "watchEntity": {
  2267. "docs": [
  2268. {
  2269. "key": "collection/a",
  2270. "version": 1000,
  2271. "value": {
  2272. "key": "a"
  2273. },
  2274. "options": {
  2275. "hasLocalMutations": false,
  2276. "hasCommittedMutations": false
  2277. }
  2278. },
  2279. {
  2280. "key": "collection/c",
  2281. "version": 1001,
  2282. "value": {
  2283. "key": "c"
  2284. },
  2285. "options": {
  2286. "hasLocalMutations": false,
  2287. "hasCommittedMutations": false
  2288. }
  2289. }
  2290. ],
  2291. "targets": [
  2292. 2
  2293. ]
  2294. },
  2295. "clientIndex": 0
  2296. },
  2297. {
  2298. "watchCurrent": [
  2299. [
  2300. 2
  2301. ],
  2302. "resume-token-1001"
  2303. ],
  2304. "clientIndex": 0
  2305. },
  2306. {
  2307. "watchSnapshot": {
  2308. "version": 1001,
  2309. "targetIds": []
  2310. },
  2311. "clientIndex": 0
  2312. },
  2313. {
  2314. "drainQueue": true,
  2315. "expect": [
  2316. {
  2317. "query": {
  2318. "path": "collection",
  2319. "limit": 2,
  2320. "filters": [],
  2321. "orderBys": []
  2322. },
  2323. "added": [
  2324. {
  2325. "key": "collection/a",
  2326. "version": 1000,
  2327. "value": {
  2328. "key": "a"
  2329. },
  2330. "options": {
  2331. "hasLocalMutations": false,
  2332. "hasCommittedMutations": false
  2333. }
  2334. },
  2335. {
  2336. "key": "collection/c",
  2337. "version": 1001,
  2338. "value": {
  2339. "key": "c"
  2340. },
  2341. "options": {
  2342. "hasLocalMutations": false,
  2343. "hasCommittedMutations": false
  2344. }
  2345. }
  2346. ],
  2347. "errorCode": 0,
  2348. "fromCache": false,
  2349. "hasPendingWrites": false
  2350. }
  2351. ],
  2352. "clientIndex": 1
  2353. },
  2354. {
  2355. "drainQueue": true,
  2356. "clientIndex": 0
  2357. },
  2358. {
  2359. "watchEntity": {
  2360. "docs": [
  2361. {
  2362. "key": "collection/b",
  2363. "version": 1002,
  2364. "value": {
  2365. "key": "b"
  2366. },
  2367. "options": {
  2368. "hasLocalMutations": false,
  2369. "hasCommittedMutations": false
  2370. }
  2371. }
  2372. ],
  2373. "targets": [
  2374. 2
  2375. ]
  2376. },
  2377. "clientIndex": 0
  2378. },
  2379. {
  2380. "watchEntity": {
  2381. "docs": [
  2382. {
  2383. "key": "collection/c",
  2384. "version": 1001,
  2385. "value": {
  2386. "key": "c"
  2387. },
  2388. "options": {
  2389. "hasLocalMutations": false,
  2390. "hasCommittedMutations": false
  2391. }
  2392. }
  2393. ],
  2394. "removedTargets": [
  2395. 2
  2396. ]
  2397. },
  2398. "clientIndex": 0
  2399. },
  2400. {
  2401. "watchSnapshot": {
  2402. "version": 1002,
  2403. "targetIds": []
  2404. },
  2405. "clientIndex": 0
  2406. },
  2407. {
  2408. "drainQueue": true,
  2409. "expect": [
  2410. {
  2411. "query": {
  2412. "path": "collection",
  2413. "limit": 2,
  2414. "filters": [],
  2415. "orderBys": []
  2416. },
  2417. "added": [
  2418. {
  2419. "key": "collection/b",
  2420. "version": 1002,
  2421. "value": {
  2422. "key": "b"
  2423. },
  2424. "options": {
  2425. "hasLocalMutations": false,
  2426. "hasCommittedMutations": false
  2427. }
  2428. }
  2429. ],
  2430. "removed": [
  2431. {
  2432. "key": "collection/c",
  2433. "version": 1001,
  2434. "value": {
  2435. "key": "c"
  2436. },
  2437. "options": {
  2438. "hasLocalMutations": false,
  2439. "hasCommittedMutations": false
  2440. }
  2441. }
  2442. ],
  2443. "errorCode": 0,
  2444. "fromCache": false,
  2445. "hasPendingWrites": false
  2446. }
  2447. ],
  2448. "clientIndex": 1
  2449. }
  2450. ]
  2451. },
  2452. "Limit query includes write from secondary client ": {
  2453. "describeName": "Limits:",
  2454. "itName": "Limit query includes write from secondary client ",
  2455. "tags": [
  2456. "multi-client"
  2457. ],
  2458. "config": {
  2459. "useGarbageCollection": false,
  2460. "numClients": 3
  2461. },
  2462. "steps": [
  2463. {
  2464. "drainQueue": true,
  2465. "clientIndex": 0
  2466. },
  2467. {
  2468. "applyClientState": {
  2469. "visibility": "visible"
  2470. },
  2471. "clientIndex": 0
  2472. },
  2473. {
  2474. "drainQueue": true,
  2475. "clientIndex": 1
  2476. },
  2477. {
  2478. "userListen": [
  2479. 2,
  2480. {
  2481. "path": "collection",
  2482. "limit": 2,
  2483. "filters": [],
  2484. "orderBys": []
  2485. }
  2486. ],
  2487. "stateExpect": {
  2488. "activeTargets": {
  2489. "2": {
  2490. "query": {
  2491. "path": "collection",
  2492. "limit": 2,
  2493. "filters": [],
  2494. "orderBys": []
  2495. },
  2496. "resumeToken": ""
  2497. }
  2498. }
  2499. },
  2500. "clientIndex": 1
  2501. },
  2502. {
  2503. "drainQueue": true,
  2504. "stateExpect": {
  2505. "activeTargets": {
  2506. "2": {
  2507. "query": {
  2508. "path": "collection",
  2509. "limit": 2,
  2510. "filters": [],
  2511. "orderBys": []
  2512. },
  2513. "resumeToken": ""
  2514. }
  2515. }
  2516. },
  2517. "clientIndex": 0
  2518. },
  2519. {
  2520. "watchAck": [
  2521. 2
  2522. ],
  2523. "clientIndex": 0
  2524. },
  2525. {
  2526. "watchEntity": {
  2527. "docs": [
  2528. {
  2529. "key": "collection/b",
  2530. "version": 1001,
  2531. "value": {
  2532. "key": "b"
  2533. },
  2534. "options": {
  2535. "hasLocalMutations": false,
  2536. "hasCommittedMutations": false
  2537. }
  2538. },
  2539. {
  2540. "key": "collection/c",
  2541. "version": 1002,
  2542. "value": {
  2543. "key": "c"
  2544. },
  2545. "options": {
  2546. "hasLocalMutations": false,
  2547. "hasCommittedMutations": false
  2548. }
  2549. }
  2550. ],
  2551. "targets": [
  2552. 2
  2553. ]
  2554. },
  2555. "clientIndex": 0
  2556. },
  2557. {
  2558. "watchCurrent": [
  2559. [
  2560. 2
  2561. ],
  2562. "resume-token-1002"
  2563. ],
  2564. "clientIndex": 0
  2565. },
  2566. {
  2567. "watchSnapshot": {
  2568. "version": 1002,
  2569. "targetIds": []
  2570. },
  2571. "clientIndex": 0
  2572. },
  2573. {
  2574. "drainQueue": true,
  2575. "expect": [
  2576. {
  2577. "query": {
  2578. "path": "collection",
  2579. "limit": 2,
  2580. "filters": [],
  2581. "orderBys": []
  2582. },
  2583. "added": [
  2584. {
  2585. "key": "collection/b",
  2586. "version": 1001,
  2587. "value": {
  2588. "key": "b"
  2589. },
  2590. "options": {
  2591. "hasLocalMutations": false,
  2592. "hasCommittedMutations": false
  2593. }
  2594. },
  2595. {
  2596. "key": "collection/c",
  2597. "version": 1002,
  2598. "value": {
  2599. "key": "c"
  2600. },
  2601. "options": {
  2602. "hasLocalMutations": false,
  2603. "hasCommittedMutations": false
  2604. }
  2605. }
  2606. ],
  2607. "errorCode": 0,
  2608. "fromCache": false,
  2609. "hasPendingWrites": false
  2610. }
  2611. ],
  2612. "clientIndex": 1
  2613. },
  2614. {
  2615. "drainQueue": true,
  2616. "clientIndex": 2
  2617. },
  2618. {
  2619. "userSet": [
  2620. "collection/a",
  2621. {
  2622. "key": "a"
  2623. }
  2624. ],
  2625. "clientIndex": 2
  2626. },
  2627. {
  2628. "drainQueue": true,
  2629. "expect": [
  2630. {
  2631. "query": {
  2632. "path": "collection",
  2633. "limit": 2,
  2634. "filters": [],
  2635. "orderBys": []
  2636. },
  2637. "added": [
  2638. {
  2639. "key": "collection/a",
  2640. "version": 0,
  2641. "value": {
  2642. "key": "a"
  2643. },
  2644. "options": {
  2645. "hasLocalMutations": true,
  2646. "hasCommittedMutations": false
  2647. }
  2648. }
  2649. ],
  2650. "removed": [
  2651. {
  2652. "key": "collection/c",
  2653. "version": 1002,
  2654. "value": {
  2655. "key": "c"
  2656. },
  2657. "options": {
  2658. "hasLocalMutations": false,
  2659. "hasCommittedMutations": false
  2660. }
  2661. }
  2662. ],
  2663. "errorCode": 0,
  2664. "fromCache": false,
  2665. "hasPendingWrites": true
  2666. }
  2667. ],
  2668. "clientIndex": 1
  2669. },
  2670. {
  2671. "drainQueue": true,
  2672. "clientIndex": 0
  2673. },
  2674. {
  2675. "writeAck": {
  2676. "version": 1003
  2677. },
  2678. "clientIndex": 0
  2679. },
  2680. {
  2681. "watchEntity": {
  2682. "docs": [
  2683. {
  2684. "key": "collection/a",
  2685. "version": 1003,
  2686. "value": {
  2687. "key": "a"
  2688. },
  2689. "options": {
  2690. "hasLocalMutations": false,
  2691. "hasCommittedMutations": false
  2692. }
  2693. }
  2694. ],
  2695. "targets": [
  2696. 2
  2697. ]
  2698. },
  2699. "clientIndex": 0
  2700. },
  2701. {
  2702. "watchEntity": {
  2703. "docs": [
  2704. {
  2705. "key": "collection/c",
  2706. "version": 1002,
  2707. "value": {
  2708. "key": "c"
  2709. },
  2710. "options": {
  2711. "hasLocalMutations": false,
  2712. "hasCommittedMutations": false
  2713. }
  2714. }
  2715. ],
  2716. "removedTargets": [
  2717. 2
  2718. ]
  2719. },
  2720. "clientIndex": 0
  2721. },
  2722. {
  2723. "watchSnapshot": {
  2724. "version": 1003,
  2725. "targetIds": []
  2726. },
  2727. "clientIndex": 0
  2728. },
  2729. {
  2730. "drainQueue": true,
  2731. "expect": [
  2732. {
  2733. "query": {
  2734. "path": "collection",
  2735. "limit": 2,
  2736. "filters": [],
  2737. "orderBys": []
  2738. },
  2739. "metadata": [
  2740. {
  2741. "key": "collection/a",
  2742. "version": 1003,
  2743. "value": {
  2744. "key": "a"
  2745. },
  2746. "options": {
  2747. "hasLocalMutations": false,
  2748. "hasCommittedMutations": false
  2749. }
  2750. }
  2751. ],
  2752. "errorCode": 0,
  2753. "fromCache": false,
  2754. "hasPendingWrites": false
  2755. }
  2756. ],
  2757. "clientIndex": 1
  2758. },
  2759. {
  2760. "drainQueue": true,
  2761. "stateExpect": {
  2762. "userCallbacks": {
  2763. "acknowledgedDocs": [
  2764. "collection/a"
  2765. ],
  2766. "rejectedDocs": []
  2767. }
  2768. },
  2769. "clientIndex": 2
  2770. }
  2771. ]
  2772. }
  2773. }