limbo_spec_test.json 74 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435
  1. {
  2. "Limbo documents are deleted without an existence filter": {
  3. "describeName": "Limbo Documents:",
  4. "itName": "Limbo documents are deleted without an existence filter",
  5. "tags": [],
  6. "config": {
  7. "useGarbageCollection": true,
  8. "numClients": 1
  9. },
  10. "steps": [
  11. {
  12. "userListen": [
  13. 2,
  14. {
  15. "path": "collection",
  16. "filters": [],
  17. "orderBys": []
  18. }
  19. ],
  20. "stateExpect": {
  21. "activeTargets": {
  22. "2": {
  23. "query": {
  24. "path": "collection",
  25. "filters": [],
  26. "orderBys": []
  27. },
  28. "resumeToken": ""
  29. }
  30. }
  31. }
  32. },
  33. {
  34. "watchAck": [
  35. 2
  36. ]
  37. },
  38. {
  39. "watchEntity": {
  40. "docs": [
  41. {
  42. "key": "collection/a",
  43. "version": 1000,
  44. "value": {
  45. "key": "a"
  46. },
  47. "options": {
  48. "hasLocalMutations": false,
  49. "hasCommittedMutations": false
  50. }
  51. }
  52. ],
  53. "targets": [
  54. 2
  55. ]
  56. }
  57. },
  58. {
  59. "watchCurrent": [
  60. [
  61. 2
  62. ],
  63. "resume-token-1000"
  64. ]
  65. },
  66. {
  67. "watchSnapshot": {
  68. "version": 1000,
  69. "targetIds": []
  70. },
  71. "expect": [
  72. {
  73. "query": {
  74. "path": "collection",
  75. "filters": [],
  76. "orderBys": []
  77. },
  78. "added": [
  79. {
  80. "key": "collection/a",
  81. "version": 1000,
  82. "value": {
  83. "key": "a"
  84. },
  85. "options": {
  86. "hasLocalMutations": false,
  87. "hasCommittedMutations": false
  88. }
  89. }
  90. ],
  91. "errorCode": 0,
  92. "fromCache": false,
  93. "hasPendingWrites": false
  94. }
  95. ]
  96. },
  97. {
  98. "watchReset": [
  99. 2
  100. ]
  101. },
  102. {
  103. "watchCurrent": [
  104. [
  105. 2
  106. ],
  107. "resume-token-1001"
  108. ]
  109. },
  110. {
  111. "watchSnapshot": {
  112. "version": 1001,
  113. "targetIds": []
  114. },
  115. "stateExpect": {
  116. "limboDocs": [
  117. "collection/a"
  118. ],
  119. "activeTargets": {
  120. "1": {
  121. "query": {
  122. "path": "collection/a",
  123. "filters": [],
  124. "orderBys": []
  125. },
  126. "resumeToken": ""
  127. },
  128. "2": {
  129. "query": {
  130. "path": "collection",
  131. "filters": [],
  132. "orderBys": []
  133. },
  134. "resumeToken": ""
  135. }
  136. }
  137. },
  138. "expect": [
  139. {
  140. "query": {
  141. "path": "collection",
  142. "filters": [],
  143. "orderBys": []
  144. },
  145. "errorCode": 0,
  146. "fromCache": true,
  147. "hasPendingWrites": false
  148. }
  149. ]
  150. },
  151. {
  152. "watchAck": [
  153. 1
  154. ]
  155. },
  156. {
  157. "watchCurrent": [
  158. [
  159. 1
  160. ],
  161. "resume-token-2"
  162. ]
  163. },
  164. {
  165. "watchSnapshot": {
  166. "version": 1002,
  167. "targetIds": []
  168. },
  169. "stateExpect": {
  170. "limboDocs": [],
  171. "activeTargets": {
  172. "2": {
  173. "query": {
  174. "path": "collection",
  175. "filters": [],
  176. "orderBys": []
  177. },
  178. "resumeToken": ""
  179. }
  180. }
  181. },
  182. "expect": [
  183. {
  184. "query": {
  185. "path": "collection",
  186. "filters": [],
  187. "orderBys": []
  188. },
  189. "removed": [
  190. {
  191. "key": "collection/a",
  192. "version": 1000,
  193. "value": {
  194. "key": "a"
  195. },
  196. "options": {
  197. "hasLocalMutations": false,
  198. "hasCommittedMutations": false
  199. }
  200. }
  201. ],
  202. "errorCode": 0,
  203. "fromCache": false,
  204. "hasPendingWrites": false
  205. }
  206. ]
  207. }
  208. ]
  209. },
  210. "Limbo documents are deleted with an existence filter": {
  211. "describeName": "Limbo Documents:",
  212. "itName": "Limbo documents are deleted with an existence filter",
  213. "tags": [],
  214. "config": {
  215. "useGarbageCollection": true,
  216. "numClients": 1
  217. },
  218. "steps": [
  219. {
  220. "userListen": [
  221. 2,
  222. {
  223. "path": "collection",
  224. "filters": [],
  225. "orderBys": []
  226. }
  227. ],
  228. "stateExpect": {
  229. "activeTargets": {
  230. "2": {
  231. "query": {
  232. "path": "collection",
  233. "filters": [],
  234. "orderBys": []
  235. },
  236. "resumeToken": ""
  237. }
  238. }
  239. }
  240. },
  241. {
  242. "watchAck": [
  243. 2
  244. ]
  245. },
  246. {
  247. "watchEntity": {
  248. "docs": [
  249. {
  250. "key": "collection/a",
  251. "version": 1000,
  252. "value": {
  253. "key": "a"
  254. },
  255. "options": {
  256. "hasLocalMutations": false,
  257. "hasCommittedMutations": false
  258. }
  259. }
  260. ],
  261. "targets": [
  262. 2
  263. ]
  264. }
  265. },
  266. {
  267. "watchCurrent": [
  268. [
  269. 2
  270. ],
  271. "resume-token-1000"
  272. ]
  273. },
  274. {
  275. "watchSnapshot": {
  276. "version": 1000,
  277. "targetIds": []
  278. },
  279. "expect": [
  280. {
  281. "query": {
  282. "path": "collection",
  283. "filters": [],
  284. "orderBys": []
  285. },
  286. "added": [
  287. {
  288. "key": "collection/a",
  289. "version": 1000,
  290. "value": {
  291. "key": "a"
  292. },
  293. "options": {
  294. "hasLocalMutations": false,
  295. "hasCommittedMutations": false
  296. }
  297. }
  298. ],
  299. "errorCode": 0,
  300. "fromCache": false,
  301. "hasPendingWrites": false
  302. }
  303. ]
  304. },
  305. {
  306. "watchReset": [
  307. 2
  308. ]
  309. },
  310. {
  311. "watchCurrent": [
  312. [
  313. 2
  314. ],
  315. "resume-token-1001"
  316. ]
  317. },
  318. {
  319. "watchSnapshot": {
  320. "version": 1001,
  321. "targetIds": []
  322. },
  323. "stateExpect": {
  324. "limboDocs": [
  325. "collection/a"
  326. ],
  327. "activeTargets": {
  328. "1": {
  329. "query": {
  330. "path": "collection/a",
  331. "filters": [],
  332. "orderBys": []
  333. },
  334. "resumeToken": ""
  335. },
  336. "2": {
  337. "query": {
  338. "path": "collection",
  339. "filters": [],
  340. "orderBys": []
  341. },
  342. "resumeToken": ""
  343. }
  344. }
  345. },
  346. "expect": [
  347. {
  348. "query": {
  349. "path": "collection",
  350. "filters": [],
  351. "orderBys": []
  352. },
  353. "errorCode": 0,
  354. "fromCache": true,
  355. "hasPendingWrites": false
  356. }
  357. ]
  358. },
  359. {
  360. "watchAck": [
  361. 1
  362. ]
  363. },
  364. {
  365. "watchFilter": [
  366. [
  367. 1
  368. ]
  369. ]
  370. },
  371. {
  372. "watchCurrent": [
  373. [
  374. 1
  375. ],
  376. "resume-token-1002"
  377. ]
  378. },
  379. {
  380. "watchSnapshot": {
  381. "version": 1002,
  382. "targetIds": []
  383. },
  384. "stateExpect": {
  385. "limboDocs": [],
  386. "activeTargets": {
  387. "2": {
  388. "query": {
  389. "path": "collection",
  390. "filters": [],
  391. "orderBys": []
  392. },
  393. "resumeToken": ""
  394. }
  395. }
  396. },
  397. "expect": [
  398. {
  399. "query": {
  400. "path": "collection",
  401. "filters": [],
  402. "orderBys": []
  403. },
  404. "removed": [
  405. {
  406. "key": "collection/a",
  407. "version": 1000,
  408. "value": {
  409. "key": "a"
  410. },
  411. "options": {
  412. "hasLocalMutations": false,
  413. "hasCommittedMutations": false
  414. }
  415. }
  416. ],
  417. "errorCode": 0,
  418. "fromCache": false,
  419. "hasPendingWrites": false
  420. }
  421. ]
  422. }
  423. ]
  424. },
  425. "Limbo documents are resolved with updates": {
  426. "describeName": "Limbo Documents:",
  427. "itName": "Limbo documents are resolved with updates",
  428. "tags": [],
  429. "config": {
  430. "useGarbageCollection": true,
  431. "numClients": 1
  432. },
  433. "steps": [
  434. {
  435. "userListen": [
  436. 2,
  437. {
  438. "path": "collection",
  439. "filters": [
  440. [
  441. "key",
  442. "==",
  443. "a"
  444. ]
  445. ],
  446. "orderBys": []
  447. }
  448. ],
  449. "stateExpect": {
  450. "activeTargets": {
  451. "2": {
  452. "query": {
  453. "path": "collection",
  454. "filters": [
  455. [
  456. "key",
  457. "==",
  458. "a"
  459. ]
  460. ],
  461. "orderBys": []
  462. },
  463. "resumeToken": ""
  464. }
  465. }
  466. }
  467. },
  468. {
  469. "watchAck": [
  470. 2
  471. ]
  472. },
  473. {
  474. "watchEntity": {
  475. "docs": [
  476. {
  477. "key": "collection/a",
  478. "version": 1000,
  479. "value": {
  480. "key": "a"
  481. },
  482. "options": {
  483. "hasLocalMutations": false,
  484. "hasCommittedMutations": false
  485. }
  486. }
  487. ],
  488. "targets": [
  489. 2
  490. ]
  491. }
  492. },
  493. {
  494. "watchCurrent": [
  495. [
  496. 2
  497. ],
  498. "resume-token-1000"
  499. ]
  500. },
  501. {
  502. "watchSnapshot": {
  503. "version": 1000,
  504. "targetIds": []
  505. },
  506. "expect": [
  507. {
  508. "query": {
  509. "path": "collection",
  510. "filters": [
  511. [
  512. "key",
  513. "==",
  514. "a"
  515. ]
  516. ],
  517. "orderBys": []
  518. },
  519. "added": [
  520. {
  521. "key": "collection/a",
  522. "version": 1000,
  523. "value": {
  524. "key": "a"
  525. },
  526. "options": {
  527. "hasLocalMutations": false,
  528. "hasCommittedMutations": false
  529. }
  530. }
  531. ],
  532. "errorCode": 0,
  533. "fromCache": false,
  534. "hasPendingWrites": false
  535. }
  536. ]
  537. },
  538. {
  539. "watchReset": [
  540. 2
  541. ]
  542. },
  543. {
  544. "watchCurrent": [
  545. [
  546. 2
  547. ],
  548. "resume-token-1001"
  549. ]
  550. },
  551. {
  552. "watchSnapshot": {
  553. "version": 1001,
  554. "targetIds": []
  555. },
  556. "stateExpect": {
  557. "limboDocs": [
  558. "collection/a"
  559. ],
  560. "activeTargets": {
  561. "1": {
  562. "query": {
  563. "path": "collection/a",
  564. "filters": [],
  565. "orderBys": []
  566. },
  567. "resumeToken": ""
  568. },
  569. "2": {
  570. "query": {
  571. "path": "collection",
  572. "filters": [
  573. [
  574. "key",
  575. "==",
  576. "a"
  577. ]
  578. ],
  579. "orderBys": []
  580. },
  581. "resumeToken": ""
  582. }
  583. }
  584. },
  585. "expect": [
  586. {
  587. "query": {
  588. "path": "collection",
  589. "filters": [
  590. [
  591. "key",
  592. "==",
  593. "a"
  594. ]
  595. ],
  596. "orderBys": []
  597. },
  598. "errorCode": 0,
  599. "fromCache": true,
  600. "hasPendingWrites": false
  601. }
  602. ]
  603. },
  604. {
  605. "watchAck": [
  606. 1
  607. ]
  608. },
  609. {
  610. "watchEntity": {
  611. "docs": [
  612. {
  613. "key": "collection/a",
  614. "version": 1000,
  615. "value": {
  616. "key": "b"
  617. },
  618. "options": {
  619. "hasLocalMutations": false,
  620. "hasCommittedMutations": false
  621. }
  622. }
  623. ],
  624. "targets": [
  625. 1
  626. ]
  627. }
  628. },
  629. {
  630. "watchCurrent": [
  631. [
  632. 1
  633. ],
  634. "resume-token-1002"
  635. ]
  636. },
  637. {
  638. "watchSnapshot": {
  639. "version": 1002,
  640. "targetIds": []
  641. },
  642. "stateExpect": {
  643. "limboDocs": [],
  644. "activeTargets": {
  645. "2": {
  646. "query": {
  647. "path": "collection",
  648. "filters": [
  649. [
  650. "key",
  651. "==",
  652. "a"
  653. ]
  654. ],
  655. "orderBys": []
  656. },
  657. "resumeToken": ""
  658. }
  659. }
  660. },
  661. "expect": [
  662. {
  663. "query": {
  664. "path": "collection",
  665. "filters": [
  666. [
  667. "key",
  668. "==",
  669. "a"
  670. ]
  671. ],
  672. "orderBys": []
  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. "Limbo documents are resolved with updates in different snapshot than \"current\"": {
  696. "describeName": "Limbo Documents:",
  697. "itName": "Limbo documents are resolved with updates in different snapshot than \"current\"",
  698. "tags": [],
  699. "config": {
  700. "useGarbageCollection": true,
  701. "numClients": 1
  702. },
  703. "steps": [
  704. {
  705. "userListen": [
  706. 2,
  707. {
  708. "path": "collection",
  709. "filters": [
  710. [
  711. "key",
  712. "==",
  713. "a"
  714. ]
  715. ],
  716. "orderBys": []
  717. }
  718. ],
  719. "stateExpect": {
  720. "activeTargets": {
  721. "2": {
  722. "query": {
  723. "path": "collection",
  724. "filters": [
  725. [
  726. "key",
  727. "==",
  728. "a"
  729. ]
  730. ],
  731. "orderBys": []
  732. },
  733. "resumeToken": ""
  734. }
  735. }
  736. }
  737. },
  738. {
  739. "watchAck": [
  740. 2
  741. ]
  742. },
  743. {
  744. "watchEntity": {
  745. "docs": [
  746. {
  747. "key": "collection/a",
  748. "version": 1000,
  749. "value": {
  750. "key": "a"
  751. },
  752. "options": {
  753. "hasLocalMutations": false,
  754. "hasCommittedMutations": false
  755. }
  756. }
  757. ],
  758. "targets": [
  759. 2
  760. ]
  761. }
  762. },
  763. {
  764. "watchCurrent": [
  765. [
  766. 2
  767. ],
  768. "resume-token-1000"
  769. ]
  770. },
  771. {
  772. "watchSnapshot": {
  773. "version": 1000,
  774. "targetIds": []
  775. },
  776. "expect": [
  777. {
  778. "query": {
  779. "path": "collection",
  780. "filters": [
  781. [
  782. "key",
  783. "==",
  784. "a"
  785. ]
  786. ],
  787. "orderBys": []
  788. },
  789. "added": [
  790. {
  791. "key": "collection/a",
  792. "version": 1000,
  793. "value": {
  794. "key": "a"
  795. },
  796. "options": {
  797. "hasLocalMutations": false,
  798. "hasCommittedMutations": false
  799. }
  800. }
  801. ],
  802. "errorCode": 0,
  803. "fromCache": false,
  804. "hasPendingWrites": false
  805. }
  806. ]
  807. },
  808. {
  809. "userListen": [
  810. 4,
  811. {
  812. "path": "collection",
  813. "filters": [
  814. [
  815. "key",
  816. "==",
  817. "b"
  818. ]
  819. ],
  820. "orderBys": []
  821. }
  822. ],
  823. "stateExpect": {
  824. "activeTargets": {
  825. "2": {
  826. "query": {
  827. "path": "collection",
  828. "filters": [
  829. [
  830. "key",
  831. "==",
  832. "a"
  833. ]
  834. ],
  835. "orderBys": []
  836. },
  837. "resumeToken": ""
  838. },
  839. "4": {
  840. "query": {
  841. "path": "collection",
  842. "filters": [
  843. [
  844. "key",
  845. "==",
  846. "b"
  847. ]
  848. ],
  849. "orderBys": []
  850. },
  851. "resumeToken": ""
  852. }
  853. }
  854. }
  855. },
  856. {
  857. "watchReset": [
  858. 2
  859. ]
  860. },
  861. {
  862. "watchCurrent": [
  863. [
  864. 2
  865. ],
  866. "resume-token-1001"
  867. ]
  868. },
  869. {
  870. "watchSnapshot": {
  871. "version": 1001,
  872. "targetIds": []
  873. },
  874. "stateExpect": {
  875. "limboDocs": [
  876. "collection/a"
  877. ],
  878. "activeTargets": {
  879. "1": {
  880. "query": {
  881. "path": "collection/a",
  882. "filters": [],
  883. "orderBys": []
  884. },
  885. "resumeToken": ""
  886. },
  887. "2": {
  888. "query": {
  889. "path": "collection",
  890. "filters": [
  891. [
  892. "key",
  893. "==",
  894. "a"
  895. ]
  896. ],
  897. "orderBys": []
  898. },
  899. "resumeToken": ""
  900. },
  901. "4": {
  902. "query": {
  903. "path": "collection",
  904. "filters": [
  905. [
  906. "key",
  907. "==",
  908. "b"
  909. ]
  910. ],
  911. "orderBys": []
  912. },
  913. "resumeToken": ""
  914. }
  915. }
  916. },
  917. "expect": [
  918. {
  919. "query": {
  920. "path": "collection",
  921. "filters": [
  922. [
  923. "key",
  924. "==",
  925. "a"
  926. ]
  927. ],
  928. "orderBys": []
  929. },
  930. "errorCode": 0,
  931. "fromCache": true,
  932. "hasPendingWrites": false
  933. }
  934. ]
  935. },
  936. {
  937. "watchAck": [
  938. 4
  939. ]
  940. },
  941. {
  942. "watchAck": [
  943. 1
  944. ]
  945. },
  946. {
  947. "watchEntity": {
  948. "docs": [
  949. {
  950. "key": "collection/a",
  951. "version": 1000,
  952. "value": {
  953. "key": "b"
  954. },
  955. "options": {
  956. "hasLocalMutations": false,
  957. "hasCommittedMutations": false
  958. }
  959. }
  960. ],
  961. "targets": [
  962. 1,
  963. 4
  964. ]
  965. }
  966. },
  967. {
  968. "watchCurrent": [
  969. [
  970. 4
  971. ],
  972. "resume-token-1002"
  973. ]
  974. },
  975. {
  976. "watchSnapshot": {
  977. "version": 1002,
  978. "targetIds": []
  979. },
  980. "stateExpect": {
  981. "limboDocs": [],
  982. "activeTargets": {
  983. "2": {
  984. "query": {
  985. "path": "collection",
  986. "filters": [
  987. [
  988. "key",
  989. "==",
  990. "a"
  991. ]
  992. ],
  993. "orderBys": []
  994. },
  995. "resumeToken": ""
  996. },
  997. "4": {
  998. "query": {
  999. "path": "collection",
  1000. "filters": [
  1001. [
  1002. "key",
  1003. "==",
  1004. "b"
  1005. ]
  1006. ],
  1007. "orderBys": []
  1008. },
  1009. "resumeToken": ""
  1010. }
  1011. }
  1012. },
  1013. "expect": [
  1014. {
  1015. "query": {
  1016. "path": "collection",
  1017. "filters": [
  1018. [
  1019. "key",
  1020. "==",
  1021. "a"
  1022. ]
  1023. ],
  1024. "orderBys": []
  1025. },
  1026. "removed": [
  1027. {
  1028. "key": "collection/a",
  1029. "version": 1000,
  1030. "value": {
  1031. "key": "a"
  1032. },
  1033. "options": {
  1034. "hasLocalMutations": false,
  1035. "hasCommittedMutations": false
  1036. }
  1037. }
  1038. ],
  1039. "errorCode": 0,
  1040. "fromCache": false,
  1041. "hasPendingWrites": false
  1042. },
  1043. {
  1044. "query": {
  1045. "path": "collection",
  1046. "filters": [
  1047. [
  1048. "key",
  1049. "==",
  1050. "b"
  1051. ]
  1052. ],
  1053. "orderBys": []
  1054. },
  1055. "added": [
  1056. {
  1057. "key": "collection/a",
  1058. "version": 1000,
  1059. "value": {
  1060. "key": "b"
  1061. },
  1062. "options": {
  1063. "hasLocalMutations": false,
  1064. "hasCommittedMutations": false
  1065. }
  1066. }
  1067. ],
  1068. "errorCode": 0,
  1069. "fromCache": false,
  1070. "hasPendingWrites": false
  1071. }
  1072. ]
  1073. },
  1074. {
  1075. "watchCurrent": [
  1076. [
  1077. 1
  1078. ],
  1079. "resume-token-1003"
  1080. ]
  1081. },
  1082. {
  1083. "watchSnapshot": {
  1084. "version": 1003,
  1085. "targetIds": []
  1086. }
  1087. }
  1088. ]
  1089. },
  1090. "Document remove message will cause docs to go in limbo": {
  1091. "describeName": "Limbo Documents:",
  1092. "itName": "Document remove message will cause docs to go in limbo",
  1093. "tags": [],
  1094. "config": {
  1095. "useGarbageCollection": true,
  1096. "numClients": 1
  1097. },
  1098. "steps": [
  1099. {
  1100. "userListen": [
  1101. 2,
  1102. {
  1103. "path": "collection",
  1104. "filters": [],
  1105. "orderBys": []
  1106. }
  1107. ],
  1108. "stateExpect": {
  1109. "activeTargets": {
  1110. "2": {
  1111. "query": {
  1112. "path": "collection",
  1113. "filters": [],
  1114. "orderBys": []
  1115. },
  1116. "resumeToken": ""
  1117. }
  1118. }
  1119. }
  1120. },
  1121. {
  1122. "watchAck": [
  1123. 2
  1124. ]
  1125. },
  1126. {
  1127. "watchEntity": {
  1128. "docs": [
  1129. {
  1130. "key": "collection/a",
  1131. "version": 1000,
  1132. "value": {
  1133. "key": "a"
  1134. },
  1135. "options": {
  1136. "hasLocalMutations": false,
  1137. "hasCommittedMutations": false
  1138. }
  1139. },
  1140. {
  1141. "key": "collection/b",
  1142. "version": 1001,
  1143. "value": {
  1144. "key": "b"
  1145. },
  1146. "options": {
  1147. "hasLocalMutations": false,
  1148. "hasCommittedMutations": false
  1149. }
  1150. }
  1151. ],
  1152. "targets": [
  1153. 2
  1154. ]
  1155. }
  1156. },
  1157. {
  1158. "watchCurrent": [
  1159. [
  1160. 2
  1161. ],
  1162. "resume-token-1002"
  1163. ]
  1164. },
  1165. {
  1166. "watchSnapshot": {
  1167. "version": 1002,
  1168. "targetIds": []
  1169. },
  1170. "expect": [
  1171. {
  1172. "query": {
  1173. "path": "collection",
  1174. "filters": [],
  1175. "orderBys": []
  1176. },
  1177. "added": [
  1178. {
  1179. "key": "collection/a",
  1180. "version": 1000,
  1181. "value": {
  1182. "key": "a"
  1183. },
  1184. "options": {
  1185. "hasLocalMutations": false,
  1186. "hasCommittedMutations": false
  1187. }
  1188. },
  1189. {
  1190. "key": "collection/b",
  1191. "version": 1001,
  1192. "value": {
  1193. "key": "b"
  1194. },
  1195. "options": {
  1196. "hasLocalMutations": false,
  1197. "hasCommittedMutations": false
  1198. }
  1199. }
  1200. ],
  1201. "errorCode": 0,
  1202. "fromCache": false,
  1203. "hasPendingWrites": false
  1204. }
  1205. ]
  1206. },
  1207. {
  1208. "watchEntity": {
  1209. "key": "collection/b",
  1210. "removedTargets": [
  1211. 2
  1212. ]
  1213. }
  1214. },
  1215. {
  1216. "watchSnapshot": {
  1217. "version": 1003,
  1218. "targetIds": []
  1219. },
  1220. "stateExpect": {
  1221. "limboDocs": [
  1222. "collection/b"
  1223. ],
  1224. "activeTargets": {
  1225. "1": {
  1226. "query": {
  1227. "path": "collection/b",
  1228. "filters": [],
  1229. "orderBys": []
  1230. },
  1231. "resumeToken": ""
  1232. },
  1233. "2": {
  1234. "query": {
  1235. "path": "collection",
  1236. "filters": [],
  1237. "orderBys": []
  1238. },
  1239. "resumeToken": ""
  1240. }
  1241. }
  1242. },
  1243. "expect": [
  1244. {
  1245. "query": {
  1246. "path": "collection",
  1247. "filters": [],
  1248. "orderBys": []
  1249. },
  1250. "errorCode": 0,
  1251. "fromCache": true,
  1252. "hasPendingWrites": false
  1253. }
  1254. ]
  1255. },
  1256. {
  1257. "watchAck": [
  1258. 1
  1259. ]
  1260. },
  1261. {
  1262. "watchCurrent": [
  1263. [
  1264. 1
  1265. ],
  1266. "resume-token-1004"
  1267. ]
  1268. },
  1269. {
  1270. "watchSnapshot": {
  1271. "version": 1004,
  1272. "targetIds": []
  1273. },
  1274. "stateExpect": {
  1275. "limboDocs": [],
  1276. "activeTargets": {
  1277. "2": {
  1278. "query": {
  1279. "path": "collection",
  1280. "filters": [],
  1281. "orderBys": []
  1282. },
  1283. "resumeToken": ""
  1284. }
  1285. }
  1286. },
  1287. "expect": [
  1288. {
  1289. "query": {
  1290. "path": "collection",
  1291. "filters": [],
  1292. "orderBys": []
  1293. },
  1294. "removed": [
  1295. {
  1296. "key": "collection/b",
  1297. "version": 1001,
  1298. "value": {
  1299. "key": "b"
  1300. },
  1301. "options": {
  1302. "hasLocalMutations": false,
  1303. "hasCommittedMutations": false
  1304. }
  1305. }
  1306. ],
  1307. "errorCode": 0,
  1308. "fromCache": false,
  1309. "hasPendingWrites": false
  1310. }
  1311. ]
  1312. }
  1313. ]
  1314. },
  1315. "Limbo resolution handles snapshot before CURRENT": {
  1316. "describeName": "Limbo Documents:",
  1317. "itName": "Limbo resolution handles snapshot before CURRENT",
  1318. "tags": [],
  1319. "config": {
  1320. "useGarbageCollection": false,
  1321. "numClients": 1
  1322. },
  1323. "steps": [
  1324. {
  1325. "userListen": [
  1326. 2,
  1327. {
  1328. "path": "collection",
  1329. "filters": [],
  1330. "orderBys": []
  1331. }
  1332. ],
  1333. "stateExpect": {
  1334. "activeTargets": {
  1335. "2": {
  1336. "query": {
  1337. "path": "collection",
  1338. "filters": [],
  1339. "orderBys": []
  1340. },
  1341. "resumeToken": ""
  1342. }
  1343. }
  1344. }
  1345. },
  1346. {
  1347. "watchAck": [
  1348. 2
  1349. ]
  1350. },
  1351. {
  1352. "watchEntity": {
  1353. "docs": [
  1354. {
  1355. "key": "collection/a",
  1356. "version": 1000,
  1357. "value": {
  1358. "include": true,
  1359. "key": "a"
  1360. },
  1361. "options": {
  1362. "hasLocalMutations": false,
  1363. "hasCommittedMutations": false
  1364. }
  1365. },
  1366. {
  1367. "key": "collection/b",
  1368. "version": 1000,
  1369. "value": {
  1370. "include": true,
  1371. "key": "b"
  1372. },
  1373. "options": {
  1374. "hasLocalMutations": false,
  1375. "hasCommittedMutations": false
  1376. }
  1377. }
  1378. ],
  1379. "targets": [
  1380. 2
  1381. ]
  1382. }
  1383. },
  1384. {
  1385. "watchCurrent": [
  1386. [
  1387. 2
  1388. ],
  1389. "resume-token-1000"
  1390. ]
  1391. },
  1392. {
  1393. "watchSnapshot": {
  1394. "version": 1000,
  1395. "targetIds": []
  1396. },
  1397. "expect": [
  1398. {
  1399. "query": {
  1400. "path": "collection",
  1401. "filters": [],
  1402. "orderBys": []
  1403. },
  1404. "added": [
  1405. {
  1406. "key": "collection/a",
  1407. "version": 1000,
  1408. "value": {
  1409. "include": true,
  1410. "key": "a"
  1411. },
  1412. "options": {
  1413. "hasLocalMutations": false,
  1414. "hasCommittedMutations": false
  1415. }
  1416. },
  1417. {
  1418. "key": "collection/b",
  1419. "version": 1000,
  1420. "value": {
  1421. "include": true,
  1422. "key": "b"
  1423. },
  1424. "options": {
  1425. "hasLocalMutations": false,
  1426. "hasCommittedMutations": false
  1427. }
  1428. }
  1429. ],
  1430. "errorCode": 0,
  1431. "fromCache": false,
  1432. "hasPendingWrites": false
  1433. }
  1434. ]
  1435. },
  1436. {
  1437. "userUnlisten": [
  1438. 2,
  1439. {
  1440. "path": "collection",
  1441. "filters": [],
  1442. "orderBys": []
  1443. }
  1444. ],
  1445. "stateExpect": {
  1446. "activeTargets": {}
  1447. }
  1448. },
  1449. {
  1450. "userListen": [
  1451. 4,
  1452. {
  1453. "path": "collection",
  1454. "limit": 1,
  1455. "filters": [
  1456. [
  1457. "include",
  1458. "==",
  1459. true
  1460. ]
  1461. ],
  1462. "orderBys": []
  1463. }
  1464. ],
  1465. "stateExpect": {
  1466. "activeTargets": {
  1467. "4": {
  1468. "query": {
  1469. "path": "collection",
  1470. "limit": 1,
  1471. "filters": [
  1472. [
  1473. "include",
  1474. "==",
  1475. true
  1476. ]
  1477. ],
  1478. "orderBys": []
  1479. },
  1480. "resumeToken": ""
  1481. }
  1482. }
  1483. },
  1484. "expect": [
  1485. {
  1486. "query": {
  1487. "path": "collection",
  1488. "limit": 1,
  1489. "filters": [
  1490. [
  1491. "include",
  1492. "==",
  1493. true
  1494. ]
  1495. ],
  1496. "orderBys": []
  1497. },
  1498. "added": [
  1499. {
  1500. "key": "collection/a",
  1501. "version": 1000,
  1502. "value": {
  1503. "include": true,
  1504. "key": "a"
  1505. },
  1506. "options": {
  1507. "hasLocalMutations": false,
  1508. "hasCommittedMutations": false
  1509. }
  1510. }
  1511. ],
  1512. "errorCode": 0,
  1513. "fromCache": true,
  1514. "hasPendingWrites": false
  1515. }
  1516. ]
  1517. },
  1518. {
  1519. "watchAck": [
  1520. 4
  1521. ]
  1522. },
  1523. {
  1524. "watchEntity": {
  1525. "docs": [
  1526. {
  1527. "key": "collection/a",
  1528. "version": 1000,
  1529. "value": {
  1530. "include": true,
  1531. "key": "a"
  1532. },
  1533. "options": {
  1534. "hasLocalMutations": false,
  1535. "hasCommittedMutations": false
  1536. }
  1537. }
  1538. ],
  1539. "targets": [
  1540. 4
  1541. ]
  1542. }
  1543. },
  1544. {
  1545. "watchCurrent": [
  1546. [
  1547. 4
  1548. ],
  1549. "resume-token-2000"
  1550. ]
  1551. },
  1552. {
  1553. "watchSnapshot": {
  1554. "version": 2000,
  1555. "targetIds": []
  1556. },
  1557. "expect": [
  1558. {
  1559. "query": {
  1560. "path": "collection",
  1561. "limit": 1,
  1562. "filters": [
  1563. [
  1564. "include",
  1565. "==",
  1566. true
  1567. ]
  1568. ],
  1569. "orderBys": []
  1570. },
  1571. "errorCode": 0,
  1572. "fromCache": false,
  1573. "hasPendingWrites": false
  1574. }
  1575. ]
  1576. },
  1577. {
  1578. "userPatch": [
  1579. "collection/a",
  1580. {
  1581. "include": false
  1582. }
  1583. ],
  1584. "expect": [
  1585. {
  1586. "query": {
  1587. "path": "collection",
  1588. "limit": 1,
  1589. "filters": [
  1590. [
  1591. "include",
  1592. "==",
  1593. true
  1594. ]
  1595. ],
  1596. "orderBys": []
  1597. },
  1598. "added": [
  1599. {
  1600. "key": "collection/b",
  1601. "version": 1000,
  1602. "value": {
  1603. "include": true,
  1604. "key": "b"
  1605. },
  1606. "options": {
  1607. "hasLocalMutations": false,
  1608. "hasCommittedMutations": false
  1609. }
  1610. }
  1611. ],
  1612. "removed": [
  1613. {
  1614. "key": "collection/a",
  1615. "version": 1000,
  1616. "value": {
  1617. "include": true,
  1618. "key": "a"
  1619. },
  1620. "options": {
  1621. "hasLocalMutations": false,
  1622. "hasCommittedMutations": false
  1623. }
  1624. }
  1625. ],
  1626. "errorCode": 0,
  1627. "fromCache": true,
  1628. "hasPendingWrites": false
  1629. }
  1630. ],
  1631. "stateExpect": {
  1632. "limboDocs": [
  1633. "collection/b"
  1634. ],
  1635. "activeTargets": {
  1636. "1": {
  1637. "query": {
  1638. "path": "collection/b",
  1639. "filters": [],
  1640. "orderBys": []
  1641. },
  1642. "resumeToken": ""
  1643. },
  1644. "4": {
  1645. "query": {
  1646. "path": "collection",
  1647. "limit": 1,
  1648. "filters": [
  1649. [
  1650. "include",
  1651. "==",
  1652. true
  1653. ]
  1654. ],
  1655. "orderBys": []
  1656. },
  1657. "resumeToken": ""
  1658. }
  1659. }
  1660. }
  1661. },
  1662. {
  1663. "watchAck": [
  1664. 1
  1665. ]
  1666. },
  1667. {
  1668. "watchEntity": {
  1669. "docs": [
  1670. {
  1671. "key": "collection/b",
  1672. "version": 1000,
  1673. "value": {
  1674. "include": true,
  1675. "key": "b"
  1676. },
  1677. "options": {
  1678. "hasLocalMutations": false,
  1679. "hasCommittedMutations": false
  1680. }
  1681. }
  1682. ],
  1683. "targets": [
  1684. 1
  1685. ]
  1686. }
  1687. },
  1688. {
  1689. "watchSnapshot": {
  1690. "version": 2000,
  1691. "targetIds": []
  1692. }
  1693. },
  1694. {
  1695. "watchCurrent": [
  1696. [
  1697. 1
  1698. ],
  1699. "resume-token-3000"
  1700. ]
  1701. },
  1702. {
  1703. "watchSnapshot": {
  1704. "version": 3000,
  1705. "targetIds": []
  1706. }
  1707. },
  1708. {
  1709. "watchEntity": {
  1710. "docs": [
  1711. {
  1712. "key": "collection/a",
  1713. "version": 1000,
  1714. "value": {
  1715. "include": true,
  1716. "key": "a"
  1717. },
  1718. "options": {
  1719. "hasLocalMutations": false,
  1720. "hasCommittedMutations": false
  1721. }
  1722. }
  1723. ],
  1724. "removedTargets": [
  1725. 4
  1726. ]
  1727. }
  1728. },
  1729. {
  1730. "watchEntity": {
  1731. "docs": [
  1732. {
  1733. "key": "collection/b",
  1734. "version": 1000,
  1735. "value": {
  1736. "include": true,
  1737. "key": "b"
  1738. },
  1739. "options": {
  1740. "hasLocalMutations": false,
  1741. "hasCommittedMutations": false
  1742. }
  1743. }
  1744. ],
  1745. "targets": [
  1746. 4
  1747. ]
  1748. }
  1749. },
  1750. {
  1751. "watchSnapshot": {
  1752. "version": 4000,
  1753. "targetIds": []
  1754. },
  1755. "expect": [
  1756. {
  1757. "query": {
  1758. "path": "collection",
  1759. "limit": 1,
  1760. "filters": [
  1761. [
  1762. "include",
  1763. "==",
  1764. true
  1765. ]
  1766. ],
  1767. "orderBys": []
  1768. },
  1769. "errorCode": 0,
  1770. "fromCache": false,
  1771. "hasPendingWrites": false
  1772. }
  1773. ],
  1774. "stateExpect": {
  1775. "limboDocs": [],
  1776. "activeTargets": {
  1777. "4": {
  1778. "query": {
  1779. "path": "collection",
  1780. "limit": 1,
  1781. "filters": [
  1782. [
  1783. "include",
  1784. "==",
  1785. true
  1786. ]
  1787. ],
  1788. "orderBys": []
  1789. },
  1790. "resumeToken": ""
  1791. }
  1792. }
  1793. }
  1794. }
  1795. ]
  1796. },
  1797. "Limbo resolution handles snapshot before CURRENT [no document update]": {
  1798. "describeName": "Limbo Documents:",
  1799. "itName": "Limbo resolution handles snapshot before CURRENT [no document update]",
  1800. "tags": [],
  1801. "config": {
  1802. "useGarbageCollection": false,
  1803. "numClients": 1
  1804. },
  1805. "steps": [
  1806. {
  1807. "userListen": [
  1808. 2,
  1809. {
  1810. "path": "collection",
  1811. "filters": [],
  1812. "orderBys": []
  1813. }
  1814. ],
  1815. "stateExpect": {
  1816. "activeTargets": {
  1817. "2": {
  1818. "query": {
  1819. "path": "collection",
  1820. "filters": [],
  1821. "orderBys": []
  1822. },
  1823. "resumeToken": ""
  1824. }
  1825. }
  1826. }
  1827. },
  1828. {
  1829. "watchAck": [
  1830. 2
  1831. ]
  1832. },
  1833. {
  1834. "watchEntity": {
  1835. "docs": [
  1836. {
  1837. "key": "collection/a",
  1838. "version": 1000,
  1839. "value": {
  1840. "include": true,
  1841. "key": "a"
  1842. },
  1843. "options": {
  1844. "hasLocalMutations": false,
  1845. "hasCommittedMutations": false
  1846. }
  1847. },
  1848. {
  1849. "key": "collection/b",
  1850. "version": 1000,
  1851. "value": {
  1852. "include": true,
  1853. "key": "b"
  1854. },
  1855. "options": {
  1856. "hasLocalMutations": false,
  1857. "hasCommittedMutations": false
  1858. }
  1859. }
  1860. ],
  1861. "targets": [
  1862. 2
  1863. ]
  1864. }
  1865. },
  1866. {
  1867. "watchCurrent": [
  1868. [
  1869. 2
  1870. ],
  1871. "resume-token-1000"
  1872. ]
  1873. },
  1874. {
  1875. "watchSnapshot": {
  1876. "version": 1000,
  1877. "targetIds": []
  1878. },
  1879. "expect": [
  1880. {
  1881. "query": {
  1882. "path": "collection",
  1883. "filters": [],
  1884. "orderBys": []
  1885. },
  1886. "added": [
  1887. {
  1888. "key": "collection/a",
  1889. "version": 1000,
  1890. "value": {
  1891. "include": true,
  1892. "key": "a"
  1893. },
  1894. "options": {
  1895. "hasLocalMutations": false,
  1896. "hasCommittedMutations": false
  1897. }
  1898. },
  1899. {
  1900. "key": "collection/b",
  1901. "version": 1000,
  1902. "value": {
  1903. "include": true,
  1904. "key": "b"
  1905. },
  1906. "options": {
  1907. "hasLocalMutations": false,
  1908. "hasCommittedMutations": false
  1909. }
  1910. }
  1911. ],
  1912. "errorCode": 0,
  1913. "fromCache": false,
  1914. "hasPendingWrites": false
  1915. }
  1916. ]
  1917. },
  1918. {
  1919. "userUnlisten": [
  1920. 2,
  1921. {
  1922. "path": "collection",
  1923. "filters": [],
  1924. "orderBys": []
  1925. }
  1926. ],
  1927. "stateExpect": {
  1928. "activeTargets": {}
  1929. }
  1930. },
  1931. {
  1932. "userListen": [
  1933. 4,
  1934. {
  1935. "path": "collection",
  1936. "limit": 1,
  1937. "filters": [
  1938. [
  1939. "include",
  1940. "==",
  1941. true
  1942. ]
  1943. ],
  1944. "orderBys": []
  1945. }
  1946. ],
  1947. "stateExpect": {
  1948. "activeTargets": {
  1949. "4": {
  1950. "query": {
  1951. "path": "collection",
  1952. "limit": 1,
  1953. "filters": [
  1954. [
  1955. "include",
  1956. "==",
  1957. true
  1958. ]
  1959. ],
  1960. "orderBys": []
  1961. },
  1962. "resumeToken": ""
  1963. }
  1964. }
  1965. },
  1966. "expect": [
  1967. {
  1968. "query": {
  1969. "path": "collection",
  1970. "limit": 1,
  1971. "filters": [
  1972. [
  1973. "include",
  1974. "==",
  1975. true
  1976. ]
  1977. ],
  1978. "orderBys": []
  1979. },
  1980. "added": [
  1981. {
  1982. "key": "collection/a",
  1983. "version": 1000,
  1984. "value": {
  1985. "include": true,
  1986. "key": "a"
  1987. },
  1988. "options": {
  1989. "hasLocalMutations": false,
  1990. "hasCommittedMutations": false
  1991. }
  1992. }
  1993. ],
  1994. "errorCode": 0,
  1995. "fromCache": true,
  1996. "hasPendingWrites": false
  1997. }
  1998. ]
  1999. },
  2000. {
  2001. "watchAck": [
  2002. 4
  2003. ]
  2004. },
  2005. {
  2006. "watchEntity": {
  2007. "docs": [
  2008. {
  2009. "key": "collection/a",
  2010. "version": 1000,
  2011. "value": {
  2012. "include": true,
  2013. "key": "a"
  2014. },
  2015. "options": {
  2016. "hasLocalMutations": false,
  2017. "hasCommittedMutations": false
  2018. }
  2019. }
  2020. ],
  2021. "targets": [
  2022. 4
  2023. ]
  2024. }
  2025. },
  2026. {
  2027. "watchCurrent": [
  2028. [
  2029. 4
  2030. ],
  2031. "resume-token-2000"
  2032. ]
  2033. },
  2034. {
  2035. "watchSnapshot": {
  2036. "version": 2000,
  2037. "targetIds": []
  2038. },
  2039. "expect": [
  2040. {
  2041. "query": {
  2042. "path": "collection",
  2043. "limit": 1,
  2044. "filters": [
  2045. [
  2046. "include",
  2047. "==",
  2048. true
  2049. ]
  2050. ],
  2051. "orderBys": []
  2052. },
  2053. "errorCode": 0,
  2054. "fromCache": false,
  2055. "hasPendingWrites": false
  2056. }
  2057. ]
  2058. },
  2059. {
  2060. "userPatch": [
  2061. "collection/a",
  2062. {
  2063. "include": false
  2064. }
  2065. ],
  2066. "expect": [
  2067. {
  2068. "query": {
  2069. "path": "collection",
  2070. "limit": 1,
  2071. "filters": [
  2072. [
  2073. "include",
  2074. "==",
  2075. true
  2076. ]
  2077. ],
  2078. "orderBys": []
  2079. },
  2080. "added": [
  2081. {
  2082. "key": "collection/b",
  2083. "version": 1000,
  2084. "value": {
  2085. "include": true,
  2086. "key": "b"
  2087. },
  2088. "options": {
  2089. "hasLocalMutations": false,
  2090. "hasCommittedMutations": false
  2091. }
  2092. }
  2093. ],
  2094. "removed": [
  2095. {
  2096. "key": "collection/a",
  2097. "version": 1000,
  2098. "value": {
  2099. "include": true,
  2100. "key": "a"
  2101. },
  2102. "options": {
  2103. "hasLocalMutations": false,
  2104. "hasCommittedMutations": false
  2105. }
  2106. }
  2107. ],
  2108. "errorCode": 0,
  2109. "fromCache": true,
  2110. "hasPendingWrites": false
  2111. }
  2112. ],
  2113. "stateExpect": {
  2114. "limboDocs": [
  2115. "collection/b"
  2116. ],
  2117. "activeTargets": {
  2118. "1": {
  2119. "query": {
  2120. "path": "collection/b",
  2121. "filters": [],
  2122. "orderBys": []
  2123. },
  2124. "resumeToken": ""
  2125. },
  2126. "4": {
  2127. "query": {
  2128. "path": "collection",
  2129. "limit": 1,
  2130. "filters": [
  2131. [
  2132. "include",
  2133. "==",
  2134. true
  2135. ]
  2136. ],
  2137. "orderBys": []
  2138. },
  2139. "resumeToken": ""
  2140. }
  2141. }
  2142. }
  2143. },
  2144. {
  2145. "watchAck": [
  2146. 1
  2147. ]
  2148. },
  2149. {
  2150. "watchSnapshot": {
  2151. "version": 2000,
  2152. "targetIds": []
  2153. }
  2154. },
  2155. {
  2156. "watchCurrent": [
  2157. [
  2158. 1
  2159. ],
  2160. "resume-token-3000"
  2161. ]
  2162. },
  2163. {
  2164. "watchSnapshot": {
  2165. "version": 3000,
  2166. "targetIds": []
  2167. },
  2168. "stateExpect": {
  2169. "limboDocs": [],
  2170. "activeTargets": {
  2171. "4": {
  2172. "query": {
  2173. "path": "collection",
  2174. "limit": 1,
  2175. "filters": [
  2176. [
  2177. "include",
  2178. "==",
  2179. true
  2180. ]
  2181. ],
  2182. "orderBys": []
  2183. },
  2184. "resumeToken": ""
  2185. }
  2186. }
  2187. },
  2188. "expect": [
  2189. {
  2190. "query": {
  2191. "path": "collection",
  2192. "limit": 1,
  2193. "filters": [
  2194. [
  2195. "include",
  2196. "==",
  2197. true
  2198. ]
  2199. ],
  2200. "orderBys": []
  2201. },
  2202. "removed": [
  2203. {
  2204. "key": "collection/b",
  2205. "version": 1000,
  2206. "value": {
  2207. "include": true,
  2208. "key": "b"
  2209. },
  2210. "options": {
  2211. "hasLocalMutations": false,
  2212. "hasCommittedMutations": false
  2213. }
  2214. }
  2215. ],
  2216. "errorCode": 0,
  2217. "fromCache": false,
  2218. "hasPendingWrites": false
  2219. }
  2220. ]
  2221. },
  2222. {
  2223. "watchEntity": {
  2224. "docs": [
  2225. {
  2226. "key": "collection/a",
  2227. "version": 1000,
  2228. "value": {
  2229. "include": true,
  2230. "key": "a"
  2231. },
  2232. "options": {
  2233. "hasLocalMutations": false,
  2234. "hasCommittedMutations": false
  2235. }
  2236. }
  2237. ],
  2238. "removedTargets": [
  2239. 4
  2240. ]
  2241. }
  2242. },
  2243. {
  2244. "watchSnapshot": {
  2245. "version": 4000,
  2246. "targetIds": []
  2247. }
  2248. }
  2249. ]
  2250. },
  2251. "Limbo docs are resolved by primary client": {
  2252. "describeName": "Limbo Documents:",
  2253. "itName": "Limbo docs are resolved by primary client",
  2254. "tags": [
  2255. "multi-client"
  2256. ],
  2257. "config": {
  2258. "useGarbageCollection": false,
  2259. "numClients": 2
  2260. },
  2261. "steps": [
  2262. {
  2263. "drainQueue": true,
  2264. "stateExpect": {
  2265. "isPrimary": true
  2266. },
  2267. "clientIndex": 0
  2268. },
  2269. {
  2270. "drainQueue": true,
  2271. "clientIndex": 1
  2272. },
  2273. {
  2274. "userListen": [
  2275. 2,
  2276. {
  2277. "path": "collection",
  2278. "filters": [],
  2279. "orderBys": []
  2280. }
  2281. ],
  2282. "stateExpect": {
  2283. "activeTargets": {
  2284. "2": {
  2285. "query": {
  2286. "path": "collection",
  2287. "filters": [],
  2288. "orderBys": []
  2289. },
  2290. "resumeToken": ""
  2291. }
  2292. }
  2293. },
  2294. "clientIndex": 1
  2295. },
  2296. {
  2297. "drainQueue": true,
  2298. "stateExpect": {
  2299. "activeTargets": {
  2300. "2": {
  2301. "query": {
  2302. "path": "collection",
  2303. "filters": [],
  2304. "orderBys": []
  2305. },
  2306. "resumeToken": ""
  2307. }
  2308. }
  2309. },
  2310. "clientIndex": 0
  2311. },
  2312. {
  2313. "watchAck": [
  2314. 2
  2315. ],
  2316. "clientIndex": 0
  2317. },
  2318. {
  2319. "watchEntity": {
  2320. "docs": [
  2321. {
  2322. "key": "collection/a",
  2323. "version": 1000,
  2324. "value": {
  2325. "key": "a"
  2326. },
  2327. "options": {
  2328. "hasLocalMutations": false,
  2329. "hasCommittedMutations": false
  2330. }
  2331. },
  2332. {
  2333. "key": "collection/b",
  2334. "version": 1001,
  2335. "value": {
  2336. "key": "b"
  2337. },
  2338. "options": {
  2339. "hasLocalMutations": false,
  2340. "hasCommittedMutations": false
  2341. }
  2342. }
  2343. ],
  2344. "targets": [
  2345. 2
  2346. ]
  2347. },
  2348. "clientIndex": 0
  2349. },
  2350. {
  2351. "watchCurrent": [
  2352. [
  2353. 2
  2354. ],
  2355. "resume-token-1002"
  2356. ],
  2357. "clientIndex": 0
  2358. },
  2359. {
  2360. "watchSnapshot": {
  2361. "version": 1002,
  2362. "targetIds": []
  2363. },
  2364. "clientIndex": 0
  2365. },
  2366. {
  2367. "drainQueue": true,
  2368. "expect": [
  2369. {
  2370. "query": {
  2371. "path": "collection",
  2372. "filters": [],
  2373. "orderBys": []
  2374. },
  2375. "added": [
  2376. {
  2377. "key": "collection/a",
  2378. "version": 1000,
  2379. "value": {
  2380. "key": "a"
  2381. },
  2382. "options": {
  2383. "hasLocalMutations": false,
  2384. "hasCommittedMutations": false
  2385. }
  2386. },
  2387. {
  2388. "key": "collection/b",
  2389. "version": 1001,
  2390. "value": {
  2391. "key": "b"
  2392. },
  2393. "options": {
  2394. "hasLocalMutations": false,
  2395. "hasCommittedMutations": false
  2396. }
  2397. }
  2398. ],
  2399. "errorCode": 0,
  2400. "fromCache": false,
  2401. "hasPendingWrites": false
  2402. }
  2403. ],
  2404. "clientIndex": 1
  2405. },
  2406. {
  2407. "drainQueue": true,
  2408. "clientIndex": 0
  2409. },
  2410. {
  2411. "watchEntity": {
  2412. "key": "collection/b",
  2413. "removedTargets": [
  2414. 2
  2415. ]
  2416. },
  2417. "clientIndex": 0
  2418. },
  2419. {
  2420. "watchSnapshot": {
  2421. "version": 1003,
  2422. "targetIds": []
  2423. },
  2424. "stateExpect": {
  2425. "limboDocs": [
  2426. "collection/b"
  2427. ],
  2428. "activeTargets": {
  2429. "1": {
  2430. "query": {
  2431. "path": "collection/b",
  2432. "filters": [],
  2433. "orderBys": []
  2434. },
  2435. "resumeToken": ""
  2436. },
  2437. "2": {
  2438. "query": {
  2439. "path": "collection",
  2440. "filters": [],
  2441. "orderBys": []
  2442. },
  2443. "resumeToken": ""
  2444. }
  2445. }
  2446. },
  2447. "clientIndex": 0
  2448. },
  2449. {
  2450. "drainQueue": true,
  2451. "expect": [
  2452. {
  2453. "query": {
  2454. "path": "collection",
  2455. "filters": [],
  2456. "orderBys": []
  2457. },
  2458. "errorCode": 0,
  2459. "fromCache": true,
  2460. "hasPendingWrites": false
  2461. }
  2462. ],
  2463. "clientIndex": 1
  2464. },
  2465. {
  2466. "drainQueue": true,
  2467. "clientIndex": 0
  2468. },
  2469. {
  2470. "watchAck": [
  2471. 1
  2472. ],
  2473. "clientIndex": 0
  2474. },
  2475. {
  2476. "watchCurrent": [
  2477. [
  2478. 1
  2479. ],
  2480. "resume-token-1004"
  2481. ],
  2482. "clientIndex": 0
  2483. },
  2484. {
  2485. "watchSnapshot": {
  2486. "version": 1004,
  2487. "targetIds": []
  2488. },
  2489. "stateExpect": {
  2490. "limboDocs": [],
  2491. "activeTargets": {
  2492. "2": {
  2493. "query": {
  2494. "path": "collection",
  2495. "filters": [],
  2496. "orderBys": []
  2497. },
  2498. "resumeToken": ""
  2499. }
  2500. }
  2501. },
  2502. "clientIndex": 0
  2503. },
  2504. {
  2505. "drainQueue": true,
  2506. "expect": [
  2507. {
  2508. "query": {
  2509. "path": "collection",
  2510. "filters": [],
  2511. "orderBys": []
  2512. },
  2513. "removed": [
  2514. {
  2515. "key": "collection/b",
  2516. "version": 1001,
  2517. "value": {
  2518. "key": "b"
  2519. },
  2520. "options": {
  2521. "hasLocalMutations": false,
  2522. "hasCommittedMutations": false
  2523. }
  2524. }
  2525. ],
  2526. "errorCode": 0,
  2527. "fromCache": false,
  2528. "hasPendingWrites": false
  2529. }
  2530. ],
  2531. "clientIndex": 1
  2532. }
  2533. ]
  2534. },
  2535. "Limbo documents are resolved after primary tab failover": {
  2536. "describeName": "Limbo Documents:",
  2537. "itName": "Limbo documents are resolved after primary tab failover",
  2538. "tags": [
  2539. "multi-client"
  2540. ],
  2541. "config": {
  2542. "useGarbageCollection": false,
  2543. "numClients": 2
  2544. },
  2545. "steps": [
  2546. {
  2547. "drainQueue": true,
  2548. "stateExpect": {
  2549. "isPrimary": true
  2550. },
  2551. "clientIndex": 0
  2552. },
  2553. {
  2554. "drainQueue": true,
  2555. "clientIndex": 1
  2556. },
  2557. {
  2558. "userListen": [
  2559. 2,
  2560. {
  2561. "path": "collection",
  2562. "filters": [],
  2563. "orderBys": []
  2564. }
  2565. ],
  2566. "stateExpect": {
  2567. "activeTargets": {
  2568. "2": {
  2569. "query": {
  2570. "path": "collection",
  2571. "filters": [],
  2572. "orderBys": []
  2573. },
  2574. "resumeToken": ""
  2575. }
  2576. }
  2577. },
  2578. "clientIndex": 1
  2579. },
  2580. {
  2581. "drainQueue": true,
  2582. "stateExpect": {
  2583. "activeTargets": {
  2584. "2": {
  2585. "query": {
  2586. "path": "collection",
  2587. "filters": [],
  2588. "orderBys": []
  2589. },
  2590. "resumeToken": ""
  2591. }
  2592. }
  2593. },
  2594. "clientIndex": 0
  2595. },
  2596. {
  2597. "watchAck": [
  2598. 2
  2599. ],
  2600. "clientIndex": 0
  2601. },
  2602. {
  2603. "watchEntity": {
  2604. "docs": [
  2605. {
  2606. "key": "collection/a",
  2607. "version": 1000,
  2608. "value": {
  2609. "key": "a"
  2610. },
  2611. "options": {
  2612. "hasLocalMutations": false,
  2613. "hasCommittedMutations": false
  2614. }
  2615. },
  2616. {
  2617. "key": "collection/b",
  2618. "version": 1001,
  2619. "value": {
  2620. "key": "b"
  2621. },
  2622. "options": {
  2623. "hasLocalMutations": false,
  2624. "hasCommittedMutations": false
  2625. }
  2626. }
  2627. ],
  2628. "targets": [
  2629. 2
  2630. ]
  2631. },
  2632. "clientIndex": 0
  2633. },
  2634. {
  2635. "watchCurrent": [
  2636. [
  2637. 2
  2638. ],
  2639. "resume-token-1000000"
  2640. ],
  2641. "clientIndex": 0
  2642. },
  2643. {
  2644. "watchSnapshot": {
  2645. "version": 1000000,
  2646. "targetIds": []
  2647. },
  2648. "clientIndex": 0
  2649. },
  2650. {
  2651. "drainQueue": true,
  2652. "expect": [
  2653. {
  2654. "query": {
  2655. "path": "collection",
  2656. "filters": [],
  2657. "orderBys": []
  2658. },
  2659. "added": [
  2660. {
  2661. "key": "collection/a",
  2662. "version": 1000,
  2663. "value": {
  2664. "key": "a"
  2665. },
  2666. "options": {
  2667. "hasLocalMutations": false,
  2668. "hasCommittedMutations": false
  2669. }
  2670. },
  2671. {
  2672. "key": "collection/b",
  2673. "version": 1001,
  2674. "value": {
  2675. "key": "b"
  2676. },
  2677. "options": {
  2678. "hasLocalMutations": false,
  2679. "hasCommittedMutations": false
  2680. }
  2681. }
  2682. ],
  2683. "errorCode": 0,
  2684. "fromCache": false,
  2685. "hasPendingWrites": false
  2686. }
  2687. ],
  2688. "clientIndex": 1
  2689. },
  2690. {
  2691. "drainQueue": true,
  2692. "clientIndex": 0
  2693. },
  2694. {
  2695. "watchEntity": {
  2696. "key": "collection/b",
  2697. "removedTargets": [
  2698. 2
  2699. ]
  2700. },
  2701. "clientIndex": 0
  2702. },
  2703. {
  2704. "watchSnapshot": {
  2705. "version": 2000000,
  2706. "targetIds": []
  2707. },
  2708. "stateExpect": {
  2709. "limboDocs": [
  2710. "collection/b"
  2711. ],
  2712. "activeTargets": {
  2713. "1": {
  2714. "query": {
  2715. "path": "collection/b",
  2716. "filters": [],
  2717. "orderBys": []
  2718. },
  2719. "resumeToken": ""
  2720. },
  2721. "2": {
  2722. "query": {
  2723. "path": "collection",
  2724. "filters": [],
  2725. "orderBys": []
  2726. },
  2727. "resumeToken": ""
  2728. }
  2729. }
  2730. },
  2731. "clientIndex": 0
  2732. },
  2733. {
  2734. "shutdown": true,
  2735. "stateExpect": {
  2736. "activeTargets": {},
  2737. "limboDocs": []
  2738. },
  2739. "clientIndex": 0
  2740. },
  2741. {
  2742. "drainQueue": true,
  2743. "expect": [
  2744. {
  2745. "query": {
  2746. "path": "collection",
  2747. "filters": [],
  2748. "orderBys": []
  2749. },
  2750. "errorCode": 0,
  2751. "fromCache": true,
  2752. "hasPendingWrites": false
  2753. }
  2754. ],
  2755. "clientIndex": 1
  2756. },
  2757. {
  2758. "runTimer": "client_metadata_refresh",
  2759. "stateExpect": {
  2760. "isPrimary": true,
  2761. "activeTargets": {
  2762. "2": {
  2763. "query": {
  2764. "path": "collection",
  2765. "filters": [],
  2766. "orderBys": []
  2767. },
  2768. "resumeToken": "resume-token-1000000"
  2769. }
  2770. }
  2771. },
  2772. "clientIndex": 1
  2773. },
  2774. {
  2775. "watchAck": [
  2776. 2
  2777. ],
  2778. "clientIndex": 1
  2779. },
  2780. {
  2781. "watchEntity": {
  2782. "docs": [],
  2783. "targets": [
  2784. 2
  2785. ]
  2786. },
  2787. "clientIndex": 1
  2788. },
  2789. {
  2790. "watchCurrent": [
  2791. [
  2792. 2
  2793. ],
  2794. "resume-token-3000000"
  2795. ],
  2796. "clientIndex": 1
  2797. },
  2798. {
  2799. "watchSnapshot": {
  2800. "version": 3000000,
  2801. "targetIds": []
  2802. },
  2803. "stateExpect": {
  2804. "limboDocs": [
  2805. "collection/b"
  2806. ],
  2807. "activeTargets": {
  2808. "1": {
  2809. "query": {
  2810. "path": "collection/b",
  2811. "filters": [],
  2812. "orderBys": []
  2813. },
  2814. "resumeToken": ""
  2815. },
  2816. "2": {
  2817. "query": {
  2818. "path": "collection",
  2819. "filters": [],
  2820. "orderBys": []
  2821. },
  2822. "resumeToken": "resume-token-1000000"
  2823. }
  2824. }
  2825. },
  2826. "clientIndex": 1
  2827. },
  2828. {
  2829. "watchAck": [
  2830. 1
  2831. ],
  2832. "clientIndex": 1
  2833. },
  2834. {
  2835. "watchCurrent": [
  2836. [
  2837. 1
  2838. ],
  2839. "resume-token-4000000"
  2840. ],
  2841. "clientIndex": 1
  2842. },
  2843. {
  2844. "watchSnapshot": {
  2845. "version": 4000000,
  2846. "targetIds": []
  2847. },
  2848. "stateExpect": {
  2849. "limboDocs": [],
  2850. "activeTargets": {
  2851. "2": {
  2852. "query": {
  2853. "path": "collection",
  2854. "filters": [],
  2855. "orderBys": []
  2856. },
  2857. "resumeToken": "resume-token-1000000"
  2858. }
  2859. }
  2860. },
  2861. "expect": [
  2862. {
  2863. "query": {
  2864. "path": "collection",
  2865. "filters": [],
  2866. "orderBys": []
  2867. },
  2868. "removed": [
  2869. {
  2870. "key": "collection/b",
  2871. "version": 1001,
  2872. "value": {
  2873. "key": "b"
  2874. },
  2875. "options": {
  2876. "hasLocalMutations": false,
  2877. "hasCommittedMutations": false
  2878. }
  2879. }
  2880. ],
  2881. "errorCode": 0,
  2882. "fromCache": false,
  2883. "hasPendingWrites": false
  2884. }
  2885. ],
  2886. "clientIndex": 1
  2887. }
  2888. ]
  2889. },
  2890. "Limbo documents survive primary state transitions": {
  2891. "describeName": "Limbo Documents:",
  2892. "itName": "Limbo documents survive primary state transitions",
  2893. "tags": [
  2894. "multi-client"
  2895. ],
  2896. "config": {
  2897. "useGarbageCollection": false,
  2898. "numClients": 2
  2899. },
  2900. "steps": [
  2901. {
  2902. "drainQueue": true,
  2903. "stateExpect": {
  2904. "isPrimary": true
  2905. },
  2906. "clientIndex": 0
  2907. },
  2908. {
  2909. "userListen": [
  2910. 2,
  2911. {
  2912. "path": "collection",
  2913. "filters": [],
  2914. "orderBys": []
  2915. }
  2916. ],
  2917. "stateExpect": {
  2918. "activeTargets": {
  2919. "2": {
  2920. "query": {
  2921. "path": "collection",
  2922. "filters": [],
  2923. "orderBys": []
  2924. },
  2925. "resumeToken": ""
  2926. }
  2927. }
  2928. },
  2929. "clientIndex": 0
  2930. },
  2931. {
  2932. "watchAck": [
  2933. 2
  2934. ],
  2935. "clientIndex": 0
  2936. },
  2937. {
  2938. "watchEntity": {
  2939. "docs": [
  2940. {
  2941. "key": "collection/a",
  2942. "version": 1000,
  2943. "value": {
  2944. "key": "a"
  2945. },
  2946. "options": {
  2947. "hasLocalMutations": false,
  2948. "hasCommittedMutations": false
  2949. }
  2950. },
  2951. {
  2952. "key": "collection/b",
  2953. "version": 1001,
  2954. "value": {
  2955. "key": "b"
  2956. },
  2957. "options": {
  2958. "hasLocalMutations": false,
  2959. "hasCommittedMutations": false
  2960. }
  2961. },
  2962. {
  2963. "key": "collection/c",
  2964. "version": 1002,
  2965. "value": {
  2966. "key": "c"
  2967. },
  2968. "options": {
  2969. "hasLocalMutations": false,
  2970. "hasCommittedMutations": false
  2971. }
  2972. }
  2973. ],
  2974. "targets": [
  2975. 2
  2976. ]
  2977. },
  2978. "clientIndex": 0
  2979. },
  2980. {
  2981. "watchCurrent": [
  2982. [
  2983. 2
  2984. ],
  2985. "resume-token-1000000"
  2986. ],
  2987. "clientIndex": 0
  2988. },
  2989. {
  2990. "watchSnapshot": {
  2991. "version": 1000000,
  2992. "targetIds": []
  2993. },
  2994. "expect": [
  2995. {
  2996. "query": {
  2997. "path": "collection",
  2998. "filters": [],
  2999. "orderBys": []
  3000. },
  3001. "added": [
  3002. {
  3003. "key": "collection/a",
  3004. "version": 1000,
  3005. "value": {
  3006. "key": "a"
  3007. },
  3008. "options": {
  3009. "hasLocalMutations": false,
  3010. "hasCommittedMutations": false
  3011. }
  3012. },
  3013. {
  3014. "key": "collection/b",
  3015. "version": 1001,
  3016. "value": {
  3017. "key": "b"
  3018. },
  3019. "options": {
  3020. "hasLocalMutations": false,
  3021. "hasCommittedMutations": false
  3022. }
  3023. },
  3024. {
  3025. "key": "collection/c",
  3026. "version": 1002,
  3027. "value": {
  3028. "key": "c"
  3029. },
  3030. "options": {
  3031. "hasLocalMutations": false,
  3032. "hasCommittedMutations": false
  3033. }
  3034. }
  3035. ],
  3036. "errorCode": 0,
  3037. "fromCache": false,
  3038. "hasPendingWrites": false
  3039. }
  3040. ],
  3041. "clientIndex": 0
  3042. },
  3043. {
  3044. "watchEntity": {
  3045. "key": "collection/b",
  3046. "removedTargets": [
  3047. 2
  3048. ]
  3049. },
  3050. "clientIndex": 0
  3051. },
  3052. {
  3053. "watchEntity": {
  3054. "key": "collection/c",
  3055. "removedTargets": [
  3056. 2
  3057. ]
  3058. },
  3059. "clientIndex": 0
  3060. },
  3061. {
  3062. "watchSnapshot": {
  3063. "version": 2000000,
  3064. "targetIds": []
  3065. },
  3066. "expect": [
  3067. {
  3068. "query": {
  3069. "path": "collection",
  3070. "filters": [],
  3071. "orderBys": []
  3072. },
  3073. "errorCode": 0,
  3074. "fromCache": true,
  3075. "hasPendingWrites": false
  3076. }
  3077. ],
  3078. "stateExpect": {
  3079. "limboDocs": [
  3080. "collection/b",
  3081. "collection/c"
  3082. ],
  3083. "activeTargets": {
  3084. "1": {
  3085. "query": {
  3086. "path": "collection/b",
  3087. "filters": [],
  3088. "orderBys": []
  3089. },
  3090. "resumeToken": ""
  3091. },
  3092. "2": {
  3093. "query": {
  3094. "path": "collection",
  3095. "filters": [],
  3096. "orderBys": []
  3097. },
  3098. "resumeToken": ""
  3099. },
  3100. "3": {
  3101. "query": {
  3102. "path": "collection/c",
  3103. "filters": [],
  3104. "orderBys": []
  3105. },
  3106. "resumeToken": ""
  3107. }
  3108. }
  3109. },
  3110. "clientIndex": 0
  3111. },
  3112. {
  3113. "drainQueue": true,
  3114. "clientIndex": 1
  3115. },
  3116. {
  3117. "applyClientState": {
  3118. "primary": true
  3119. },
  3120. "stateExpect": {
  3121. "isPrimary": true
  3122. },
  3123. "clientIndex": 1
  3124. },
  3125. {
  3126. "drainQueue": true,
  3127. "clientIndex": 0
  3128. },
  3129. {
  3130. "runTimer": "client_metadata_refresh",
  3131. "stateExpect": {
  3132. "isPrimary": false,
  3133. "limboDocs": [],
  3134. "activeTargets": {
  3135. "2": {
  3136. "query": {
  3137. "path": "collection",
  3138. "filters": [],
  3139. "orderBys": []
  3140. },
  3141. "resumeToken": ""
  3142. }
  3143. }
  3144. },
  3145. "clientIndex": 0
  3146. },
  3147. {
  3148. "drainQueue": true,
  3149. "stateExpect": {
  3150. "activeTargets": {
  3151. "2": {
  3152. "query": {
  3153. "path": "collection",
  3154. "filters": [],
  3155. "orderBys": []
  3156. },
  3157. "resumeToken": "resume-token-1000000"
  3158. }
  3159. }
  3160. },
  3161. "clientIndex": 1
  3162. },
  3163. {
  3164. "watchAck": [
  3165. 2
  3166. ],
  3167. "clientIndex": 1
  3168. },
  3169. {
  3170. "watchEntity": {
  3171. "docs": [],
  3172. "targets": [
  3173. 2
  3174. ]
  3175. },
  3176. "clientIndex": 1
  3177. },
  3178. {
  3179. "watchCurrent": [
  3180. [
  3181. 2
  3182. ],
  3183. "resume-token-3000000"
  3184. ],
  3185. "clientIndex": 1
  3186. },
  3187. {
  3188. "watchSnapshot": {
  3189. "version": 3000000,
  3190. "targetIds": []
  3191. },
  3192. "stateExpect": {
  3193. "limboDocs": [
  3194. "collection/b",
  3195. "collection/c"
  3196. ],
  3197. "activeTargets": {
  3198. "1": {
  3199. "query": {
  3200. "path": "collection/b",
  3201. "filters": [],
  3202. "orderBys": []
  3203. },
  3204. "resumeToken": ""
  3205. },
  3206. "2": {
  3207. "query": {
  3208. "path": "collection",
  3209. "filters": [],
  3210. "orderBys": []
  3211. },
  3212. "resumeToken": "resume-token-1000000"
  3213. },
  3214. "3": {
  3215. "query": {
  3216. "path": "collection/c",
  3217. "filters": [],
  3218. "orderBys": []
  3219. },
  3220. "resumeToken": ""
  3221. }
  3222. }
  3223. },
  3224. "clientIndex": 1
  3225. },
  3226. {
  3227. "watchAck": [
  3228. 1
  3229. ],
  3230. "clientIndex": 1
  3231. },
  3232. {
  3233. "watchCurrent": [
  3234. [
  3235. 1
  3236. ],
  3237. "resume-token-3000000"
  3238. ],
  3239. "clientIndex": 1
  3240. },
  3241. {
  3242. "watchSnapshot": {
  3243. "version": 3000000,
  3244. "targetIds": []
  3245. },
  3246. "stateExpect": {
  3247. "limboDocs": [
  3248. "collection/c"
  3249. ],
  3250. "activeTargets": {
  3251. "2": {
  3252. "query": {
  3253. "path": "collection",
  3254. "filters": [],
  3255. "orderBys": []
  3256. },
  3257. "resumeToken": "resume-token-1000000"
  3258. },
  3259. "3": {
  3260. "query": {
  3261. "path": "collection/c",
  3262. "filters": [],
  3263. "orderBys": []
  3264. },
  3265. "resumeToken": ""
  3266. }
  3267. }
  3268. },
  3269. "clientIndex": 1
  3270. },
  3271. {
  3272. "drainQueue": true,
  3273. "expect": [
  3274. {
  3275. "query": {
  3276. "path": "collection",
  3277. "filters": [],
  3278. "orderBys": []
  3279. },
  3280. "removed": [
  3281. {
  3282. "key": "collection/b",
  3283. "version": 1001,
  3284. "value": {
  3285. "key": "b"
  3286. },
  3287. "options": {
  3288. "hasLocalMutations": false,
  3289. "hasCommittedMutations": false
  3290. }
  3291. }
  3292. ],
  3293. "errorCode": 0,
  3294. "fromCache": true,
  3295. "hasPendingWrites": false
  3296. }
  3297. ],
  3298. "clientIndex": 0
  3299. },
  3300. {
  3301. "applyClientState": {
  3302. "primary": true
  3303. },
  3304. "stateExpect": {
  3305. "isPrimary": true,
  3306. "activeTargets": {
  3307. "2": {
  3308. "query": {
  3309. "path": "collection",
  3310. "filters": [],
  3311. "orderBys": []
  3312. },
  3313. "resumeToken": "resume-token-1000000"
  3314. }
  3315. }
  3316. },
  3317. "clientIndex": 0
  3318. },
  3319. {
  3320. "watchAck": [
  3321. 2
  3322. ],
  3323. "clientIndex": 0
  3324. },
  3325. {
  3326. "watchEntity": {
  3327. "docs": [],
  3328. "targets": [
  3329. 2
  3330. ]
  3331. },
  3332. "clientIndex": 0
  3333. },
  3334. {
  3335. "watchCurrent": [
  3336. [
  3337. 2
  3338. ],
  3339. "resume-token-5000000"
  3340. ],
  3341. "clientIndex": 0
  3342. },
  3343. {
  3344. "watchSnapshot": {
  3345. "version": 5000000,
  3346. "targetIds": []
  3347. },
  3348. "stateExpect": {
  3349. "limboDocs": [
  3350. "collection/c"
  3351. ],
  3352. "activeTargets": {
  3353. "2": {
  3354. "query": {
  3355. "path": "collection",
  3356. "filters": [],
  3357. "orderBys": []
  3358. },
  3359. "resumeToken": "resume-token-1000000"
  3360. },
  3361. "5": {
  3362. "query": {
  3363. "path": "collection/c",
  3364. "filters": [],
  3365. "orderBys": []
  3366. },
  3367. "resumeToken": ""
  3368. }
  3369. }
  3370. },
  3371. "clientIndex": 0
  3372. },
  3373. {
  3374. "watchAck": [
  3375. 5
  3376. ],
  3377. "clientIndex": 0
  3378. },
  3379. {
  3380. "watchCurrent": [
  3381. [
  3382. 5
  3383. ],
  3384. "resume-token-6000000"
  3385. ],
  3386. "clientIndex": 0
  3387. },
  3388. {
  3389. "watchSnapshot": {
  3390. "version": 6000000,
  3391. "targetIds": []
  3392. },
  3393. "stateExpect": {
  3394. "limboDocs": [],
  3395. "activeTargets": {
  3396. "2": {
  3397. "query": {
  3398. "path": "collection",
  3399. "filters": [],
  3400. "orderBys": []
  3401. },
  3402. "resumeToken": "resume-token-1000000"
  3403. }
  3404. }
  3405. },
  3406. "expect": [
  3407. {
  3408. "query": {
  3409. "path": "collection",
  3410. "filters": [],
  3411. "orderBys": []
  3412. },
  3413. "removed": [
  3414. {
  3415. "key": "collection/c",
  3416. "version": 1002,
  3417. "value": {
  3418. "key": "c"
  3419. },
  3420. "options": {
  3421. "hasLocalMutations": false,
  3422. "hasCommittedMutations": false
  3423. }
  3424. }
  3425. ],
  3426. "errorCode": 0,
  3427. "fromCache": false,
  3428. "hasPendingWrites": false
  3429. }
  3430. ],
  3431. "clientIndex": 0
  3432. }
  3433. ]
  3434. }
  3435. }