limit_spec_test.json 70 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083
  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. "Limits are re-filled from cache": {
  1260. "describeName": "Limits:",
  1261. "itName": "Limits are re-filled from cache",
  1262. "tags": [],
  1263. "config": {
  1264. "useGarbageCollection": false,
  1265. "numClients": 1
  1266. },
  1267. "steps": [
  1268. {
  1269. "userListen": [
  1270. 2,
  1271. {
  1272. "path": "collection",
  1273. "filters": [
  1274. [
  1275. "matches",
  1276. "==",
  1277. true
  1278. ]
  1279. ],
  1280. "orderBys": []
  1281. }
  1282. ],
  1283. "stateExpect": {
  1284. "activeTargets": {
  1285. "2": {
  1286. "query": {
  1287. "path": "collection",
  1288. "filters": [
  1289. [
  1290. "matches",
  1291. "==",
  1292. true
  1293. ]
  1294. ],
  1295. "orderBys": []
  1296. },
  1297. "resumeToken": ""
  1298. }
  1299. }
  1300. }
  1301. },
  1302. {
  1303. "watchAck": [
  1304. 2
  1305. ]
  1306. },
  1307. {
  1308. "watchEntity": {
  1309. "docs": [
  1310. {
  1311. "key": "collection/a",
  1312. "version": 1001,
  1313. "value": {
  1314. "matches": true
  1315. },
  1316. "options": {
  1317. "hasLocalMutations": false,
  1318. "hasCommittedMutations": false
  1319. }
  1320. },
  1321. {
  1322. "key": "collection/b",
  1323. "version": 1002,
  1324. "value": {
  1325. "matches": true
  1326. },
  1327. "options": {
  1328. "hasLocalMutations": false,
  1329. "hasCommittedMutations": false
  1330. }
  1331. },
  1332. {
  1333. "key": "collection/c",
  1334. "version": 1000,
  1335. "value": {
  1336. "matches": true
  1337. },
  1338. "options": {
  1339. "hasLocalMutations": false,
  1340. "hasCommittedMutations": false
  1341. }
  1342. }
  1343. ],
  1344. "targets": [
  1345. 2
  1346. ]
  1347. }
  1348. },
  1349. {
  1350. "watchCurrent": [
  1351. [
  1352. 2
  1353. ],
  1354. "resume-token-1002"
  1355. ]
  1356. },
  1357. {
  1358. "watchSnapshot": {
  1359. "version": 1002,
  1360. "targetIds": []
  1361. },
  1362. "expect": [
  1363. {
  1364. "query": {
  1365. "path": "collection",
  1366. "filters": [
  1367. [
  1368. "matches",
  1369. "==",
  1370. true
  1371. ]
  1372. ],
  1373. "orderBys": []
  1374. },
  1375. "added": [
  1376. {
  1377. "key": "collection/a",
  1378. "version": 1001,
  1379. "value": {
  1380. "matches": true
  1381. },
  1382. "options": {
  1383. "hasLocalMutations": false,
  1384. "hasCommittedMutations": false
  1385. }
  1386. },
  1387. {
  1388. "key": "collection/b",
  1389. "version": 1002,
  1390. "value": {
  1391. "matches": true
  1392. },
  1393. "options": {
  1394. "hasLocalMutations": false,
  1395. "hasCommittedMutations": false
  1396. }
  1397. },
  1398. {
  1399. "key": "collection/c",
  1400. "version": 1000,
  1401. "value": {
  1402. "matches": true
  1403. },
  1404. "options": {
  1405. "hasLocalMutations": false,
  1406. "hasCommittedMutations": false
  1407. }
  1408. }
  1409. ],
  1410. "errorCode": 0,
  1411. "fromCache": false,
  1412. "hasPendingWrites": false
  1413. }
  1414. ]
  1415. },
  1416. {
  1417. "userUnlisten": [
  1418. 2,
  1419. {
  1420. "path": "collection",
  1421. "filters": [
  1422. [
  1423. "matches",
  1424. "==",
  1425. true
  1426. ]
  1427. ],
  1428. "orderBys": []
  1429. }
  1430. ],
  1431. "stateExpect": {
  1432. "activeTargets": {}
  1433. }
  1434. },
  1435. {
  1436. "userListen": [
  1437. 4,
  1438. {
  1439. "path": "collection",
  1440. "limit": 2,
  1441. "filters": [
  1442. [
  1443. "matches",
  1444. "==",
  1445. true
  1446. ]
  1447. ],
  1448. "orderBys": []
  1449. }
  1450. ],
  1451. "stateExpect": {
  1452. "activeTargets": {
  1453. "4": {
  1454. "query": {
  1455. "path": "collection",
  1456. "limit": 2,
  1457. "filters": [
  1458. [
  1459. "matches",
  1460. "==",
  1461. true
  1462. ]
  1463. ],
  1464. "orderBys": []
  1465. },
  1466. "resumeToken": ""
  1467. }
  1468. }
  1469. },
  1470. "expect": [
  1471. {
  1472. "query": {
  1473. "path": "collection",
  1474. "limit": 2,
  1475. "filters": [
  1476. [
  1477. "matches",
  1478. "==",
  1479. true
  1480. ]
  1481. ],
  1482. "orderBys": []
  1483. },
  1484. "added": [
  1485. {
  1486. "key": "collection/a",
  1487. "version": 1001,
  1488. "value": {
  1489. "matches": true
  1490. },
  1491. "options": {
  1492. "hasLocalMutations": false,
  1493. "hasCommittedMutations": false
  1494. }
  1495. },
  1496. {
  1497. "key": "collection/b",
  1498. "version": 1002,
  1499. "value": {
  1500. "matches": true
  1501. },
  1502. "options": {
  1503. "hasLocalMutations": false,
  1504. "hasCommittedMutations": false
  1505. }
  1506. }
  1507. ],
  1508. "errorCode": 0,
  1509. "fromCache": true,
  1510. "hasPendingWrites": false
  1511. }
  1512. ]
  1513. },
  1514. {
  1515. "userSet": [
  1516. "collection/a",
  1517. {
  1518. "matches": false
  1519. }
  1520. ],
  1521. "expect": [
  1522. {
  1523. "query": {
  1524. "path": "collection",
  1525. "limit": 2,
  1526. "filters": [
  1527. [
  1528. "matches",
  1529. "==",
  1530. true
  1531. ]
  1532. ],
  1533. "orderBys": []
  1534. },
  1535. "added": [
  1536. {
  1537. "key": "collection/c",
  1538. "version": 1000,
  1539. "value": {
  1540. "matches": true
  1541. },
  1542. "options": {
  1543. "hasLocalMutations": false,
  1544. "hasCommittedMutations": false
  1545. }
  1546. }
  1547. ],
  1548. "removed": [
  1549. {
  1550. "key": "collection/a",
  1551. "version": 1001,
  1552. "value": {
  1553. "matches": true
  1554. },
  1555. "options": {
  1556. "hasLocalMutations": false,
  1557. "hasCommittedMutations": false
  1558. }
  1559. }
  1560. ],
  1561. "errorCode": 0,
  1562. "fromCache": true,
  1563. "hasPendingWrites": false
  1564. }
  1565. ]
  1566. }
  1567. ]
  1568. },
  1569. "Multiple docs in limbo in full limit query": {
  1570. "describeName": "Limits:",
  1571. "itName": "Multiple docs in limbo in full limit query",
  1572. "tags": [],
  1573. "config": {
  1574. "useGarbageCollection": true,
  1575. "numClients": 1
  1576. },
  1577. "steps": [
  1578. {
  1579. "userListen": [
  1580. 2,
  1581. {
  1582. "path": "collection",
  1583. "limit": 2,
  1584. "filters": [],
  1585. "orderBys": []
  1586. }
  1587. ],
  1588. "stateExpect": {
  1589. "activeTargets": {
  1590. "2": {
  1591. "query": {
  1592. "path": "collection",
  1593. "limit": 2,
  1594. "filters": [],
  1595. "orderBys": []
  1596. },
  1597. "resumeToken": ""
  1598. }
  1599. }
  1600. }
  1601. },
  1602. {
  1603. "watchAck": [
  1604. 2
  1605. ]
  1606. },
  1607. {
  1608. "watchEntity": {
  1609. "docs": [
  1610. {
  1611. "key": "collection/a",
  1612. "version": 1000,
  1613. "value": {
  1614. "key": "a"
  1615. },
  1616. "options": {
  1617. "hasLocalMutations": false,
  1618. "hasCommittedMutations": false
  1619. }
  1620. },
  1621. {
  1622. "key": "collection/b",
  1623. "version": 1001,
  1624. "value": {
  1625. "key": "b"
  1626. },
  1627. "options": {
  1628. "hasLocalMutations": false,
  1629. "hasCommittedMutations": false
  1630. }
  1631. }
  1632. ],
  1633. "targets": [
  1634. 2
  1635. ]
  1636. }
  1637. },
  1638. {
  1639. "watchCurrent": [
  1640. [
  1641. 2
  1642. ],
  1643. "resume-token-1001"
  1644. ]
  1645. },
  1646. {
  1647. "watchSnapshot": {
  1648. "version": 1001,
  1649. "targetIds": []
  1650. },
  1651. "expect": [
  1652. {
  1653. "query": {
  1654. "path": "collection",
  1655. "limit": 2,
  1656. "filters": [],
  1657. "orderBys": []
  1658. },
  1659. "added": [
  1660. {
  1661. "key": "collection/a",
  1662. "version": 1000,
  1663. "value": {
  1664. "key": "a"
  1665. },
  1666. "options": {
  1667. "hasLocalMutations": false,
  1668. "hasCommittedMutations": false
  1669. }
  1670. },
  1671. {
  1672. "key": "collection/b",
  1673. "version": 1001,
  1674. "value": {
  1675. "key": "b"
  1676. },
  1677. "options": {
  1678. "hasLocalMutations": false,
  1679. "hasCommittedMutations": false
  1680. }
  1681. }
  1682. ],
  1683. "errorCode": 0,
  1684. "fromCache": false,
  1685. "hasPendingWrites": false
  1686. }
  1687. ]
  1688. },
  1689. {
  1690. "userListen": [
  1691. 4,
  1692. {
  1693. "path": "collection",
  1694. "filters": [],
  1695. "orderBys": []
  1696. }
  1697. ],
  1698. "stateExpect": {
  1699. "activeTargets": {
  1700. "2": {
  1701. "query": {
  1702. "path": "collection",
  1703. "limit": 2,
  1704. "filters": [],
  1705. "orderBys": []
  1706. },
  1707. "resumeToken": ""
  1708. },
  1709. "4": {
  1710. "query": {
  1711. "path": "collection",
  1712. "filters": [],
  1713. "orderBys": []
  1714. },
  1715. "resumeToken": ""
  1716. }
  1717. }
  1718. },
  1719. "expect": [
  1720. {
  1721. "query": {
  1722. "path": "collection",
  1723. "filters": [],
  1724. "orderBys": []
  1725. },
  1726. "added": [
  1727. {
  1728. "key": "collection/a",
  1729. "version": 1000,
  1730. "value": {
  1731. "key": "a"
  1732. },
  1733. "options": {
  1734. "hasLocalMutations": false,
  1735. "hasCommittedMutations": false
  1736. }
  1737. },
  1738. {
  1739. "key": "collection/b",
  1740. "version": 1001,
  1741. "value": {
  1742. "key": "b"
  1743. },
  1744. "options": {
  1745. "hasLocalMutations": false,
  1746. "hasCommittedMutations": false
  1747. }
  1748. }
  1749. ],
  1750. "errorCode": 0,
  1751. "fromCache": true,
  1752. "hasPendingWrites": false
  1753. }
  1754. ]
  1755. },
  1756. {
  1757. "watchAck": [
  1758. 4
  1759. ]
  1760. },
  1761. {
  1762. "watchEntity": {
  1763. "docs": [
  1764. {
  1765. "key": "collection/a",
  1766. "version": 1000,
  1767. "value": {
  1768. "key": "a"
  1769. },
  1770. "options": {
  1771. "hasLocalMutations": false,
  1772. "hasCommittedMutations": false
  1773. }
  1774. },
  1775. {
  1776. "key": "collection/b",
  1777. "version": 1001,
  1778. "value": {
  1779. "key": "b"
  1780. },
  1781. "options": {
  1782. "hasLocalMutations": false,
  1783. "hasCommittedMutations": false
  1784. }
  1785. },
  1786. {
  1787. "key": "collection/c",
  1788. "version": 1002,
  1789. "value": {
  1790. "key": "c"
  1791. },
  1792. "options": {
  1793. "hasLocalMutations": false,
  1794. "hasCommittedMutations": false
  1795. }
  1796. },
  1797. {
  1798. "key": "collection/d",
  1799. "version": 1003,
  1800. "value": {
  1801. "key": "d"
  1802. },
  1803. "options": {
  1804. "hasLocalMutations": false,
  1805. "hasCommittedMutations": false
  1806. }
  1807. },
  1808. {
  1809. "key": "collection/e",
  1810. "version": 1004,
  1811. "value": {
  1812. "key": "e"
  1813. },
  1814. "options": {
  1815. "hasLocalMutations": false,
  1816. "hasCommittedMutations": false
  1817. }
  1818. },
  1819. {
  1820. "key": "collection/f",
  1821. "version": 1005,
  1822. "value": {
  1823. "key": "f"
  1824. },
  1825. "options": {
  1826. "hasLocalMutations": false,
  1827. "hasCommittedMutations": false
  1828. }
  1829. }
  1830. ],
  1831. "targets": [
  1832. 4
  1833. ]
  1834. }
  1835. },
  1836. {
  1837. "watchCurrent": [
  1838. [
  1839. 4
  1840. ],
  1841. "resume-token-1005"
  1842. ]
  1843. },
  1844. {
  1845. "watchSnapshot": {
  1846. "version": 1005,
  1847. "targetIds": []
  1848. },
  1849. "expect": [
  1850. {
  1851. "query": {
  1852. "path": "collection",
  1853. "filters": [],
  1854. "orderBys": []
  1855. },
  1856. "added": [
  1857. {
  1858. "key": "collection/c",
  1859. "version": 1002,
  1860. "value": {
  1861. "key": "c"
  1862. },
  1863. "options": {
  1864. "hasLocalMutations": false,
  1865. "hasCommittedMutations": false
  1866. }
  1867. },
  1868. {
  1869. "key": "collection/d",
  1870. "version": 1003,
  1871. "value": {
  1872. "key": "d"
  1873. },
  1874. "options": {
  1875. "hasLocalMutations": false,
  1876. "hasCommittedMutations": false
  1877. }
  1878. },
  1879. {
  1880. "key": "collection/e",
  1881. "version": 1004,
  1882. "value": {
  1883. "key": "e"
  1884. },
  1885. "options": {
  1886. "hasLocalMutations": false,
  1887. "hasCommittedMutations": false
  1888. }
  1889. },
  1890. {
  1891. "key": "collection/f",
  1892. "version": 1005,
  1893. "value": {
  1894. "key": "f"
  1895. },
  1896. "options": {
  1897. "hasLocalMutations": false,
  1898. "hasCommittedMutations": false
  1899. }
  1900. }
  1901. ],
  1902. "errorCode": 0,
  1903. "fromCache": false,
  1904. "hasPendingWrites": false
  1905. }
  1906. ]
  1907. },
  1908. {
  1909. "watchReset": [
  1910. 2
  1911. ]
  1912. },
  1913. {
  1914. "watchEntity": {
  1915. "docs": [
  1916. {
  1917. "key": "collection/e",
  1918. "version": 1004,
  1919. "value": {
  1920. "key": "e"
  1921. },
  1922. "options": {
  1923. "hasLocalMutations": false,
  1924. "hasCommittedMutations": false
  1925. }
  1926. },
  1927. {
  1928. "key": "collection/f",
  1929. "version": 1005,
  1930. "value": {
  1931. "key": "f"
  1932. },
  1933. "options": {
  1934. "hasLocalMutations": false,
  1935. "hasCommittedMutations": false
  1936. }
  1937. }
  1938. ],
  1939. "targets": [
  1940. 2
  1941. ]
  1942. }
  1943. },
  1944. {
  1945. "watchCurrent": [
  1946. [
  1947. 2
  1948. ],
  1949. "resume-token-2000"
  1950. ]
  1951. },
  1952. {
  1953. "watchSnapshot": {
  1954. "version": 2000,
  1955. "targetIds": []
  1956. },
  1957. "stateExpect": {
  1958. "limboDocs": [
  1959. "collection/a",
  1960. "collection/b"
  1961. ],
  1962. "activeTargets": {
  1963. "1": {
  1964. "query": {
  1965. "path": "collection/a",
  1966. "filters": [],
  1967. "orderBys": []
  1968. },
  1969. "resumeToken": ""
  1970. },
  1971. "2": {
  1972. "query": {
  1973. "path": "collection",
  1974. "limit": 2,
  1975. "filters": [],
  1976. "orderBys": []
  1977. },
  1978. "resumeToken": ""
  1979. },
  1980. "3": {
  1981. "query": {
  1982. "path": "collection/b",
  1983. "filters": [],
  1984. "orderBys": []
  1985. },
  1986. "resumeToken": ""
  1987. },
  1988. "4": {
  1989. "query": {
  1990. "path": "collection",
  1991. "filters": [],
  1992. "orderBys": []
  1993. },
  1994. "resumeToken": ""
  1995. }
  1996. }
  1997. },
  1998. "expect": [
  1999. {
  2000. "query": {
  2001. "path": "collection",
  2002. "limit": 2,
  2003. "filters": [],
  2004. "orderBys": []
  2005. },
  2006. "errorCode": 0,
  2007. "fromCache": true,
  2008. "hasPendingWrites": false
  2009. }
  2010. ]
  2011. },
  2012. {
  2013. "watchAck": [
  2014. 1
  2015. ]
  2016. },
  2017. {
  2018. "watchCurrent": [
  2019. [
  2020. 1
  2021. ],
  2022. "resume-token-2000"
  2023. ]
  2024. },
  2025. {
  2026. "watchSnapshot": {
  2027. "version": 2000,
  2028. "targetIds": []
  2029. },
  2030. "stateExpect": {
  2031. "limboDocs": [
  2032. "collection/b",
  2033. "collection/c"
  2034. ],
  2035. "activeTargets": {
  2036. "2": {
  2037. "query": {
  2038. "path": "collection",
  2039. "limit": 2,
  2040. "filters": [],
  2041. "orderBys": []
  2042. },
  2043. "resumeToken": ""
  2044. },
  2045. "3": {
  2046. "query": {
  2047. "path": "collection/b",
  2048. "filters": [],
  2049. "orderBys": []
  2050. },
  2051. "resumeToken": ""
  2052. },
  2053. "4": {
  2054. "query": {
  2055. "path": "collection",
  2056. "filters": [],
  2057. "orderBys": []
  2058. },
  2059. "resumeToken": ""
  2060. },
  2061. "5": {
  2062. "query": {
  2063. "path": "collection/c",
  2064. "filters": [],
  2065. "orderBys": []
  2066. },
  2067. "resumeToken": ""
  2068. }
  2069. }
  2070. },
  2071. "expect": [
  2072. {
  2073. "query": {
  2074. "path": "collection",
  2075. "filters": [],
  2076. "orderBys": []
  2077. },
  2078. "removed": [
  2079. {
  2080. "key": "collection/a",
  2081. "version": 1000,
  2082. "value": {
  2083. "key": "a"
  2084. },
  2085. "options": {
  2086. "hasLocalMutations": false,
  2087. "hasCommittedMutations": false
  2088. }
  2089. }
  2090. ],
  2091. "errorCode": 0,
  2092. "fromCache": false,
  2093. "hasPendingWrites": false
  2094. },
  2095. {
  2096. "query": {
  2097. "path": "collection",
  2098. "limit": 2,
  2099. "filters": [],
  2100. "orderBys": []
  2101. },
  2102. "added": [
  2103. {
  2104. "key": "collection/c",
  2105. "version": 1002,
  2106. "value": {
  2107. "key": "c"
  2108. },
  2109. "options": {
  2110. "hasLocalMutations": false,
  2111. "hasCommittedMutations": false
  2112. }
  2113. }
  2114. ],
  2115. "removed": [
  2116. {
  2117. "key": "collection/a",
  2118. "version": 1000,
  2119. "value": {
  2120. "key": "a"
  2121. },
  2122. "options": {
  2123. "hasLocalMutations": false,
  2124. "hasCommittedMutations": false
  2125. }
  2126. }
  2127. ],
  2128. "errorCode": 0,
  2129. "fromCache": true,
  2130. "hasPendingWrites": false
  2131. }
  2132. ]
  2133. },
  2134. {
  2135. "watchRemove": {
  2136. "targetIds": [
  2137. 1
  2138. ]
  2139. }
  2140. },
  2141. {
  2142. "watchAck": [
  2143. 3
  2144. ]
  2145. },
  2146. {
  2147. "watchCurrent": [
  2148. [
  2149. 3
  2150. ],
  2151. "resume-token-2001"
  2152. ]
  2153. },
  2154. {
  2155. "watchSnapshot": {
  2156. "version": 2001,
  2157. "targetIds": []
  2158. },
  2159. "stateExpect": {
  2160. "limboDocs": [
  2161. "collection/c",
  2162. "collection/d"
  2163. ],
  2164. "activeTargets": {
  2165. "2": {
  2166. "query": {
  2167. "path": "collection",
  2168. "limit": 2,
  2169. "filters": [],
  2170. "orderBys": []
  2171. },
  2172. "resumeToken": ""
  2173. },
  2174. "4": {
  2175. "query": {
  2176. "path": "collection",
  2177. "filters": [],
  2178. "orderBys": []
  2179. },
  2180. "resumeToken": ""
  2181. },
  2182. "5": {
  2183. "query": {
  2184. "path": "collection/c",
  2185. "filters": [],
  2186. "orderBys": []
  2187. },
  2188. "resumeToken": ""
  2189. },
  2190. "7": {
  2191. "query": {
  2192. "path": "collection/d",
  2193. "filters": [],
  2194. "orderBys": []
  2195. },
  2196. "resumeToken": ""
  2197. }
  2198. }
  2199. },
  2200. "expect": [
  2201. {
  2202. "query": {
  2203. "path": "collection",
  2204. "filters": [],
  2205. "orderBys": []
  2206. },
  2207. "removed": [
  2208. {
  2209. "key": "collection/b",
  2210. "version": 1001,
  2211. "value": {
  2212. "key": "b"
  2213. },
  2214. "options": {
  2215. "hasLocalMutations": false,
  2216. "hasCommittedMutations": false
  2217. }
  2218. }
  2219. ],
  2220. "errorCode": 0,
  2221. "fromCache": false,
  2222. "hasPendingWrites": false
  2223. },
  2224. {
  2225. "query": {
  2226. "path": "collection",
  2227. "limit": 2,
  2228. "filters": [],
  2229. "orderBys": []
  2230. },
  2231. "added": [
  2232. {
  2233. "key": "collection/d",
  2234. "version": 1003,
  2235. "value": {
  2236. "key": "d"
  2237. },
  2238. "options": {
  2239. "hasLocalMutations": false,
  2240. "hasCommittedMutations": false
  2241. }
  2242. }
  2243. ],
  2244. "removed": [
  2245. {
  2246. "key": "collection/b",
  2247. "version": 1001,
  2248. "value": {
  2249. "key": "b"
  2250. },
  2251. "options": {
  2252. "hasLocalMutations": false,
  2253. "hasCommittedMutations": false
  2254. }
  2255. }
  2256. ],
  2257. "errorCode": 0,
  2258. "fromCache": true,
  2259. "hasPendingWrites": false
  2260. }
  2261. ]
  2262. },
  2263. {
  2264. "watchRemove": {
  2265. "targetIds": [
  2266. 3
  2267. ]
  2268. }
  2269. },
  2270. {
  2271. "watchAck": [
  2272. 5
  2273. ]
  2274. },
  2275. {
  2276. "watchCurrent": [
  2277. [
  2278. 5
  2279. ],
  2280. "resume-token-2002"
  2281. ]
  2282. },
  2283. {
  2284. "watchSnapshot": {
  2285. "version": 2002,
  2286. "targetIds": []
  2287. },
  2288. "stateExpect": {
  2289. "limboDocs": [
  2290. "collection/d"
  2291. ],
  2292. "activeTargets": {
  2293. "2": {
  2294. "query": {
  2295. "path": "collection",
  2296. "limit": 2,
  2297. "filters": [],
  2298. "orderBys": []
  2299. },
  2300. "resumeToken": ""
  2301. },
  2302. "4": {
  2303. "query": {
  2304. "path": "collection",
  2305. "filters": [],
  2306. "orderBys": []
  2307. },
  2308. "resumeToken": ""
  2309. },
  2310. "7": {
  2311. "query": {
  2312. "path": "collection/d",
  2313. "filters": [],
  2314. "orderBys": []
  2315. },
  2316. "resumeToken": ""
  2317. }
  2318. }
  2319. },
  2320. "expect": [
  2321. {
  2322. "query": {
  2323. "path": "collection",
  2324. "filters": [],
  2325. "orderBys": []
  2326. },
  2327. "removed": [
  2328. {
  2329. "key": "collection/c",
  2330. "version": 1002,
  2331. "value": {
  2332. "key": "c"
  2333. },
  2334. "options": {
  2335. "hasLocalMutations": false,
  2336. "hasCommittedMutations": false
  2337. }
  2338. }
  2339. ],
  2340. "errorCode": 0,
  2341. "fromCache": false,
  2342. "hasPendingWrites": false
  2343. },
  2344. {
  2345. "query": {
  2346. "path": "collection",
  2347. "limit": 2,
  2348. "filters": [],
  2349. "orderBys": []
  2350. },
  2351. "added": [
  2352. {
  2353. "key": "collection/e",
  2354. "version": 1004,
  2355. "value": {
  2356. "key": "e"
  2357. },
  2358. "options": {
  2359. "hasLocalMutations": false,
  2360. "hasCommittedMutations": false
  2361. }
  2362. }
  2363. ],
  2364. "removed": [
  2365. {
  2366. "key": "collection/c",
  2367. "version": 1002,
  2368. "value": {
  2369. "key": "c"
  2370. },
  2371. "options": {
  2372. "hasLocalMutations": false,
  2373. "hasCommittedMutations": false
  2374. }
  2375. }
  2376. ],
  2377. "errorCode": 0,
  2378. "fromCache": true,
  2379. "hasPendingWrites": false
  2380. }
  2381. ]
  2382. },
  2383. {
  2384. "watchRemove": {
  2385. "targetIds": [
  2386. 5
  2387. ]
  2388. }
  2389. },
  2390. {
  2391. "watchAck": [
  2392. 7
  2393. ]
  2394. },
  2395. {
  2396. "watchCurrent": [
  2397. [
  2398. 7
  2399. ],
  2400. "resume-token-2003"
  2401. ]
  2402. },
  2403. {
  2404. "watchSnapshot": {
  2405. "version": 2003,
  2406. "targetIds": []
  2407. },
  2408. "stateExpect": {
  2409. "limboDocs": [],
  2410. "activeTargets": {
  2411. "2": {
  2412. "query": {
  2413. "path": "collection",
  2414. "limit": 2,
  2415. "filters": [],
  2416. "orderBys": []
  2417. },
  2418. "resumeToken": ""
  2419. },
  2420. "4": {
  2421. "query": {
  2422. "path": "collection",
  2423. "filters": [],
  2424. "orderBys": []
  2425. },
  2426. "resumeToken": ""
  2427. }
  2428. }
  2429. },
  2430. "expect": [
  2431. {
  2432. "query": {
  2433. "path": "collection",
  2434. "filters": [],
  2435. "orderBys": []
  2436. },
  2437. "removed": [
  2438. {
  2439. "key": "collection/d",
  2440. "version": 1003,
  2441. "value": {
  2442. "key": "d"
  2443. },
  2444. "options": {
  2445. "hasLocalMutations": false,
  2446. "hasCommittedMutations": false
  2447. }
  2448. }
  2449. ],
  2450. "errorCode": 0,
  2451. "fromCache": false,
  2452. "hasPendingWrites": false
  2453. },
  2454. {
  2455. "query": {
  2456. "path": "collection",
  2457. "limit": 2,
  2458. "filters": [],
  2459. "orderBys": []
  2460. },
  2461. "added": [
  2462. {
  2463. "key": "collection/f",
  2464. "version": 1005,
  2465. "value": {
  2466. "key": "f"
  2467. },
  2468. "options": {
  2469. "hasLocalMutations": false,
  2470. "hasCommittedMutations": false
  2471. }
  2472. }
  2473. ],
  2474. "removed": [
  2475. {
  2476. "key": "collection/d",
  2477. "version": 1003,
  2478. "value": {
  2479. "key": "d"
  2480. },
  2481. "options": {
  2482. "hasLocalMutations": false,
  2483. "hasCommittedMutations": false
  2484. }
  2485. }
  2486. ],
  2487. "errorCode": 0,
  2488. "fromCache": false,
  2489. "hasPendingWrites": false
  2490. }
  2491. ]
  2492. },
  2493. {
  2494. "watchRemove": {
  2495. "targetIds": [
  2496. 7
  2497. ]
  2498. }
  2499. }
  2500. ]
  2501. },
  2502. "Limit query is refilled by primary client": {
  2503. "describeName": "Limits:",
  2504. "itName": "Limit query is refilled by primary client",
  2505. "tags": [
  2506. "multi-client"
  2507. ],
  2508. "config": {
  2509. "useGarbageCollection": false,
  2510. "numClients": 2
  2511. },
  2512. "steps": [
  2513. {
  2514. "drainQueue": true,
  2515. "clientIndex": 0
  2516. },
  2517. {
  2518. "applyClientState": {
  2519. "visibility": "visible"
  2520. },
  2521. "clientIndex": 0
  2522. },
  2523. {
  2524. "drainQueue": true,
  2525. "clientIndex": 1
  2526. },
  2527. {
  2528. "userListen": [
  2529. 2,
  2530. {
  2531. "path": "collection",
  2532. "limit": 2,
  2533. "filters": [],
  2534. "orderBys": []
  2535. }
  2536. ],
  2537. "stateExpect": {
  2538. "activeTargets": {
  2539. "2": {
  2540. "query": {
  2541. "path": "collection",
  2542. "limit": 2,
  2543. "filters": [],
  2544. "orderBys": []
  2545. },
  2546. "resumeToken": ""
  2547. }
  2548. }
  2549. },
  2550. "clientIndex": 1
  2551. },
  2552. {
  2553. "drainQueue": true,
  2554. "stateExpect": {
  2555. "activeTargets": {
  2556. "2": {
  2557. "query": {
  2558. "path": "collection",
  2559. "limit": 2,
  2560. "filters": [],
  2561. "orderBys": []
  2562. },
  2563. "resumeToken": ""
  2564. }
  2565. }
  2566. },
  2567. "clientIndex": 0
  2568. },
  2569. {
  2570. "watchAck": [
  2571. 2
  2572. ],
  2573. "clientIndex": 0
  2574. },
  2575. {
  2576. "watchEntity": {
  2577. "docs": [
  2578. {
  2579. "key": "collection/a",
  2580. "version": 1000,
  2581. "value": {
  2582. "key": "a"
  2583. },
  2584. "options": {
  2585. "hasLocalMutations": false,
  2586. "hasCommittedMutations": false
  2587. }
  2588. },
  2589. {
  2590. "key": "collection/c",
  2591. "version": 1001,
  2592. "value": {
  2593. "key": "c"
  2594. },
  2595. "options": {
  2596. "hasLocalMutations": false,
  2597. "hasCommittedMutations": false
  2598. }
  2599. }
  2600. ],
  2601. "targets": [
  2602. 2
  2603. ]
  2604. },
  2605. "clientIndex": 0
  2606. },
  2607. {
  2608. "watchCurrent": [
  2609. [
  2610. 2
  2611. ],
  2612. "resume-token-1001"
  2613. ],
  2614. "clientIndex": 0
  2615. },
  2616. {
  2617. "watchSnapshot": {
  2618. "version": 1001,
  2619. "targetIds": []
  2620. },
  2621. "clientIndex": 0
  2622. },
  2623. {
  2624. "drainQueue": true,
  2625. "expect": [
  2626. {
  2627. "query": {
  2628. "path": "collection",
  2629. "limit": 2,
  2630. "filters": [],
  2631. "orderBys": []
  2632. },
  2633. "added": [
  2634. {
  2635. "key": "collection/a",
  2636. "version": 1000,
  2637. "value": {
  2638. "key": "a"
  2639. },
  2640. "options": {
  2641. "hasLocalMutations": false,
  2642. "hasCommittedMutations": false
  2643. }
  2644. },
  2645. {
  2646. "key": "collection/c",
  2647. "version": 1001,
  2648. "value": {
  2649. "key": "c"
  2650. },
  2651. "options": {
  2652. "hasLocalMutations": false,
  2653. "hasCommittedMutations": false
  2654. }
  2655. }
  2656. ],
  2657. "errorCode": 0,
  2658. "fromCache": false,
  2659. "hasPendingWrites": false
  2660. }
  2661. ],
  2662. "clientIndex": 1
  2663. },
  2664. {
  2665. "drainQueue": true,
  2666. "clientIndex": 0
  2667. },
  2668. {
  2669. "watchEntity": {
  2670. "docs": [
  2671. {
  2672. "key": "collection/b",
  2673. "version": 1002,
  2674. "value": {
  2675. "key": "b"
  2676. },
  2677. "options": {
  2678. "hasLocalMutations": false,
  2679. "hasCommittedMutations": false
  2680. }
  2681. }
  2682. ],
  2683. "targets": [
  2684. 2
  2685. ]
  2686. },
  2687. "clientIndex": 0
  2688. },
  2689. {
  2690. "watchEntity": {
  2691. "docs": [
  2692. {
  2693. "key": "collection/c",
  2694. "version": 1001,
  2695. "value": {
  2696. "key": "c"
  2697. },
  2698. "options": {
  2699. "hasLocalMutations": false,
  2700. "hasCommittedMutations": false
  2701. }
  2702. }
  2703. ],
  2704. "removedTargets": [
  2705. 2
  2706. ]
  2707. },
  2708. "clientIndex": 0
  2709. },
  2710. {
  2711. "watchSnapshot": {
  2712. "version": 1002,
  2713. "targetIds": []
  2714. },
  2715. "clientIndex": 0
  2716. },
  2717. {
  2718. "drainQueue": true,
  2719. "expect": [
  2720. {
  2721. "query": {
  2722. "path": "collection",
  2723. "limit": 2,
  2724. "filters": [],
  2725. "orderBys": []
  2726. },
  2727. "added": [
  2728. {
  2729. "key": "collection/b",
  2730. "version": 1002,
  2731. "value": {
  2732. "key": "b"
  2733. },
  2734. "options": {
  2735. "hasLocalMutations": false,
  2736. "hasCommittedMutations": false
  2737. }
  2738. }
  2739. ],
  2740. "removed": [
  2741. {
  2742. "key": "collection/c",
  2743. "version": 1001,
  2744. "value": {
  2745. "key": "c"
  2746. },
  2747. "options": {
  2748. "hasLocalMutations": false,
  2749. "hasCommittedMutations": false
  2750. }
  2751. }
  2752. ],
  2753. "errorCode": 0,
  2754. "fromCache": false,
  2755. "hasPendingWrites": false
  2756. }
  2757. ],
  2758. "clientIndex": 1
  2759. }
  2760. ]
  2761. },
  2762. "Limit query includes write from secondary client ": {
  2763. "describeName": "Limits:",
  2764. "itName": "Limit query includes write from secondary client ",
  2765. "tags": [
  2766. "multi-client"
  2767. ],
  2768. "config": {
  2769. "useGarbageCollection": false,
  2770. "numClients": 3
  2771. },
  2772. "steps": [
  2773. {
  2774. "drainQueue": true,
  2775. "clientIndex": 0
  2776. },
  2777. {
  2778. "applyClientState": {
  2779. "visibility": "visible"
  2780. },
  2781. "clientIndex": 0
  2782. },
  2783. {
  2784. "drainQueue": true,
  2785. "clientIndex": 1
  2786. },
  2787. {
  2788. "userListen": [
  2789. 2,
  2790. {
  2791. "path": "collection",
  2792. "limit": 2,
  2793. "filters": [],
  2794. "orderBys": []
  2795. }
  2796. ],
  2797. "stateExpect": {
  2798. "activeTargets": {
  2799. "2": {
  2800. "query": {
  2801. "path": "collection",
  2802. "limit": 2,
  2803. "filters": [],
  2804. "orderBys": []
  2805. },
  2806. "resumeToken": ""
  2807. }
  2808. }
  2809. },
  2810. "clientIndex": 1
  2811. },
  2812. {
  2813. "drainQueue": true,
  2814. "stateExpect": {
  2815. "activeTargets": {
  2816. "2": {
  2817. "query": {
  2818. "path": "collection",
  2819. "limit": 2,
  2820. "filters": [],
  2821. "orderBys": []
  2822. },
  2823. "resumeToken": ""
  2824. }
  2825. }
  2826. },
  2827. "clientIndex": 0
  2828. },
  2829. {
  2830. "watchAck": [
  2831. 2
  2832. ],
  2833. "clientIndex": 0
  2834. },
  2835. {
  2836. "watchEntity": {
  2837. "docs": [
  2838. {
  2839. "key": "collection/b",
  2840. "version": 1001,
  2841. "value": {
  2842. "key": "b"
  2843. },
  2844. "options": {
  2845. "hasLocalMutations": false,
  2846. "hasCommittedMutations": false
  2847. }
  2848. },
  2849. {
  2850. "key": "collection/c",
  2851. "version": 1002,
  2852. "value": {
  2853. "key": "c"
  2854. },
  2855. "options": {
  2856. "hasLocalMutations": false,
  2857. "hasCommittedMutations": false
  2858. }
  2859. }
  2860. ],
  2861. "targets": [
  2862. 2
  2863. ]
  2864. },
  2865. "clientIndex": 0
  2866. },
  2867. {
  2868. "watchCurrent": [
  2869. [
  2870. 2
  2871. ],
  2872. "resume-token-1002"
  2873. ],
  2874. "clientIndex": 0
  2875. },
  2876. {
  2877. "watchSnapshot": {
  2878. "version": 1002,
  2879. "targetIds": []
  2880. },
  2881. "clientIndex": 0
  2882. },
  2883. {
  2884. "drainQueue": true,
  2885. "expect": [
  2886. {
  2887. "query": {
  2888. "path": "collection",
  2889. "limit": 2,
  2890. "filters": [],
  2891. "orderBys": []
  2892. },
  2893. "added": [
  2894. {
  2895. "key": "collection/b",
  2896. "version": 1001,
  2897. "value": {
  2898. "key": "b"
  2899. },
  2900. "options": {
  2901. "hasLocalMutations": false,
  2902. "hasCommittedMutations": false
  2903. }
  2904. },
  2905. {
  2906. "key": "collection/c",
  2907. "version": 1002,
  2908. "value": {
  2909. "key": "c"
  2910. },
  2911. "options": {
  2912. "hasLocalMutations": false,
  2913. "hasCommittedMutations": false
  2914. }
  2915. }
  2916. ],
  2917. "errorCode": 0,
  2918. "fromCache": false,
  2919. "hasPendingWrites": false
  2920. }
  2921. ],
  2922. "clientIndex": 1
  2923. },
  2924. {
  2925. "drainQueue": true,
  2926. "clientIndex": 2
  2927. },
  2928. {
  2929. "userSet": [
  2930. "collection/a",
  2931. {
  2932. "key": "a"
  2933. }
  2934. ],
  2935. "clientIndex": 2
  2936. },
  2937. {
  2938. "drainQueue": true,
  2939. "expect": [
  2940. {
  2941. "query": {
  2942. "path": "collection",
  2943. "limit": 2,
  2944. "filters": [],
  2945. "orderBys": []
  2946. },
  2947. "added": [
  2948. {
  2949. "key": "collection/a",
  2950. "version": 0,
  2951. "value": {
  2952. "key": "a"
  2953. },
  2954. "options": {
  2955. "hasLocalMutations": true,
  2956. "hasCommittedMutations": false
  2957. }
  2958. }
  2959. ],
  2960. "removed": [
  2961. {
  2962. "key": "collection/c",
  2963. "version": 1002,
  2964. "value": {
  2965. "key": "c"
  2966. },
  2967. "options": {
  2968. "hasLocalMutations": false,
  2969. "hasCommittedMutations": false
  2970. }
  2971. }
  2972. ],
  2973. "errorCode": 0,
  2974. "fromCache": false,
  2975. "hasPendingWrites": true
  2976. }
  2977. ],
  2978. "clientIndex": 1
  2979. },
  2980. {
  2981. "drainQueue": true,
  2982. "clientIndex": 0
  2983. },
  2984. {
  2985. "writeAck": {
  2986. "version": 1003
  2987. },
  2988. "clientIndex": 0
  2989. },
  2990. {
  2991. "watchEntity": {
  2992. "docs": [
  2993. {
  2994. "key": "collection/a",
  2995. "version": 1003,
  2996. "value": {
  2997. "key": "a"
  2998. },
  2999. "options": {
  3000. "hasLocalMutations": false,
  3001. "hasCommittedMutations": false
  3002. }
  3003. }
  3004. ],
  3005. "targets": [
  3006. 2
  3007. ]
  3008. },
  3009. "clientIndex": 0
  3010. },
  3011. {
  3012. "watchEntity": {
  3013. "docs": [
  3014. {
  3015. "key": "collection/c",
  3016. "version": 1002,
  3017. "value": {
  3018. "key": "c"
  3019. },
  3020. "options": {
  3021. "hasLocalMutations": false,
  3022. "hasCommittedMutations": false
  3023. }
  3024. }
  3025. ],
  3026. "removedTargets": [
  3027. 2
  3028. ]
  3029. },
  3030. "clientIndex": 0
  3031. },
  3032. {
  3033. "watchSnapshot": {
  3034. "version": 1003,
  3035. "targetIds": []
  3036. },
  3037. "clientIndex": 0
  3038. },
  3039. {
  3040. "drainQueue": true,
  3041. "expect": [
  3042. {
  3043. "query": {
  3044. "path": "collection",
  3045. "limit": 2,
  3046. "filters": [],
  3047. "orderBys": []
  3048. },
  3049. "metadata": [
  3050. {
  3051. "key": "collection/a",
  3052. "version": 1003,
  3053. "value": {
  3054. "key": "a"
  3055. },
  3056. "options": {
  3057. "hasLocalMutations": false,
  3058. "hasCommittedMutations": false
  3059. }
  3060. }
  3061. ],
  3062. "errorCode": 0,
  3063. "fromCache": false,
  3064. "hasPendingWrites": false
  3065. }
  3066. ],
  3067. "clientIndex": 1
  3068. },
  3069. {
  3070. "drainQueue": true,
  3071. "stateExpect": {
  3072. "userCallbacks": {
  3073. "acknowledgedDocs": [
  3074. "collection/a"
  3075. ],
  3076. "rejectedDocs": []
  3077. }
  3078. },
  3079. "clientIndex": 2
  3080. }
  3081. ]
  3082. }
  3083. }