limbo_spec_test.json 112 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057
  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. "expectedState": {
  21. "activeTargets": {
  22. "2": {
  23. "queries": [
  24. {
  25. "path": "collection",
  26. "filters": [],
  27. "orderBys": []
  28. }
  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. "targets": [
  56. 2
  57. ]
  58. }
  59. },
  60. {
  61. "watchCurrent": [
  62. [
  63. 2
  64. ],
  65. "resume-token-1000"
  66. ]
  67. },
  68. {
  69. "watchSnapshot": {
  70. "version": 1000,
  71. "targetIds": []
  72. },
  73. "expectedSnapshotEvents": [
  74. {
  75. "query": {
  76. "path": "collection",
  77. "filters": [],
  78. "orderBys": []
  79. },
  80. "added": [
  81. {
  82. "key": "collection/a",
  83. "version": 1000,
  84. "value": {
  85. "key": "a"
  86. },
  87. "options": {
  88. "hasLocalMutations": false,
  89. "hasCommittedMutations": false
  90. }
  91. }
  92. ],
  93. "errorCode": 0,
  94. "fromCache": false,
  95. "hasPendingWrites": false
  96. }
  97. ]
  98. },
  99. {
  100. "watchReset": [
  101. 2
  102. ]
  103. },
  104. {
  105. "watchCurrent": [
  106. [
  107. 2
  108. ],
  109. "resume-token-1001"
  110. ]
  111. },
  112. {
  113. "watchSnapshot": {
  114. "version": 1001,
  115. "targetIds": []
  116. },
  117. "expectedState": {
  118. "limboDocs": [
  119. "collection/a"
  120. ],
  121. "activeTargets": {
  122. "1": {
  123. "queries": [
  124. {
  125. "path": "collection/a",
  126. "filters": [],
  127. "orderBys": []
  128. }
  129. ],
  130. "resumeToken": ""
  131. },
  132. "2": {
  133. "queries": [
  134. {
  135. "path": "collection",
  136. "filters": [],
  137. "orderBys": []
  138. }
  139. ],
  140. "resumeToken": ""
  141. }
  142. }
  143. },
  144. "expectedSnapshotEvents": [
  145. {
  146. "query": {
  147. "path": "collection",
  148. "filters": [],
  149. "orderBys": []
  150. },
  151. "errorCode": 0,
  152. "fromCache": true,
  153. "hasPendingWrites": false
  154. }
  155. ]
  156. },
  157. {
  158. "watchAck": [
  159. 1
  160. ]
  161. },
  162. {
  163. "watchCurrent": [
  164. [
  165. 1
  166. ],
  167. "resume-token-2"
  168. ]
  169. },
  170. {
  171. "watchSnapshot": {
  172. "version": 1002,
  173. "targetIds": []
  174. },
  175. "expectedState": {
  176. "limboDocs": [],
  177. "activeTargets": {
  178. "2": {
  179. "queries": [
  180. {
  181. "path": "collection",
  182. "filters": [],
  183. "orderBys": []
  184. }
  185. ],
  186. "resumeToken": ""
  187. }
  188. }
  189. },
  190. "expectedSnapshotEvents": [
  191. {
  192. "query": {
  193. "path": "collection",
  194. "filters": [],
  195. "orderBys": []
  196. },
  197. "removed": [
  198. {
  199. "key": "collection/a",
  200. "version": 1000,
  201. "value": {
  202. "key": "a"
  203. },
  204. "options": {
  205. "hasLocalMutations": false,
  206. "hasCommittedMutations": false
  207. }
  208. }
  209. ],
  210. "errorCode": 0,
  211. "fromCache": false,
  212. "hasPendingWrites": false
  213. }
  214. ]
  215. }
  216. ]
  217. },
  218. "Limbo documents are deleted with an existence filter": {
  219. "describeName": "Limbo Documents:",
  220. "itName": "Limbo documents are deleted with an existence filter",
  221. "tags": [],
  222. "config": {
  223. "useGarbageCollection": true,
  224. "numClients": 1
  225. },
  226. "steps": [
  227. {
  228. "userListen": [
  229. 2,
  230. {
  231. "path": "collection",
  232. "filters": [],
  233. "orderBys": []
  234. }
  235. ],
  236. "expectedState": {
  237. "activeTargets": {
  238. "2": {
  239. "queries": [
  240. {
  241. "path": "collection",
  242. "filters": [],
  243. "orderBys": []
  244. }
  245. ],
  246. "resumeToken": ""
  247. }
  248. }
  249. }
  250. },
  251. {
  252. "watchAck": [
  253. 2
  254. ]
  255. },
  256. {
  257. "watchEntity": {
  258. "docs": [
  259. {
  260. "key": "collection/a",
  261. "version": 1000,
  262. "value": {
  263. "key": "a"
  264. },
  265. "options": {
  266. "hasLocalMutations": false,
  267. "hasCommittedMutations": false
  268. }
  269. }
  270. ],
  271. "targets": [
  272. 2
  273. ]
  274. }
  275. },
  276. {
  277. "watchCurrent": [
  278. [
  279. 2
  280. ],
  281. "resume-token-1000"
  282. ]
  283. },
  284. {
  285. "watchSnapshot": {
  286. "version": 1000,
  287. "targetIds": []
  288. },
  289. "expectedSnapshotEvents": [
  290. {
  291. "query": {
  292. "path": "collection",
  293. "filters": [],
  294. "orderBys": []
  295. },
  296. "added": [
  297. {
  298. "key": "collection/a",
  299. "version": 1000,
  300. "value": {
  301. "key": "a"
  302. },
  303. "options": {
  304. "hasLocalMutations": false,
  305. "hasCommittedMutations": false
  306. }
  307. }
  308. ],
  309. "errorCode": 0,
  310. "fromCache": false,
  311. "hasPendingWrites": false
  312. }
  313. ]
  314. },
  315. {
  316. "watchReset": [
  317. 2
  318. ]
  319. },
  320. {
  321. "watchCurrent": [
  322. [
  323. 2
  324. ],
  325. "resume-token-1001"
  326. ]
  327. },
  328. {
  329. "watchSnapshot": {
  330. "version": 1001,
  331. "targetIds": []
  332. },
  333. "expectedState": {
  334. "limboDocs": [
  335. "collection/a"
  336. ],
  337. "activeTargets": {
  338. "1": {
  339. "queries": [
  340. {
  341. "path": "collection/a",
  342. "filters": [],
  343. "orderBys": []
  344. }
  345. ],
  346. "resumeToken": ""
  347. },
  348. "2": {
  349. "queries": [
  350. {
  351. "path": "collection",
  352. "filters": [],
  353. "orderBys": []
  354. }
  355. ],
  356. "resumeToken": ""
  357. }
  358. }
  359. },
  360. "expectedSnapshotEvents": [
  361. {
  362. "query": {
  363. "path": "collection",
  364. "filters": [],
  365. "orderBys": []
  366. },
  367. "errorCode": 0,
  368. "fromCache": true,
  369. "hasPendingWrites": false
  370. }
  371. ]
  372. },
  373. {
  374. "watchAck": [
  375. 1
  376. ]
  377. },
  378. {
  379. "watchFilter": [
  380. [
  381. 1
  382. ]
  383. ]
  384. },
  385. {
  386. "watchCurrent": [
  387. [
  388. 1
  389. ],
  390. "resume-token-1002"
  391. ]
  392. },
  393. {
  394. "watchSnapshot": {
  395. "version": 1002,
  396. "targetIds": []
  397. },
  398. "expectedState": {
  399. "limboDocs": [],
  400. "activeTargets": {
  401. "2": {
  402. "queries": [
  403. {
  404. "path": "collection",
  405. "filters": [],
  406. "orderBys": []
  407. }
  408. ],
  409. "resumeToken": ""
  410. }
  411. }
  412. },
  413. "expectedSnapshotEvents": [
  414. {
  415. "query": {
  416. "path": "collection",
  417. "filters": [],
  418. "orderBys": []
  419. },
  420. "removed": [
  421. {
  422. "key": "collection/a",
  423. "version": 1000,
  424. "value": {
  425. "key": "a"
  426. },
  427. "options": {
  428. "hasLocalMutations": false,
  429. "hasCommittedMutations": false
  430. }
  431. }
  432. ],
  433. "errorCode": 0,
  434. "fromCache": false,
  435. "hasPendingWrites": false
  436. }
  437. ]
  438. }
  439. ]
  440. },
  441. "Limbo documents are resolved with updates": {
  442. "describeName": "Limbo Documents:",
  443. "itName": "Limbo documents are resolved with updates",
  444. "tags": [],
  445. "config": {
  446. "useGarbageCollection": true,
  447. "numClients": 1
  448. },
  449. "steps": [
  450. {
  451. "userListen": [
  452. 2,
  453. {
  454. "path": "collection",
  455. "filters": [
  456. [
  457. "key",
  458. "==",
  459. "a"
  460. ]
  461. ],
  462. "orderBys": []
  463. }
  464. ],
  465. "expectedState": {
  466. "activeTargets": {
  467. "2": {
  468. "queries": [
  469. {
  470. "path": "collection",
  471. "filters": [
  472. [
  473. "key",
  474. "==",
  475. "a"
  476. ]
  477. ],
  478. "orderBys": []
  479. }
  480. ],
  481. "resumeToken": ""
  482. }
  483. }
  484. }
  485. },
  486. {
  487. "watchAck": [
  488. 2
  489. ]
  490. },
  491. {
  492. "watchEntity": {
  493. "docs": [
  494. {
  495. "key": "collection/a",
  496. "version": 1000,
  497. "value": {
  498. "key": "a"
  499. },
  500. "options": {
  501. "hasLocalMutations": false,
  502. "hasCommittedMutations": false
  503. }
  504. }
  505. ],
  506. "targets": [
  507. 2
  508. ]
  509. }
  510. },
  511. {
  512. "watchCurrent": [
  513. [
  514. 2
  515. ],
  516. "resume-token-1000"
  517. ]
  518. },
  519. {
  520. "watchSnapshot": {
  521. "version": 1000,
  522. "targetIds": []
  523. },
  524. "expectedSnapshotEvents": [
  525. {
  526. "query": {
  527. "path": "collection",
  528. "filters": [
  529. [
  530. "key",
  531. "==",
  532. "a"
  533. ]
  534. ],
  535. "orderBys": []
  536. },
  537. "added": [
  538. {
  539. "key": "collection/a",
  540. "version": 1000,
  541. "value": {
  542. "key": "a"
  543. },
  544. "options": {
  545. "hasLocalMutations": false,
  546. "hasCommittedMutations": false
  547. }
  548. }
  549. ],
  550. "errorCode": 0,
  551. "fromCache": false,
  552. "hasPendingWrites": false
  553. }
  554. ]
  555. },
  556. {
  557. "watchReset": [
  558. 2
  559. ]
  560. },
  561. {
  562. "watchCurrent": [
  563. [
  564. 2
  565. ],
  566. "resume-token-1001"
  567. ]
  568. },
  569. {
  570. "watchSnapshot": {
  571. "version": 1001,
  572. "targetIds": []
  573. },
  574. "expectedState": {
  575. "limboDocs": [
  576. "collection/a"
  577. ],
  578. "activeTargets": {
  579. "1": {
  580. "queries": [
  581. {
  582. "path": "collection/a",
  583. "filters": [],
  584. "orderBys": []
  585. }
  586. ],
  587. "resumeToken": ""
  588. },
  589. "2": {
  590. "queries": [
  591. {
  592. "path": "collection",
  593. "filters": [
  594. [
  595. "key",
  596. "==",
  597. "a"
  598. ]
  599. ],
  600. "orderBys": []
  601. }
  602. ],
  603. "resumeToken": ""
  604. }
  605. }
  606. },
  607. "expectedSnapshotEvents": [
  608. {
  609. "query": {
  610. "path": "collection",
  611. "filters": [
  612. [
  613. "key",
  614. "==",
  615. "a"
  616. ]
  617. ],
  618. "orderBys": []
  619. },
  620. "errorCode": 0,
  621. "fromCache": true,
  622. "hasPendingWrites": false
  623. }
  624. ]
  625. },
  626. {
  627. "watchAck": [
  628. 1
  629. ]
  630. },
  631. {
  632. "watchEntity": {
  633. "docs": [
  634. {
  635. "key": "collection/a",
  636. "version": 1002,
  637. "value": {
  638. "key": "b"
  639. },
  640. "options": {
  641. "hasLocalMutations": false,
  642. "hasCommittedMutations": false
  643. }
  644. }
  645. ],
  646. "targets": [
  647. 1
  648. ]
  649. }
  650. },
  651. {
  652. "watchCurrent": [
  653. [
  654. 1
  655. ],
  656. "resume-token-1002"
  657. ]
  658. },
  659. {
  660. "watchSnapshot": {
  661. "version": 1002,
  662. "targetIds": []
  663. },
  664. "expectedState": {
  665. "limboDocs": [],
  666. "activeTargets": {
  667. "2": {
  668. "queries": [
  669. {
  670. "path": "collection",
  671. "filters": [
  672. [
  673. "key",
  674. "==",
  675. "a"
  676. ]
  677. ],
  678. "orderBys": []
  679. }
  680. ],
  681. "resumeToken": ""
  682. }
  683. }
  684. },
  685. "expectedSnapshotEvents": [
  686. {
  687. "query": {
  688. "path": "collection",
  689. "filters": [
  690. [
  691. "key",
  692. "==",
  693. "a"
  694. ]
  695. ],
  696. "orderBys": []
  697. },
  698. "removed": [
  699. {
  700. "key": "collection/a",
  701. "version": 1000,
  702. "value": {
  703. "key": "a"
  704. },
  705. "options": {
  706. "hasLocalMutations": false,
  707. "hasCommittedMutations": false
  708. }
  709. }
  710. ],
  711. "errorCode": 0,
  712. "fromCache": false,
  713. "hasPendingWrites": false
  714. }
  715. ]
  716. }
  717. ]
  718. },
  719. "Limbo documents are resolved with updates in different snapshot than \"current\"": {
  720. "describeName": "Limbo Documents:",
  721. "itName": "Limbo documents are resolved with updates in different snapshot than \"current\"",
  722. "tags": [],
  723. "config": {
  724. "useGarbageCollection": true,
  725. "numClients": 1
  726. },
  727. "steps": [
  728. {
  729. "userListen": [
  730. 2,
  731. {
  732. "path": "collection",
  733. "filters": [
  734. [
  735. "key",
  736. "==",
  737. "a"
  738. ]
  739. ],
  740. "orderBys": []
  741. }
  742. ],
  743. "expectedState": {
  744. "activeTargets": {
  745. "2": {
  746. "queries": [
  747. {
  748. "path": "collection",
  749. "filters": [
  750. [
  751. "key",
  752. "==",
  753. "a"
  754. ]
  755. ],
  756. "orderBys": []
  757. }
  758. ],
  759. "resumeToken": ""
  760. }
  761. }
  762. }
  763. },
  764. {
  765. "watchAck": [
  766. 2
  767. ]
  768. },
  769. {
  770. "watchEntity": {
  771. "docs": [
  772. {
  773. "key": "collection/a",
  774. "version": 1000,
  775. "value": {
  776. "key": "a"
  777. },
  778. "options": {
  779. "hasLocalMutations": false,
  780. "hasCommittedMutations": false
  781. }
  782. }
  783. ],
  784. "targets": [
  785. 2
  786. ]
  787. }
  788. },
  789. {
  790. "watchCurrent": [
  791. [
  792. 2
  793. ],
  794. "resume-token-1000"
  795. ]
  796. },
  797. {
  798. "watchSnapshot": {
  799. "version": 1000,
  800. "targetIds": []
  801. },
  802. "expectedSnapshotEvents": [
  803. {
  804. "query": {
  805. "path": "collection",
  806. "filters": [
  807. [
  808. "key",
  809. "==",
  810. "a"
  811. ]
  812. ],
  813. "orderBys": []
  814. },
  815. "added": [
  816. {
  817. "key": "collection/a",
  818. "version": 1000,
  819. "value": {
  820. "key": "a"
  821. },
  822. "options": {
  823. "hasLocalMutations": false,
  824. "hasCommittedMutations": false
  825. }
  826. }
  827. ],
  828. "errorCode": 0,
  829. "fromCache": false,
  830. "hasPendingWrites": false
  831. }
  832. ]
  833. },
  834. {
  835. "userListen": [
  836. 4,
  837. {
  838. "path": "collection",
  839. "filters": [
  840. [
  841. "key",
  842. "==",
  843. "b"
  844. ]
  845. ],
  846. "orderBys": []
  847. }
  848. ],
  849. "expectedState": {
  850. "activeTargets": {
  851. "2": {
  852. "queries": [
  853. {
  854. "path": "collection",
  855. "filters": [
  856. [
  857. "key",
  858. "==",
  859. "a"
  860. ]
  861. ],
  862. "orderBys": []
  863. }
  864. ],
  865. "resumeToken": ""
  866. },
  867. "4": {
  868. "queries": [
  869. {
  870. "path": "collection",
  871. "filters": [
  872. [
  873. "key",
  874. "==",
  875. "b"
  876. ]
  877. ],
  878. "orderBys": []
  879. }
  880. ],
  881. "resumeToken": ""
  882. }
  883. }
  884. }
  885. },
  886. {
  887. "watchReset": [
  888. 2
  889. ]
  890. },
  891. {
  892. "watchCurrent": [
  893. [
  894. 2
  895. ],
  896. "resume-token-1001"
  897. ]
  898. },
  899. {
  900. "watchSnapshot": {
  901. "version": 1001,
  902. "targetIds": []
  903. },
  904. "expectedState": {
  905. "limboDocs": [
  906. "collection/a"
  907. ],
  908. "activeTargets": {
  909. "1": {
  910. "queries": [
  911. {
  912. "path": "collection/a",
  913. "filters": [],
  914. "orderBys": []
  915. }
  916. ],
  917. "resumeToken": ""
  918. },
  919. "2": {
  920. "queries": [
  921. {
  922. "path": "collection",
  923. "filters": [
  924. [
  925. "key",
  926. "==",
  927. "a"
  928. ]
  929. ],
  930. "orderBys": []
  931. }
  932. ],
  933. "resumeToken": ""
  934. },
  935. "4": {
  936. "queries": [
  937. {
  938. "path": "collection",
  939. "filters": [
  940. [
  941. "key",
  942. "==",
  943. "b"
  944. ]
  945. ],
  946. "orderBys": []
  947. }
  948. ],
  949. "resumeToken": ""
  950. }
  951. }
  952. },
  953. "expectedSnapshotEvents": [
  954. {
  955. "query": {
  956. "path": "collection",
  957. "filters": [
  958. [
  959. "key",
  960. "==",
  961. "a"
  962. ]
  963. ],
  964. "orderBys": []
  965. },
  966. "errorCode": 0,
  967. "fromCache": true,
  968. "hasPendingWrites": false
  969. }
  970. ]
  971. },
  972. {
  973. "watchAck": [
  974. 4
  975. ]
  976. },
  977. {
  978. "watchAck": [
  979. 1
  980. ]
  981. },
  982. {
  983. "watchEntity": {
  984. "docs": [
  985. {
  986. "key": "collection/a",
  987. "version": 1002,
  988. "value": {
  989. "key": "b"
  990. },
  991. "options": {
  992. "hasLocalMutations": false,
  993. "hasCommittedMutations": false
  994. }
  995. }
  996. ],
  997. "targets": [
  998. 1,
  999. 4
  1000. ]
  1001. }
  1002. },
  1003. {
  1004. "watchCurrent": [
  1005. [
  1006. 4
  1007. ],
  1008. "resume-token-1002"
  1009. ]
  1010. },
  1011. {
  1012. "watchSnapshot": {
  1013. "version": 1002,
  1014. "targetIds": []
  1015. },
  1016. "expectedState": {
  1017. "limboDocs": [],
  1018. "activeTargets": {
  1019. "2": {
  1020. "queries": [
  1021. {
  1022. "path": "collection",
  1023. "filters": [
  1024. [
  1025. "key",
  1026. "==",
  1027. "a"
  1028. ]
  1029. ],
  1030. "orderBys": []
  1031. }
  1032. ],
  1033. "resumeToken": ""
  1034. },
  1035. "4": {
  1036. "queries": [
  1037. {
  1038. "path": "collection",
  1039. "filters": [
  1040. [
  1041. "key",
  1042. "==",
  1043. "b"
  1044. ]
  1045. ],
  1046. "orderBys": []
  1047. }
  1048. ],
  1049. "resumeToken": ""
  1050. }
  1051. }
  1052. },
  1053. "expectedSnapshotEvents": [
  1054. {
  1055. "query": {
  1056. "path": "collection",
  1057. "filters": [
  1058. [
  1059. "key",
  1060. "==",
  1061. "a"
  1062. ]
  1063. ],
  1064. "orderBys": []
  1065. },
  1066. "removed": [
  1067. {
  1068. "key": "collection/a",
  1069. "version": 1000,
  1070. "value": {
  1071. "key": "a"
  1072. },
  1073. "options": {
  1074. "hasLocalMutations": false,
  1075. "hasCommittedMutations": false
  1076. }
  1077. }
  1078. ],
  1079. "errorCode": 0,
  1080. "fromCache": false,
  1081. "hasPendingWrites": false
  1082. },
  1083. {
  1084. "query": {
  1085. "path": "collection",
  1086. "filters": [
  1087. [
  1088. "key",
  1089. "==",
  1090. "b"
  1091. ]
  1092. ],
  1093. "orderBys": []
  1094. },
  1095. "added": [
  1096. {
  1097. "key": "collection/a",
  1098. "version": 1002,
  1099. "value": {
  1100. "key": "b"
  1101. },
  1102. "options": {
  1103. "hasLocalMutations": false,
  1104. "hasCommittedMutations": false
  1105. }
  1106. }
  1107. ],
  1108. "errorCode": 0,
  1109. "fromCache": false,
  1110. "hasPendingWrites": false
  1111. }
  1112. ]
  1113. },
  1114. {
  1115. "watchCurrent": [
  1116. [
  1117. 1
  1118. ],
  1119. "resume-token-1003"
  1120. ]
  1121. },
  1122. {
  1123. "watchSnapshot": {
  1124. "version": 1003,
  1125. "targetIds": []
  1126. }
  1127. }
  1128. ]
  1129. },
  1130. "Document remove message will cause docs to go in limbo": {
  1131. "describeName": "Limbo Documents:",
  1132. "itName": "Document remove message will cause docs to go in limbo",
  1133. "tags": [],
  1134. "config": {
  1135. "useGarbageCollection": true,
  1136. "numClients": 1
  1137. },
  1138. "steps": [
  1139. {
  1140. "userListen": [
  1141. 2,
  1142. {
  1143. "path": "collection",
  1144. "filters": [],
  1145. "orderBys": []
  1146. }
  1147. ],
  1148. "expectedState": {
  1149. "activeTargets": {
  1150. "2": {
  1151. "queries": [
  1152. {
  1153. "path": "collection",
  1154. "filters": [],
  1155. "orderBys": []
  1156. }
  1157. ],
  1158. "resumeToken": ""
  1159. }
  1160. }
  1161. }
  1162. },
  1163. {
  1164. "watchAck": [
  1165. 2
  1166. ]
  1167. },
  1168. {
  1169. "watchEntity": {
  1170. "docs": [
  1171. {
  1172. "key": "collection/a",
  1173. "version": 1000,
  1174. "value": {
  1175. "key": "a"
  1176. },
  1177. "options": {
  1178. "hasLocalMutations": false,
  1179. "hasCommittedMutations": false
  1180. }
  1181. },
  1182. {
  1183. "key": "collection/b",
  1184. "version": 1001,
  1185. "value": {
  1186. "key": "b"
  1187. },
  1188. "options": {
  1189. "hasLocalMutations": false,
  1190. "hasCommittedMutations": false
  1191. }
  1192. }
  1193. ],
  1194. "targets": [
  1195. 2
  1196. ]
  1197. }
  1198. },
  1199. {
  1200. "watchCurrent": [
  1201. [
  1202. 2
  1203. ],
  1204. "resume-token-1002"
  1205. ]
  1206. },
  1207. {
  1208. "watchSnapshot": {
  1209. "version": 1002,
  1210. "targetIds": []
  1211. },
  1212. "expectedSnapshotEvents": [
  1213. {
  1214. "query": {
  1215. "path": "collection",
  1216. "filters": [],
  1217. "orderBys": []
  1218. },
  1219. "added": [
  1220. {
  1221. "key": "collection/a",
  1222. "version": 1000,
  1223. "value": {
  1224. "key": "a"
  1225. },
  1226. "options": {
  1227. "hasLocalMutations": false,
  1228. "hasCommittedMutations": false
  1229. }
  1230. },
  1231. {
  1232. "key": "collection/b",
  1233. "version": 1001,
  1234. "value": {
  1235. "key": "b"
  1236. },
  1237. "options": {
  1238. "hasLocalMutations": false,
  1239. "hasCommittedMutations": false
  1240. }
  1241. }
  1242. ],
  1243. "errorCode": 0,
  1244. "fromCache": false,
  1245. "hasPendingWrites": false
  1246. }
  1247. ]
  1248. },
  1249. {
  1250. "watchEntity": {
  1251. "key": "collection/b",
  1252. "removedTargets": [
  1253. 2
  1254. ]
  1255. }
  1256. },
  1257. {
  1258. "watchSnapshot": {
  1259. "version": 1003,
  1260. "targetIds": []
  1261. },
  1262. "expectedState": {
  1263. "limboDocs": [
  1264. "collection/b"
  1265. ],
  1266. "activeTargets": {
  1267. "1": {
  1268. "queries": [
  1269. {
  1270. "path": "collection/b",
  1271. "filters": [],
  1272. "orderBys": []
  1273. }
  1274. ],
  1275. "resumeToken": ""
  1276. },
  1277. "2": {
  1278. "queries": [
  1279. {
  1280. "path": "collection",
  1281. "filters": [],
  1282. "orderBys": []
  1283. }
  1284. ],
  1285. "resumeToken": ""
  1286. }
  1287. }
  1288. },
  1289. "expectedSnapshotEvents": [
  1290. {
  1291. "query": {
  1292. "path": "collection",
  1293. "filters": [],
  1294. "orderBys": []
  1295. },
  1296. "errorCode": 0,
  1297. "fromCache": true,
  1298. "hasPendingWrites": false
  1299. }
  1300. ]
  1301. },
  1302. {
  1303. "watchAck": [
  1304. 1
  1305. ]
  1306. },
  1307. {
  1308. "watchCurrent": [
  1309. [
  1310. 1
  1311. ],
  1312. "resume-token-1004"
  1313. ]
  1314. },
  1315. {
  1316. "watchSnapshot": {
  1317. "version": 1004,
  1318. "targetIds": []
  1319. },
  1320. "expectedState": {
  1321. "limboDocs": [],
  1322. "activeTargets": {
  1323. "2": {
  1324. "queries": [
  1325. {
  1326. "path": "collection",
  1327. "filters": [],
  1328. "orderBys": []
  1329. }
  1330. ],
  1331. "resumeToken": ""
  1332. }
  1333. }
  1334. },
  1335. "expectedSnapshotEvents": [
  1336. {
  1337. "query": {
  1338. "path": "collection",
  1339. "filters": [],
  1340. "orderBys": []
  1341. },
  1342. "removed": [
  1343. {
  1344. "key": "collection/b",
  1345. "version": 1001,
  1346. "value": {
  1347. "key": "b"
  1348. },
  1349. "options": {
  1350. "hasLocalMutations": false,
  1351. "hasCommittedMutations": false
  1352. }
  1353. }
  1354. ],
  1355. "errorCode": 0,
  1356. "fromCache": false,
  1357. "hasPendingWrites": false
  1358. }
  1359. ]
  1360. }
  1361. ]
  1362. },
  1363. "Limbo resolution handles snapshot before CURRENT": {
  1364. "describeName": "Limbo Documents:",
  1365. "itName": "Limbo resolution handles snapshot before CURRENT",
  1366. "tags": [],
  1367. "config": {
  1368. "useGarbageCollection": false,
  1369. "numClients": 1
  1370. },
  1371. "steps": [
  1372. {
  1373. "userListen": [
  1374. 2,
  1375. {
  1376. "path": "collection",
  1377. "filters": [],
  1378. "orderBys": []
  1379. }
  1380. ],
  1381. "expectedState": {
  1382. "activeTargets": {
  1383. "2": {
  1384. "queries": [
  1385. {
  1386. "path": "collection",
  1387. "filters": [],
  1388. "orderBys": []
  1389. }
  1390. ],
  1391. "resumeToken": ""
  1392. }
  1393. }
  1394. }
  1395. },
  1396. {
  1397. "watchAck": [
  1398. 2
  1399. ]
  1400. },
  1401. {
  1402. "watchEntity": {
  1403. "docs": [
  1404. {
  1405. "key": "collection/a",
  1406. "version": 1000,
  1407. "value": {
  1408. "include": true,
  1409. "key": "a"
  1410. },
  1411. "options": {
  1412. "hasLocalMutations": false,
  1413. "hasCommittedMutations": false
  1414. }
  1415. },
  1416. {
  1417. "key": "collection/b",
  1418. "version": 1000,
  1419. "value": {
  1420. "include": true,
  1421. "key": "b"
  1422. },
  1423. "options": {
  1424. "hasLocalMutations": false,
  1425. "hasCommittedMutations": false
  1426. }
  1427. }
  1428. ],
  1429. "targets": [
  1430. 2
  1431. ]
  1432. }
  1433. },
  1434. {
  1435. "watchCurrent": [
  1436. [
  1437. 2
  1438. ],
  1439. "resume-token-1000"
  1440. ]
  1441. },
  1442. {
  1443. "watchSnapshot": {
  1444. "version": 1000,
  1445. "targetIds": []
  1446. },
  1447. "expectedSnapshotEvents": [
  1448. {
  1449. "query": {
  1450. "path": "collection",
  1451. "filters": [],
  1452. "orderBys": []
  1453. },
  1454. "added": [
  1455. {
  1456. "key": "collection/a",
  1457. "version": 1000,
  1458. "value": {
  1459. "include": true,
  1460. "key": "a"
  1461. },
  1462. "options": {
  1463. "hasLocalMutations": false,
  1464. "hasCommittedMutations": false
  1465. }
  1466. },
  1467. {
  1468. "key": "collection/b",
  1469. "version": 1000,
  1470. "value": {
  1471. "include": true,
  1472. "key": "b"
  1473. },
  1474. "options": {
  1475. "hasLocalMutations": false,
  1476. "hasCommittedMutations": false
  1477. }
  1478. }
  1479. ],
  1480. "errorCode": 0,
  1481. "fromCache": false,
  1482. "hasPendingWrites": false
  1483. }
  1484. ]
  1485. },
  1486. {
  1487. "userUnlisten": [
  1488. 2,
  1489. {
  1490. "path": "collection",
  1491. "filters": [],
  1492. "orderBys": []
  1493. }
  1494. ],
  1495. "expectedState": {
  1496. "activeTargets": {}
  1497. }
  1498. },
  1499. {
  1500. "userListen": [
  1501. 4,
  1502. {
  1503. "path": "collection",
  1504. "limit": 1,
  1505. "limitType": "LimitToFirst",
  1506. "filters": [
  1507. [
  1508. "include",
  1509. "==",
  1510. true
  1511. ]
  1512. ],
  1513. "orderBys": []
  1514. }
  1515. ],
  1516. "expectedState": {
  1517. "activeTargets": {
  1518. "4": {
  1519. "queries": [
  1520. {
  1521. "path": "collection",
  1522. "limit": 1,
  1523. "limitType": "LimitToFirst",
  1524. "filters": [
  1525. [
  1526. "include",
  1527. "==",
  1528. true
  1529. ]
  1530. ],
  1531. "orderBys": []
  1532. }
  1533. ],
  1534. "resumeToken": ""
  1535. }
  1536. }
  1537. },
  1538. "expectedSnapshotEvents": [
  1539. {
  1540. "query": {
  1541. "path": "collection",
  1542. "limit": 1,
  1543. "limitType": "LimitToFirst",
  1544. "filters": [
  1545. [
  1546. "include",
  1547. "==",
  1548. true
  1549. ]
  1550. ],
  1551. "orderBys": []
  1552. },
  1553. "added": [
  1554. {
  1555. "key": "collection/a",
  1556. "version": 1000,
  1557. "value": {
  1558. "include": true,
  1559. "key": "a"
  1560. },
  1561. "options": {
  1562. "hasLocalMutations": false,
  1563. "hasCommittedMutations": false
  1564. }
  1565. }
  1566. ],
  1567. "errorCode": 0,
  1568. "fromCache": true,
  1569. "hasPendingWrites": false
  1570. }
  1571. ]
  1572. },
  1573. {
  1574. "watchAck": [
  1575. 4
  1576. ]
  1577. },
  1578. {
  1579. "watchEntity": {
  1580. "docs": [
  1581. {
  1582. "key": "collection/a",
  1583. "version": 1000,
  1584. "value": {
  1585. "include": true,
  1586. "key": "a"
  1587. },
  1588. "options": {
  1589. "hasLocalMutations": false,
  1590. "hasCommittedMutations": false
  1591. }
  1592. }
  1593. ],
  1594. "targets": [
  1595. 4
  1596. ]
  1597. }
  1598. },
  1599. {
  1600. "watchCurrent": [
  1601. [
  1602. 4
  1603. ],
  1604. "resume-token-2000"
  1605. ]
  1606. },
  1607. {
  1608. "watchSnapshot": {
  1609. "version": 2000,
  1610. "targetIds": []
  1611. },
  1612. "expectedSnapshotEvents": [
  1613. {
  1614. "query": {
  1615. "path": "collection",
  1616. "limit": 1,
  1617. "limitType": "LimitToFirst",
  1618. "filters": [
  1619. [
  1620. "include",
  1621. "==",
  1622. true
  1623. ]
  1624. ],
  1625. "orderBys": []
  1626. },
  1627. "errorCode": 0,
  1628. "fromCache": false,
  1629. "hasPendingWrites": false
  1630. }
  1631. ]
  1632. },
  1633. {
  1634. "userPatch": [
  1635. "collection/a",
  1636. {
  1637. "include": false
  1638. }
  1639. ],
  1640. "expectedSnapshotEvents": [
  1641. {
  1642. "query": {
  1643. "path": "collection",
  1644. "limit": 1,
  1645. "limitType": "LimitToFirst",
  1646. "filters": [
  1647. [
  1648. "include",
  1649. "==",
  1650. true
  1651. ]
  1652. ],
  1653. "orderBys": []
  1654. },
  1655. "added": [
  1656. {
  1657. "key": "collection/b",
  1658. "version": 1000,
  1659. "value": {
  1660. "include": true,
  1661. "key": "b"
  1662. },
  1663. "options": {
  1664. "hasLocalMutations": false,
  1665. "hasCommittedMutations": false
  1666. }
  1667. }
  1668. ],
  1669. "removed": [
  1670. {
  1671. "key": "collection/a",
  1672. "version": 1000,
  1673. "value": {
  1674. "include": true,
  1675. "key": "a"
  1676. },
  1677. "options": {
  1678. "hasLocalMutations": false,
  1679. "hasCommittedMutations": false
  1680. }
  1681. }
  1682. ],
  1683. "errorCode": 0,
  1684. "fromCache": true,
  1685. "hasPendingWrites": false
  1686. }
  1687. ],
  1688. "expectedState": {
  1689. "limboDocs": [
  1690. "collection/b"
  1691. ],
  1692. "activeTargets": {
  1693. "1": {
  1694. "queries": [
  1695. {
  1696. "path": "collection/b",
  1697. "filters": [],
  1698. "orderBys": []
  1699. }
  1700. ],
  1701. "resumeToken": ""
  1702. },
  1703. "4": {
  1704. "queries": [
  1705. {
  1706. "path": "collection",
  1707. "limit": 1,
  1708. "limitType": "LimitToFirst",
  1709. "filters": [
  1710. [
  1711. "include",
  1712. "==",
  1713. true
  1714. ]
  1715. ],
  1716. "orderBys": []
  1717. }
  1718. ],
  1719. "resumeToken": ""
  1720. }
  1721. }
  1722. }
  1723. },
  1724. {
  1725. "watchAck": [
  1726. 1
  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. 1
  1747. ]
  1748. }
  1749. },
  1750. {
  1751. "watchSnapshot": {
  1752. "version": 2000,
  1753. "targetIds": []
  1754. }
  1755. },
  1756. {
  1757. "watchCurrent": [
  1758. [
  1759. 1
  1760. ],
  1761. "resume-token-3000"
  1762. ]
  1763. },
  1764. {
  1765. "watchSnapshot": {
  1766. "version": 3000,
  1767. "targetIds": []
  1768. }
  1769. },
  1770. {
  1771. "watchEntity": {
  1772. "docs": [
  1773. {
  1774. "key": "collection/a",
  1775. "version": 1000,
  1776. "value": {
  1777. "include": true,
  1778. "key": "a"
  1779. },
  1780. "options": {
  1781. "hasLocalMutations": false,
  1782. "hasCommittedMutations": false
  1783. }
  1784. }
  1785. ],
  1786. "removedTargets": [
  1787. 4
  1788. ]
  1789. }
  1790. },
  1791. {
  1792. "watchEntity": {
  1793. "docs": [
  1794. {
  1795. "key": "collection/b",
  1796. "version": 1000,
  1797. "value": {
  1798. "include": true,
  1799. "key": "b"
  1800. },
  1801. "options": {
  1802. "hasLocalMutations": false,
  1803. "hasCommittedMutations": false
  1804. }
  1805. }
  1806. ],
  1807. "targets": [
  1808. 4
  1809. ]
  1810. }
  1811. },
  1812. {
  1813. "watchSnapshot": {
  1814. "version": 4000,
  1815. "targetIds": []
  1816. },
  1817. "expectedSnapshotEvents": [
  1818. {
  1819. "query": {
  1820. "path": "collection",
  1821. "limit": 1,
  1822. "limitType": "LimitToFirst",
  1823. "filters": [
  1824. [
  1825. "include",
  1826. "==",
  1827. true
  1828. ]
  1829. ],
  1830. "orderBys": []
  1831. },
  1832. "errorCode": 0,
  1833. "fromCache": false,
  1834. "hasPendingWrites": false
  1835. }
  1836. ],
  1837. "expectedState": {
  1838. "limboDocs": [],
  1839. "activeTargets": {
  1840. "4": {
  1841. "queries": [
  1842. {
  1843. "path": "collection",
  1844. "limit": 1,
  1845. "limitType": "LimitToFirst",
  1846. "filters": [
  1847. [
  1848. "include",
  1849. "==",
  1850. true
  1851. ]
  1852. ],
  1853. "orderBys": []
  1854. }
  1855. ],
  1856. "resumeToken": ""
  1857. }
  1858. }
  1859. }
  1860. }
  1861. ]
  1862. },
  1863. "Limbo resolution handles snapshot before CURRENT [no document update]": {
  1864. "describeName": "Limbo Documents:",
  1865. "itName": "Limbo resolution handles snapshot before CURRENT [no document update]",
  1866. "tags": [],
  1867. "config": {
  1868. "useGarbageCollection": false,
  1869. "numClients": 1
  1870. },
  1871. "steps": [
  1872. {
  1873. "userListen": [
  1874. 2,
  1875. {
  1876. "path": "collection",
  1877. "filters": [],
  1878. "orderBys": []
  1879. }
  1880. ],
  1881. "expectedState": {
  1882. "activeTargets": {
  1883. "2": {
  1884. "queries": [
  1885. {
  1886. "path": "collection",
  1887. "filters": [],
  1888. "orderBys": []
  1889. }
  1890. ],
  1891. "resumeToken": ""
  1892. }
  1893. }
  1894. }
  1895. },
  1896. {
  1897. "watchAck": [
  1898. 2
  1899. ]
  1900. },
  1901. {
  1902. "watchEntity": {
  1903. "docs": [
  1904. {
  1905. "key": "collection/a",
  1906. "version": 1000,
  1907. "value": {
  1908. "include": true,
  1909. "key": "a"
  1910. },
  1911. "options": {
  1912. "hasLocalMutations": false,
  1913. "hasCommittedMutations": false
  1914. }
  1915. },
  1916. {
  1917. "key": "collection/b",
  1918. "version": 1000,
  1919. "value": {
  1920. "include": true,
  1921. "key": "b"
  1922. },
  1923. "options": {
  1924. "hasLocalMutations": false,
  1925. "hasCommittedMutations": false
  1926. }
  1927. }
  1928. ],
  1929. "targets": [
  1930. 2
  1931. ]
  1932. }
  1933. },
  1934. {
  1935. "watchCurrent": [
  1936. [
  1937. 2
  1938. ],
  1939. "resume-token-1000"
  1940. ]
  1941. },
  1942. {
  1943. "watchSnapshot": {
  1944. "version": 1000,
  1945. "targetIds": []
  1946. },
  1947. "expectedSnapshotEvents": [
  1948. {
  1949. "query": {
  1950. "path": "collection",
  1951. "filters": [],
  1952. "orderBys": []
  1953. },
  1954. "added": [
  1955. {
  1956. "key": "collection/a",
  1957. "version": 1000,
  1958. "value": {
  1959. "include": true,
  1960. "key": "a"
  1961. },
  1962. "options": {
  1963. "hasLocalMutations": false,
  1964. "hasCommittedMutations": false
  1965. }
  1966. },
  1967. {
  1968. "key": "collection/b",
  1969. "version": 1000,
  1970. "value": {
  1971. "include": true,
  1972. "key": "b"
  1973. },
  1974. "options": {
  1975. "hasLocalMutations": false,
  1976. "hasCommittedMutations": false
  1977. }
  1978. }
  1979. ],
  1980. "errorCode": 0,
  1981. "fromCache": false,
  1982. "hasPendingWrites": false
  1983. }
  1984. ]
  1985. },
  1986. {
  1987. "userUnlisten": [
  1988. 2,
  1989. {
  1990. "path": "collection",
  1991. "filters": [],
  1992. "orderBys": []
  1993. }
  1994. ],
  1995. "expectedState": {
  1996. "activeTargets": {}
  1997. }
  1998. },
  1999. {
  2000. "userListen": [
  2001. 4,
  2002. {
  2003. "path": "collection",
  2004. "limit": 1,
  2005. "limitType": "LimitToFirst",
  2006. "filters": [
  2007. [
  2008. "include",
  2009. "==",
  2010. true
  2011. ]
  2012. ],
  2013. "orderBys": []
  2014. }
  2015. ],
  2016. "expectedState": {
  2017. "activeTargets": {
  2018. "4": {
  2019. "queries": [
  2020. {
  2021. "path": "collection",
  2022. "limit": 1,
  2023. "limitType": "LimitToFirst",
  2024. "filters": [
  2025. [
  2026. "include",
  2027. "==",
  2028. true
  2029. ]
  2030. ],
  2031. "orderBys": []
  2032. }
  2033. ],
  2034. "resumeToken": ""
  2035. }
  2036. }
  2037. },
  2038. "expectedSnapshotEvents": [
  2039. {
  2040. "query": {
  2041. "path": "collection",
  2042. "limit": 1,
  2043. "limitType": "LimitToFirst",
  2044. "filters": [
  2045. [
  2046. "include",
  2047. "==",
  2048. true
  2049. ]
  2050. ],
  2051. "orderBys": []
  2052. },
  2053. "added": [
  2054. {
  2055. "key": "collection/a",
  2056. "version": 1000,
  2057. "value": {
  2058. "include": true,
  2059. "key": "a"
  2060. },
  2061. "options": {
  2062. "hasLocalMutations": false,
  2063. "hasCommittedMutations": false
  2064. }
  2065. }
  2066. ],
  2067. "errorCode": 0,
  2068. "fromCache": true,
  2069. "hasPendingWrites": false
  2070. }
  2071. ]
  2072. },
  2073. {
  2074. "watchAck": [
  2075. 4
  2076. ]
  2077. },
  2078. {
  2079. "watchEntity": {
  2080. "docs": [
  2081. {
  2082. "key": "collection/a",
  2083. "version": 1000,
  2084. "value": {
  2085. "include": true,
  2086. "key": "a"
  2087. },
  2088. "options": {
  2089. "hasLocalMutations": false,
  2090. "hasCommittedMutations": false
  2091. }
  2092. }
  2093. ],
  2094. "targets": [
  2095. 4
  2096. ]
  2097. }
  2098. },
  2099. {
  2100. "watchCurrent": [
  2101. [
  2102. 4
  2103. ],
  2104. "resume-token-2000"
  2105. ]
  2106. },
  2107. {
  2108. "watchSnapshot": {
  2109. "version": 2000,
  2110. "targetIds": []
  2111. },
  2112. "expectedSnapshotEvents": [
  2113. {
  2114. "query": {
  2115. "path": "collection",
  2116. "limit": 1,
  2117. "limitType": "LimitToFirst",
  2118. "filters": [
  2119. [
  2120. "include",
  2121. "==",
  2122. true
  2123. ]
  2124. ],
  2125. "orderBys": []
  2126. },
  2127. "errorCode": 0,
  2128. "fromCache": false,
  2129. "hasPendingWrites": false
  2130. }
  2131. ]
  2132. },
  2133. {
  2134. "userPatch": [
  2135. "collection/a",
  2136. {
  2137. "include": false
  2138. }
  2139. ],
  2140. "expectedSnapshotEvents": [
  2141. {
  2142. "query": {
  2143. "path": "collection",
  2144. "limit": 1,
  2145. "limitType": "LimitToFirst",
  2146. "filters": [
  2147. [
  2148. "include",
  2149. "==",
  2150. true
  2151. ]
  2152. ],
  2153. "orderBys": []
  2154. },
  2155. "added": [
  2156. {
  2157. "key": "collection/b",
  2158. "version": 1000,
  2159. "value": {
  2160. "include": true,
  2161. "key": "b"
  2162. },
  2163. "options": {
  2164. "hasLocalMutations": false,
  2165. "hasCommittedMutations": false
  2166. }
  2167. }
  2168. ],
  2169. "removed": [
  2170. {
  2171. "key": "collection/a",
  2172. "version": 1000,
  2173. "value": {
  2174. "include": true,
  2175. "key": "a"
  2176. },
  2177. "options": {
  2178. "hasLocalMutations": false,
  2179. "hasCommittedMutations": false
  2180. }
  2181. }
  2182. ],
  2183. "errorCode": 0,
  2184. "fromCache": true,
  2185. "hasPendingWrites": false
  2186. }
  2187. ],
  2188. "expectedState": {
  2189. "limboDocs": [
  2190. "collection/b"
  2191. ],
  2192. "activeTargets": {
  2193. "1": {
  2194. "queries": [
  2195. {
  2196. "path": "collection/b",
  2197. "filters": [],
  2198. "orderBys": []
  2199. }
  2200. ],
  2201. "resumeToken": ""
  2202. },
  2203. "4": {
  2204. "queries": [
  2205. {
  2206. "path": "collection",
  2207. "limit": 1,
  2208. "limitType": "LimitToFirst",
  2209. "filters": [
  2210. [
  2211. "include",
  2212. "==",
  2213. true
  2214. ]
  2215. ],
  2216. "orderBys": []
  2217. }
  2218. ],
  2219. "resumeToken": ""
  2220. }
  2221. }
  2222. }
  2223. },
  2224. {
  2225. "watchAck": [
  2226. 1
  2227. ]
  2228. },
  2229. {
  2230. "watchSnapshot": {
  2231. "version": 2000,
  2232. "targetIds": []
  2233. }
  2234. },
  2235. {
  2236. "watchCurrent": [
  2237. [
  2238. 1
  2239. ],
  2240. "resume-token-3000"
  2241. ]
  2242. },
  2243. {
  2244. "watchSnapshot": {
  2245. "version": 3000,
  2246. "targetIds": []
  2247. },
  2248. "expectedState": {
  2249. "limboDocs": [],
  2250. "activeTargets": {
  2251. "4": {
  2252. "queries": [
  2253. {
  2254. "path": "collection",
  2255. "limit": 1,
  2256. "limitType": "LimitToFirst",
  2257. "filters": [
  2258. [
  2259. "include",
  2260. "==",
  2261. true
  2262. ]
  2263. ],
  2264. "orderBys": []
  2265. }
  2266. ],
  2267. "resumeToken": ""
  2268. }
  2269. }
  2270. },
  2271. "expectedSnapshotEvents": [
  2272. {
  2273. "query": {
  2274. "path": "collection",
  2275. "limit": 1,
  2276. "limitType": "LimitToFirst",
  2277. "filters": [
  2278. [
  2279. "include",
  2280. "==",
  2281. true
  2282. ]
  2283. ],
  2284. "orderBys": []
  2285. },
  2286. "removed": [
  2287. {
  2288. "key": "collection/b",
  2289. "version": 1000,
  2290. "value": {
  2291. "include": true,
  2292. "key": "b"
  2293. },
  2294. "options": {
  2295. "hasLocalMutations": false,
  2296. "hasCommittedMutations": false
  2297. }
  2298. }
  2299. ],
  2300. "errorCode": 0,
  2301. "fromCache": false,
  2302. "hasPendingWrites": false
  2303. }
  2304. ]
  2305. },
  2306. {
  2307. "watchEntity": {
  2308. "docs": [
  2309. {
  2310. "key": "collection/a",
  2311. "version": 1000,
  2312. "value": {
  2313. "include": true,
  2314. "key": "a"
  2315. },
  2316. "options": {
  2317. "hasLocalMutations": false,
  2318. "hasCommittedMutations": false
  2319. }
  2320. }
  2321. ],
  2322. "removedTargets": [
  2323. 4
  2324. ]
  2325. }
  2326. },
  2327. {
  2328. "watchSnapshot": {
  2329. "version": 4000,
  2330. "targetIds": []
  2331. }
  2332. }
  2333. ]
  2334. },
  2335. "Failed limbo resolution removes document from view": {
  2336. "describeName": "Limbo Documents:",
  2337. "itName": "Failed limbo resolution removes document from view",
  2338. "tags": [],
  2339. "config": {
  2340. "useGarbageCollection": true,
  2341. "numClients": 1
  2342. },
  2343. "steps": [
  2344. {
  2345. "userListen": [
  2346. 2,
  2347. {
  2348. "path": "collection",
  2349. "filters": [
  2350. [
  2351. "matches",
  2352. "==",
  2353. true
  2354. ]
  2355. ],
  2356. "orderBys": []
  2357. }
  2358. ],
  2359. "expectedState": {
  2360. "activeTargets": {
  2361. "2": {
  2362. "queries": [
  2363. {
  2364. "path": "collection",
  2365. "filters": [
  2366. [
  2367. "matches",
  2368. "==",
  2369. true
  2370. ]
  2371. ],
  2372. "orderBys": []
  2373. }
  2374. ],
  2375. "resumeToken": ""
  2376. }
  2377. }
  2378. }
  2379. },
  2380. {
  2381. "watchAck": [
  2382. 2
  2383. ]
  2384. },
  2385. {
  2386. "watchEntity": {
  2387. "docs": [
  2388. {
  2389. "key": "collection/a",
  2390. "version": 1000,
  2391. "value": {
  2392. "matches": true
  2393. },
  2394. "options": {
  2395. "hasLocalMutations": false,
  2396. "hasCommittedMutations": false
  2397. }
  2398. }
  2399. ],
  2400. "targets": [
  2401. 2
  2402. ]
  2403. }
  2404. },
  2405. {
  2406. "watchCurrent": [
  2407. [
  2408. 2
  2409. ],
  2410. "resume-token-1000"
  2411. ]
  2412. },
  2413. {
  2414. "watchSnapshot": {
  2415. "version": 1000,
  2416. "targetIds": []
  2417. },
  2418. "expectedSnapshotEvents": [
  2419. {
  2420. "query": {
  2421. "path": "collection",
  2422. "filters": [
  2423. [
  2424. "matches",
  2425. "==",
  2426. true
  2427. ]
  2428. ],
  2429. "orderBys": []
  2430. },
  2431. "added": [
  2432. {
  2433. "key": "collection/a",
  2434. "version": 1000,
  2435. "value": {
  2436. "matches": true
  2437. },
  2438. "options": {
  2439. "hasLocalMutations": false,
  2440. "hasCommittedMutations": false
  2441. }
  2442. }
  2443. ],
  2444. "errorCode": 0,
  2445. "fromCache": false,
  2446. "hasPendingWrites": false
  2447. }
  2448. ]
  2449. },
  2450. {
  2451. "userPatch": [
  2452. "collection/a",
  2453. {
  2454. "modified": true
  2455. }
  2456. ],
  2457. "expectedSnapshotEvents": [
  2458. {
  2459. "query": {
  2460. "path": "collection",
  2461. "filters": [
  2462. [
  2463. "matches",
  2464. "==",
  2465. true
  2466. ]
  2467. ],
  2468. "orderBys": []
  2469. },
  2470. "modified": [
  2471. {
  2472. "key": "collection/a",
  2473. "version": 1000,
  2474. "value": {
  2475. "matches": true,
  2476. "modified": true
  2477. },
  2478. "options": {
  2479. "hasLocalMutations": true,
  2480. "hasCommittedMutations": false
  2481. }
  2482. }
  2483. ],
  2484. "errorCode": 0,
  2485. "fromCache": false,
  2486. "hasPendingWrites": true
  2487. }
  2488. ]
  2489. },
  2490. {
  2491. "userUnlisten": [
  2492. 2,
  2493. {
  2494. "path": "collection",
  2495. "filters": [
  2496. [
  2497. "matches",
  2498. "==",
  2499. true
  2500. ]
  2501. ],
  2502. "orderBys": []
  2503. }
  2504. ],
  2505. "expectedState": {
  2506. "activeTargets": {}
  2507. }
  2508. },
  2509. {
  2510. "userListen": [
  2511. 4,
  2512. {
  2513. "path": "collection",
  2514. "filters": [],
  2515. "orderBys": []
  2516. }
  2517. ],
  2518. "expectedState": {
  2519. "activeTargets": {
  2520. "4": {
  2521. "queries": [
  2522. {
  2523. "path": "collection",
  2524. "filters": [],
  2525. "orderBys": []
  2526. }
  2527. ],
  2528. "resumeToken": ""
  2529. }
  2530. }
  2531. },
  2532. "expectedSnapshotEvents": [
  2533. {
  2534. "query": {
  2535. "path": "collection",
  2536. "filters": [],
  2537. "orderBys": []
  2538. },
  2539. "added": [
  2540. {
  2541. "key": "collection/a",
  2542. "version": 1000,
  2543. "value": {
  2544. "matches": true,
  2545. "modified": true
  2546. },
  2547. "options": {
  2548. "hasLocalMutations": true,
  2549. "hasCommittedMutations": false
  2550. }
  2551. }
  2552. ],
  2553. "errorCode": 0,
  2554. "fromCache": true,
  2555. "hasPendingWrites": true
  2556. }
  2557. ]
  2558. },
  2559. {
  2560. "watchAck": [
  2561. 4
  2562. ]
  2563. },
  2564. {
  2565. "watchEntity": {
  2566. "docs": [],
  2567. "targets": [
  2568. 4
  2569. ]
  2570. }
  2571. },
  2572. {
  2573. "watchCurrent": [
  2574. [
  2575. 4
  2576. ],
  2577. "resume-token-1001"
  2578. ]
  2579. },
  2580. {
  2581. "watchSnapshot": {
  2582. "version": 1001,
  2583. "targetIds": []
  2584. },
  2585. "expectedSnapshotEvents": [
  2586. {
  2587. "query": {
  2588. "path": "collection",
  2589. "filters": [],
  2590. "orderBys": []
  2591. },
  2592. "errorCode": 0,
  2593. "fromCache": false,
  2594. "hasPendingWrites": true
  2595. }
  2596. ]
  2597. },
  2598. {
  2599. "failWrite": {
  2600. "error": {
  2601. "code": 9
  2602. }
  2603. },
  2604. "expectedState": {
  2605. "userCallbacks": {
  2606. "acknowledgedDocs": [],
  2607. "rejectedDocs": [
  2608. "collection/a"
  2609. ]
  2610. },
  2611. "limboDocs": [
  2612. "collection/a"
  2613. ],
  2614. "activeTargets": {
  2615. "1": {
  2616. "queries": [
  2617. {
  2618. "path": "collection/a",
  2619. "filters": [],
  2620. "orderBys": []
  2621. }
  2622. ],
  2623. "resumeToken": ""
  2624. },
  2625. "4": {
  2626. "queries": [
  2627. {
  2628. "path": "collection",
  2629. "filters": [],
  2630. "orderBys": []
  2631. }
  2632. ],
  2633. "resumeToken": ""
  2634. }
  2635. }
  2636. },
  2637. "expectedSnapshotEvents": [
  2638. {
  2639. "query": {
  2640. "path": "collection",
  2641. "filters": [],
  2642. "orderBys": []
  2643. },
  2644. "modified": [
  2645. {
  2646. "key": "collection/a",
  2647. "version": 1000,
  2648. "value": {
  2649. "matches": true
  2650. },
  2651. "options": {
  2652. "hasLocalMutations": false,
  2653. "hasCommittedMutations": false
  2654. }
  2655. }
  2656. ],
  2657. "errorCode": 0,
  2658. "fromCache": true,
  2659. "hasPendingWrites": false
  2660. }
  2661. ]
  2662. },
  2663. {
  2664. "watchRemove": {
  2665. "targetIds": [
  2666. 1
  2667. ],
  2668. "cause": {
  2669. "code": 7
  2670. }
  2671. },
  2672. "expectedState": {
  2673. "activeTargets": {
  2674. "4": {
  2675. "queries": [
  2676. {
  2677. "path": "collection",
  2678. "filters": [],
  2679. "orderBys": []
  2680. }
  2681. ],
  2682. "resumeToken": ""
  2683. }
  2684. },
  2685. "limboDocs": []
  2686. },
  2687. "expectedSnapshotEvents": [
  2688. {
  2689. "query": {
  2690. "path": "collection",
  2691. "filters": [],
  2692. "orderBys": []
  2693. },
  2694. "removed": [
  2695. {
  2696. "key": "collection/a",
  2697. "version": 1000,
  2698. "value": {
  2699. "matches": true
  2700. },
  2701. "options": {
  2702. "hasLocalMutations": false,
  2703. "hasCommittedMutations": false
  2704. }
  2705. }
  2706. ],
  2707. "errorCode": 0,
  2708. "fromCache": false,
  2709. "hasPendingWrites": false
  2710. }
  2711. ]
  2712. }
  2713. ]
  2714. },
  2715. "Limbo docs are resolved by primary client": {
  2716. "describeName": "Limbo Documents:",
  2717. "itName": "Limbo docs are resolved by primary client",
  2718. "tags": [
  2719. "multi-client"
  2720. ],
  2721. "config": {
  2722. "useGarbageCollection": false,
  2723. "numClients": 2
  2724. },
  2725. "steps": [
  2726. {
  2727. "drainQueue": true,
  2728. "expectedState": {
  2729. "isPrimary": true
  2730. },
  2731. "clientIndex": 0
  2732. },
  2733. {
  2734. "drainQueue": true,
  2735. "clientIndex": 1
  2736. },
  2737. {
  2738. "userListen": [
  2739. 2,
  2740. {
  2741. "path": "collection",
  2742. "filters": [],
  2743. "orderBys": []
  2744. }
  2745. ],
  2746. "expectedState": {
  2747. "activeTargets": {
  2748. "2": {
  2749. "queries": [
  2750. {
  2751. "path": "collection",
  2752. "filters": [],
  2753. "orderBys": []
  2754. }
  2755. ],
  2756. "resumeToken": ""
  2757. }
  2758. }
  2759. },
  2760. "clientIndex": 1
  2761. },
  2762. {
  2763. "drainQueue": true,
  2764. "expectedState": {
  2765. "activeTargets": {
  2766. "2": {
  2767. "queries": [
  2768. {
  2769. "path": "collection",
  2770. "filters": [],
  2771. "orderBys": []
  2772. }
  2773. ],
  2774. "resumeToken": ""
  2775. }
  2776. }
  2777. },
  2778. "clientIndex": 0
  2779. },
  2780. {
  2781. "watchAck": [
  2782. 2
  2783. ],
  2784. "clientIndex": 0
  2785. },
  2786. {
  2787. "watchEntity": {
  2788. "docs": [
  2789. {
  2790. "key": "collection/a",
  2791. "version": 1000,
  2792. "value": {
  2793. "key": "a"
  2794. },
  2795. "options": {
  2796. "hasLocalMutations": false,
  2797. "hasCommittedMutations": false
  2798. }
  2799. },
  2800. {
  2801. "key": "collection/b",
  2802. "version": 1001,
  2803. "value": {
  2804. "key": "b"
  2805. },
  2806. "options": {
  2807. "hasLocalMutations": false,
  2808. "hasCommittedMutations": false
  2809. }
  2810. }
  2811. ],
  2812. "targets": [
  2813. 2
  2814. ]
  2815. },
  2816. "clientIndex": 0
  2817. },
  2818. {
  2819. "watchCurrent": [
  2820. [
  2821. 2
  2822. ],
  2823. "resume-token-1002"
  2824. ],
  2825. "clientIndex": 0
  2826. },
  2827. {
  2828. "watchSnapshot": {
  2829. "version": 1002,
  2830. "targetIds": []
  2831. },
  2832. "clientIndex": 0
  2833. },
  2834. {
  2835. "drainQueue": true,
  2836. "expectedSnapshotEvents": [
  2837. {
  2838. "query": {
  2839. "path": "collection",
  2840. "filters": [],
  2841. "orderBys": []
  2842. },
  2843. "added": [
  2844. {
  2845. "key": "collection/a",
  2846. "version": 1000,
  2847. "value": {
  2848. "key": "a"
  2849. },
  2850. "options": {
  2851. "hasLocalMutations": false,
  2852. "hasCommittedMutations": false
  2853. }
  2854. },
  2855. {
  2856. "key": "collection/b",
  2857. "version": 1001,
  2858. "value": {
  2859. "key": "b"
  2860. },
  2861. "options": {
  2862. "hasLocalMutations": false,
  2863. "hasCommittedMutations": false
  2864. }
  2865. }
  2866. ],
  2867. "errorCode": 0,
  2868. "fromCache": false,
  2869. "hasPendingWrites": false
  2870. }
  2871. ],
  2872. "clientIndex": 1
  2873. },
  2874. {
  2875. "drainQueue": true,
  2876. "clientIndex": 0
  2877. },
  2878. {
  2879. "watchEntity": {
  2880. "key": "collection/b",
  2881. "removedTargets": [
  2882. 2
  2883. ]
  2884. },
  2885. "clientIndex": 0
  2886. },
  2887. {
  2888. "watchSnapshot": {
  2889. "version": 1003,
  2890. "targetIds": []
  2891. },
  2892. "expectedState": {
  2893. "limboDocs": [
  2894. "collection/b"
  2895. ],
  2896. "activeTargets": {
  2897. "1": {
  2898. "queries": [
  2899. {
  2900. "path": "collection/b",
  2901. "filters": [],
  2902. "orderBys": []
  2903. }
  2904. ],
  2905. "resumeToken": ""
  2906. },
  2907. "2": {
  2908. "queries": [
  2909. {
  2910. "path": "collection",
  2911. "filters": [],
  2912. "orderBys": []
  2913. }
  2914. ],
  2915. "resumeToken": ""
  2916. }
  2917. }
  2918. },
  2919. "clientIndex": 0
  2920. },
  2921. {
  2922. "drainQueue": true,
  2923. "expectedSnapshotEvents": [
  2924. {
  2925. "query": {
  2926. "path": "collection",
  2927. "filters": [],
  2928. "orderBys": []
  2929. },
  2930. "errorCode": 0,
  2931. "fromCache": true,
  2932. "hasPendingWrites": false
  2933. }
  2934. ],
  2935. "clientIndex": 1
  2936. },
  2937. {
  2938. "drainQueue": true,
  2939. "clientIndex": 0
  2940. },
  2941. {
  2942. "watchAck": [
  2943. 1
  2944. ],
  2945. "clientIndex": 0
  2946. },
  2947. {
  2948. "watchCurrent": [
  2949. [
  2950. 1
  2951. ],
  2952. "resume-token-1004"
  2953. ],
  2954. "clientIndex": 0
  2955. },
  2956. {
  2957. "watchSnapshot": {
  2958. "version": 1004,
  2959. "targetIds": []
  2960. },
  2961. "expectedState": {
  2962. "limboDocs": [],
  2963. "activeTargets": {
  2964. "2": {
  2965. "queries": [
  2966. {
  2967. "path": "collection",
  2968. "filters": [],
  2969. "orderBys": []
  2970. }
  2971. ],
  2972. "resumeToken": ""
  2973. }
  2974. }
  2975. },
  2976. "clientIndex": 0
  2977. },
  2978. {
  2979. "drainQueue": true,
  2980. "expectedSnapshotEvents": [
  2981. {
  2982. "query": {
  2983. "path": "collection",
  2984. "filters": [],
  2985. "orderBys": []
  2986. },
  2987. "removed": [
  2988. {
  2989. "key": "collection/b",
  2990. "version": 1001,
  2991. "value": {
  2992. "key": "b"
  2993. },
  2994. "options": {
  2995. "hasLocalMutations": false,
  2996. "hasCommittedMutations": false
  2997. }
  2998. }
  2999. ],
  3000. "errorCode": 0,
  3001. "fromCache": false,
  3002. "hasPendingWrites": false
  3003. }
  3004. ],
  3005. "clientIndex": 1
  3006. }
  3007. ]
  3008. },
  3009. "Limbo documents are resolved after primary tab failover": {
  3010. "describeName": "Limbo Documents:",
  3011. "itName": "Limbo documents are resolved after primary tab failover",
  3012. "tags": [
  3013. "multi-client"
  3014. ],
  3015. "config": {
  3016. "useGarbageCollection": false,
  3017. "numClients": 2
  3018. },
  3019. "steps": [
  3020. {
  3021. "drainQueue": true,
  3022. "expectedState": {
  3023. "isPrimary": true
  3024. },
  3025. "clientIndex": 0
  3026. },
  3027. {
  3028. "drainQueue": true,
  3029. "clientIndex": 1
  3030. },
  3031. {
  3032. "userListen": [
  3033. 2,
  3034. {
  3035. "path": "collection",
  3036. "filters": [],
  3037. "orderBys": []
  3038. }
  3039. ],
  3040. "expectedState": {
  3041. "activeTargets": {
  3042. "2": {
  3043. "queries": [
  3044. {
  3045. "path": "collection",
  3046. "filters": [],
  3047. "orderBys": []
  3048. }
  3049. ],
  3050. "resumeToken": ""
  3051. }
  3052. }
  3053. },
  3054. "clientIndex": 1
  3055. },
  3056. {
  3057. "drainQueue": true,
  3058. "expectedState": {
  3059. "activeTargets": {
  3060. "2": {
  3061. "queries": [
  3062. {
  3063. "path": "collection",
  3064. "filters": [],
  3065. "orderBys": []
  3066. }
  3067. ],
  3068. "resumeToken": ""
  3069. }
  3070. }
  3071. },
  3072. "clientIndex": 0
  3073. },
  3074. {
  3075. "watchAck": [
  3076. 2
  3077. ],
  3078. "clientIndex": 0
  3079. },
  3080. {
  3081. "watchEntity": {
  3082. "docs": [
  3083. {
  3084. "key": "collection/a",
  3085. "version": 1000,
  3086. "value": {
  3087. "key": "a"
  3088. },
  3089. "options": {
  3090. "hasLocalMutations": false,
  3091. "hasCommittedMutations": false
  3092. }
  3093. },
  3094. {
  3095. "key": "collection/b",
  3096. "version": 1001,
  3097. "value": {
  3098. "key": "b"
  3099. },
  3100. "options": {
  3101. "hasLocalMutations": false,
  3102. "hasCommittedMutations": false
  3103. }
  3104. }
  3105. ],
  3106. "targets": [
  3107. 2
  3108. ]
  3109. },
  3110. "clientIndex": 0
  3111. },
  3112. {
  3113. "watchCurrent": [
  3114. [
  3115. 2
  3116. ],
  3117. "resume-token-1000000"
  3118. ],
  3119. "clientIndex": 0
  3120. },
  3121. {
  3122. "watchSnapshot": {
  3123. "version": 1000000,
  3124. "targetIds": []
  3125. },
  3126. "clientIndex": 0
  3127. },
  3128. {
  3129. "drainQueue": true,
  3130. "expectedSnapshotEvents": [
  3131. {
  3132. "query": {
  3133. "path": "collection",
  3134. "filters": [],
  3135. "orderBys": []
  3136. },
  3137. "added": [
  3138. {
  3139. "key": "collection/a",
  3140. "version": 1000,
  3141. "value": {
  3142. "key": "a"
  3143. },
  3144. "options": {
  3145. "hasLocalMutations": false,
  3146. "hasCommittedMutations": false
  3147. }
  3148. },
  3149. {
  3150. "key": "collection/b",
  3151. "version": 1001,
  3152. "value": {
  3153. "key": "b"
  3154. },
  3155. "options": {
  3156. "hasLocalMutations": false,
  3157. "hasCommittedMutations": false
  3158. }
  3159. }
  3160. ],
  3161. "errorCode": 0,
  3162. "fromCache": false,
  3163. "hasPendingWrites": false
  3164. }
  3165. ],
  3166. "clientIndex": 1
  3167. },
  3168. {
  3169. "drainQueue": true,
  3170. "clientIndex": 0
  3171. },
  3172. {
  3173. "watchEntity": {
  3174. "key": "collection/b",
  3175. "removedTargets": [
  3176. 2
  3177. ]
  3178. },
  3179. "clientIndex": 0
  3180. },
  3181. {
  3182. "watchSnapshot": {
  3183. "version": 2000000,
  3184. "targetIds": []
  3185. },
  3186. "expectedState": {
  3187. "limboDocs": [
  3188. "collection/b"
  3189. ],
  3190. "activeTargets": {
  3191. "1": {
  3192. "queries": [
  3193. {
  3194. "path": "collection/b",
  3195. "filters": [],
  3196. "orderBys": []
  3197. }
  3198. ],
  3199. "resumeToken": ""
  3200. },
  3201. "2": {
  3202. "queries": [
  3203. {
  3204. "path": "collection",
  3205. "filters": [],
  3206. "orderBys": []
  3207. }
  3208. ],
  3209. "resumeToken": ""
  3210. }
  3211. }
  3212. },
  3213. "clientIndex": 0
  3214. },
  3215. {
  3216. "shutdown": true,
  3217. "expectedState": {
  3218. "activeTargets": {},
  3219. "limboDocs": []
  3220. },
  3221. "clientIndex": 0
  3222. },
  3223. {
  3224. "drainQueue": true,
  3225. "expectedSnapshotEvents": [
  3226. {
  3227. "query": {
  3228. "path": "collection",
  3229. "filters": [],
  3230. "orderBys": []
  3231. },
  3232. "errorCode": 0,
  3233. "fromCache": true,
  3234. "hasPendingWrites": false
  3235. }
  3236. ],
  3237. "clientIndex": 1
  3238. },
  3239. {
  3240. "runTimer": "client_metadata_refresh",
  3241. "expectedState": {
  3242. "isPrimary": true,
  3243. "activeTargets": {
  3244. "2": {
  3245. "queries": [
  3246. {
  3247. "path": "collection",
  3248. "filters": [],
  3249. "orderBys": []
  3250. }
  3251. ],
  3252. "resumeToken": "resume-token-1000000"
  3253. }
  3254. }
  3255. },
  3256. "clientIndex": 1
  3257. },
  3258. {
  3259. "watchAck": [
  3260. 2
  3261. ],
  3262. "clientIndex": 1
  3263. },
  3264. {
  3265. "watchEntity": {
  3266. "docs": [],
  3267. "targets": [
  3268. 2
  3269. ]
  3270. },
  3271. "clientIndex": 1
  3272. },
  3273. {
  3274. "watchCurrent": [
  3275. [
  3276. 2
  3277. ],
  3278. "resume-token-3000000"
  3279. ],
  3280. "clientIndex": 1
  3281. },
  3282. {
  3283. "watchSnapshot": {
  3284. "version": 3000000,
  3285. "targetIds": []
  3286. },
  3287. "expectedState": {
  3288. "limboDocs": [
  3289. "collection/b"
  3290. ],
  3291. "activeTargets": {
  3292. "1": {
  3293. "queries": [
  3294. {
  3295. "path": "collection/b",
  3296. "filters": [],
  3297. "orderBys": []
  3298. }
  3299. ],
  3300. "resumeToken": ""
  3301. },
  3302. "2": {
  3303. "queries": [
  3304. {
  3305. "path": "collection",
  3306. "filters": [],
  3307. "orderBys": []
  3308. }
  3309. ],
  3310. "resumeToken": "resume-token-1000000"
  3311. }
  3312. }
  3313. },
  3314. "clientIndex": 1
  3315. },
  3316. {
  3317. "watchAck": [
  3318. 1
  3319. ],
  3320. "clientIndex": 1
  3321. },
  3322. {
  3323. "watchCurrent": [
  3324. [
  3325. 1
  3326. ],
  3327. "resume-token-4000000"
  3328. ],
  3329. "clientIndex": 1
  3330. },
  3331. {
  3332. "watchSnapshot": {
  3333. "version": 4000000,
  3334. "targetIds": []
  3335. },
  3336. "expectedState": {
  3337. "limboDocs": [],
  3338. "activeTargets": {
  3339. "2": {
  3340. "queries": [
  3341. {
  3342. "path": "collection",
  3343. "filters": [],
  3344. "orderBys": []
  3345. }
  3346. ],
  3347. "resumeToken": "resume-token-1000000"
  3348. }
  3349. }
  3350. },
  3351. "expectedSnapshotEvents": [
  3352. {
  3353. "query": {
  3354. "path": "collection",
  3355. "filters": [],
  3356. "orderBys": []
  3357. },
  3358. "removed": [
  3359. {
  3360. "key": "collection/b",
  3361. "version": 1001,
  3362. "value": {
  3363. "key": "b"
  3364. },
  3365. "options": {
  3366. "hasLocalMutations": false,
  3367. "hasCommittedMutations": false
  3368. }
  3369. }
  3370. ],
  3371. "errorCode": 0,
  3372. "fromCache": false,
  3373. "hasPendingWrites": false
  3374. }
  3375. ],
  3376. "clientIndex": 1
  3377. }
  3378. ]
  3379. },
  3380. "Limbo documents survive primary state transitions": {
  3381. "describeName": "Limbo Documents:",
  3382. "itName": "Limbo documents survive primary state transitions",
  3383. "tags": [
  3384. "multi-client"
  3385. ],
  3386. "config": {
  3387. "useGarbageCollection": false,
  3388. "numClients": 2
  3389. },
  3390. "steps": [
  3391. {
  3392. "drainQueue": true,
  3393. "expectedState": {
  3394. "isPrimary": true
  3395. },
  3396. "clientIndex": 0
  3397. },
  3398. {
  3399. "userListen": [
  3400. 2,
  3401. {
  3402. "path": "collection",
  3403. "filters": [],
  3404. "orderBys": []
  3405. }
  3406. ],
  3407. "expectedState": {
  3408. "activeTargets": {
  3409. "2": {
  3410. "queries": [
  3411. {
  3412. "path": "collection",
  3413. "filters": [],
  3414. "orderBys": []
  3415. }
  3416. ],
  3417. "resumeToken": ""
  3418. }
  3419. }
  3420. },
  3421. "clientIndex": 0
  3422. },
  3423. {
  3424. "watchAck": [
  3425. 2
  3426. ],
  3427. "clientIndex": 0
  3428. },
  3429. {
  3430. "watchEntity": {
  3431. "docs": [
  3432. {
  3433. "key": "collection/a",
  3434. "version": 1000,
  3435. "value": {
  3436. "key": "a"
  3437. },
  3438. "options": {
  3439. "hasLocalMutations": false,
  3440. "hasCommittedMutations": false
  3441. }
  3442. },
  3443. {
  3444. "key": "collection/b",
  3445. "version": 1001,
  3446. "value": {
  3447. "key": "b"
  3448. },
  3449. "options": {
  3450. "hasLocalMutations": false,
  3451. "hasCommittedMutations": false
  3452. }
  3453. },
  3454. {
  3455. "key": "collection/c",
  3456. "version": 1002,
  3457. "value": {
  3458. "key": "c"
  3459. },
  3460. "options": {
  3461. "hasLocalMutations": false,
  3462. "hasCommittedMutations": false
  3463. }
  3464. }
  3465. ],
  3466. "targets": [
  3467. 2
  3468. ]
  3469. },
  3470. "clientIndex": 0
  3471. },
  3472. {
  3473. "watchCurrent": [
  3474. [
  3475. 2
  3476. ],
  3477. "resume-token-1000000"
  3478. ],
  3479. "clientIndex": 0
  3480. },
  3481. {
  3482. "watchSnapshot": {
  3483. "version": 1000000,
  3484. "targetIds": []
  3485. },
  3486. "expectedSnapshotEvents": [
  3487. {
  3488. "query": {
  3489. "path": "collection",
  3490. "filters": [],
  3491. "orderBys": []
  3492. },
  3493. "added": [
  3494. {
  3495. "key": "collection/a",
  3496. "version": 1000,
  3497. "value": {
  3498. "key": "a"
  3499. },
  3500. "options": {
  3501. "hasLocalMutations": false,
  3502. "hasCommittedMutations": false
  3503. }
  3504. },
  3505. {
  3506. "key": "collection/b",
  3507. "version": 1001,
  3508. "value": {
  3509. "key": "b"
  3510. },
  3511. "options": {
  3512. "hasLocalMutations": false,
  3513. "hasCommittedMutations": false
  3514. }
  3515. },
  3516. {
  3517. "key": "collection/c",
  3518. "version": 1002,
  3519. "value": {
  3520. "key": "c"
  3521. },
  3522. "options": {
  3523. "hasLocalMutations": false,
  3524. "hasCommittedMutations": false
  3525. }
  3526. }
  3527. ],
  3528. "errorCode": 0,
  3529. "fromCache": false,
  3530. "hasPendingWrites": false
  3531. }
  3532. ],
  3533. "clientIndex": 0
  3534. },
  3535. {
  3536. "watchEntity": {
  3537. "key": "collection/b",
  3538. "removedTargets": [
  3539. 2
  3540. ]
  3541. },
  3542. "clientIndex": 0
  3543. },
  3544. {
  3545. "watchEntity": {
  3546. "key": "collection/c",
  3547. "removedTargets": [
  3548. 2
  3549. ]
  3550. },
  3551. "clientIndex": 0
  3552. },
  3553. {
  3554. "watchSnapshot": {
  3555. "version": 2000000,
  3556. "targetIds": []
  3557. },
  3558. "expectedSnapshotEvents": [
  3559. {
  3560. "query": {
  3561. "path": "collection",
  3562. "filters": [],
  3563. "orderBys": []
  3564. },
  3565. "errorCode": 0,
  3566. "fromCache": true,
  3567. "hasPendingWrites": false
  3568. }
  3569. ],
  3570. "expectedState": {
  3571. "limboDocs": [
  3572. "collection/b",
  3573. "collection/c"
  3574. ],
  3575. "activeTargets": {
  3576. "1": {
  3577. "queries": [
  3578. {
  3579. "path": "collection/b",
  3580. "filters": [],
  3581. "orderBys": []
  3582. }
  3583. ],
  3584. "resumeToken": ""
  3585. },
  3586. "2": {
  3587. "queries": [
  3588. {
  3589. "path": "collection",
  3590. "filters": [],
  3591. "orderBys": []
  3592. }
  3593. ],
  3594. "resumeToken": ""
  3595. },
  3596. "3": {
  3597. "queries": [
  3598. {
  3599. "path": "collection/c",
  3600. "filters": [],
  3601. "orderBys": []
  3602. }
  3603. ],
  3604. "resumeToken": ""
  3605. }
  3606. }
  3607. },
  3608. "clientIndex": 0
  3609. },
  3610. {
  3611. "drainQueue": true,
  3612. "clientIndex": 1
  3613. },
  3614. {
  3615. "applyClientState": {
  3616. "primary": true
  3617. },
  3618. "expectedState": {
  3619. "isPrimary": true
  3620. },
  3621. "clientIndex": 1
  3622. },
  3623. {
  3624. "drainQueue": true,
  3625. "clientIndex": 0
  3626. },
  3627. {
  3628. "runTimer": "client_metadata_refresh",
  3629. "expectedState": {
  3630. "isPrimary": false,
  3631. "limboDocs": [],
  3632. "activeTargets": {
  3633. "2": {
  3634. "queries": [
  3635. {
  3636. "path": "collection",
  3637. "filters": [],
  3638. "orderBys": []
  3639. }
  3640. ],
  3641. "resumeToken": ""
  3642. }
  3643. }
  3644. },
  3645. "clientIndex": 0
  3646. },
  3647. {
  3648. "drainQueue": true,
  3649. "expectedState": {
  3650. "activeTargets": {
  3651. "2": {
  3652. "queries": [
  3653. {
  3654. "path": "collection",
  3655. "filters": [],
  3656. "orderBys": []
  3657. }
  3658. ],
  3659. "resumeToken": "resume-token-1000000"
  3660. }
  3661. }
  3662. },
  3663. "clientIndex": 1
  3664. },
  3665. {
  3666. "watchAck": [
  3667. 2
  3668. ],
  3669. "clientIndex": 1
  3670. },
  3671. {
  3672. "watchEntity": {
  3673. "docs": [],
  3674. "targets": [
  3675. 2
  3676. ]
  3677. },
  3678. "clientIndex": 1
  3679. },
  3680. {
  3681. "watchCurrent": [
  3682. [
  3683. 2
  3684. ],
  3685. "resume-token-3000000"
  3686. ],
  3687. "clientIndex": 1
  3688. },
  3689. {
  3690. "watchSnapshot": {
  3691. "version": 3000000,
  3692. "targetIds": []
  3693. },
  3694. "expectedState": {
  3695. "limboDocs": [
  3696. "collection/b",
  3697. "collection/c"
  3698. ],
  3699. "activeTargets": {
  3700. "1": {
  3701. "queries": [
  3702. {
  3703. "path": "collection/b",
  3704. "filters": [],
  3705. "orderBys": []
  3706. }
  3707. ],
  3708. "resumeToken": ""
  3709. },
  3710. "2": {
  3711. "queries": [
  3712. {
  3713. "path": "collection",
  3714. "filters": [],
  3715. "orderBys": []
  3716. }
  3717. ],
  3718. "resumeToken": "resume-token-1000000"
  3719. },
  3720. "3": {
  3721. "queries": [
  3722. {
  3723. "path": "collection/c",
  3724. "filters": [],
  3725. "orderBys": []
  3726. }
  3727. ],
  3728. "resumeToken": ""
  3729. }
  3730. }
  3731. },
  3732. "clientIndex": 1
  3733. },
  3734. {
  3735. "watchAck": [
  3736. 1
  3737. ],
  3738. "clientIndex": 1
  3739. },
  3740. {
  3741. "watchCurrent": [
  3742. [
  3743. 1
  3744. ],
  3745. "resume-token-3000000"
  3746. ],
  3747. "clientIndex": 1
  3748. },
  3749. {
  3750. "watchSnapshot": {
  3751. "version": 3000000,
  3752. "targetIds": []
  3753. },
  3754. "expectedState": {
  3755. "limboDocs": [
  3756. "collection/c"
  3757. ],
  3758. "activeTargets": {
  3759. "2": {
  3760. "queries": [
  3761. {
  3762. "path": "collection",
  3763. "filters": [],
  3764. "orderBys": []
  3765. }
  3766. ],
  3767. "resumeToken": "resume-token-1000000"
  3768. },
  3769. "3": {
  3770. "queries": [
  3771. {
  3772. "path": "collection/c",
  3773. "filters": [],
  3774. "orderBys": []
  3775. }
  3776. ],
  3777. "resumeToken": ""
  3778. }
  3779. }
  3780. },
  3781. "clientIndex": 1
  3782. },
  3783. {
  3784. "drainQueue": true,
  3785. "expectedSnapshotEvents": [
  3786. {
  3787. "query": {
  3788. "path": "collection",
  3789. "filters": [],
  3790. "orderBys": []
  3791. },
  3792. "removed": [
  3793. {
  3794. "key": "collection/b",
  3795. "version": 1001,
  3796. "value": {
  3797. "key": "b"
  3798. },
  3799. "options": {
  3800. "hasLocalMutations": false,
  3801. "hasCommittedMutations": false
  3802. }
  3803. }
  3804. ],
  3805. "errorCode": 0,
  3806. "fromCache": true,
  3807. "hasPendingWrites": false
  3808. }
  3809. ],
  3810. "clientIndex": 0
  3811. },
  3812. {
  3813. "applyClientState": {
  3814. "primary": true
  3815. },
  3816. "expectedState": {
  3817. "isPrimary": true,
  3818. "activeTargets": {
  3819. "2": {
  3820. "queries": [
  3821. {
  3822. "path": "collection",
  3823. "filters": [],
  3824. "orderBys": []
  3825. }
  3826. ],
  3827. "resumeToken": "resume-token-1000000"
  3828. }
  3829. }
  3830. },
  3831. "clientIndex": 0
  3832. },
  3833. {
  3834. "watchAck": [
  3835. 2
  3836. ],
  3837. "clientIndex": 0
  3838. },
  3839. {
  3840. "watchEntity": {
  3841. "docs": [],
  3842. "targets": [
  3843. 2
  3844. ]
  3845. },
  3846. "clientIndex": 0
  3847. },
  3848. {
  3849. "watchCurrent": [
  3850. [
  3851. 2
  3852. ],
  3853. "resume-token-5000000"
  3854. ],
  3855. "clientIndex": 0
  3856. },
  3857. {
  3858. "watchSnapshot": {
  3859. "version": 5000000,
  3860. "targetIds": []
  3861. },
  3862. "expectedState": {
  3863. "limboDocs": [
  3864. "collection/c"
  3865. ],
  3866. "activeTargets": {
  3867. "2": {
  3868. "queries": [
  3869. {
  3870. "path": "collection",
  3871. "filters": [],
  3872. "orderBys": []
  3873. }
  3874. ],
  3875. "resumeToken": "resume-token-1000000"
  3876. },
  3877. "5": {
  3878. "queries": [
  3879. {
  3880. "path": "collection/c",
  3881. "filters": [],
  3882. "orderBys": []
  3883. }
  3884. ],
  3885. "resumeToken": ""
  3886. }
  3887. }
  3888. },
  3889. "clientIndex": 0
  3890. },
  3891. {
  3892. "watchAck": [
  3893. 5
  3894. ],
  3895. "clientIndex": 0
  3896. },
  3897. {
  3898. "watchCurrent": [
  3899. [
  3900. 5
  3901. ],
  3902. "resume-token-6000000"
  3903. ],
  3904. "clientIndex": 0
  3905. },
  3906. {
  3907. "watchSnapshot": {
  3908. "version": 6000000,
  3909. "targetIds": []
  3910. },
  3911. "expectedState": {
  3912. "limboDocs": [],
  3913. "activeTargets": {
  3914. "2": {
  3915. "queries": [
  3916. {
  3917. "path": "collection",
  3918. "filters": [],
  3919. "orderBys": []
  3920. }
  3921. ],
  3922. "resumeToken": "resume-token-1000000"
  3923. }
  3924. }
  3925. },
  3926. "expectedSnapshotEvents": [
  3927. {
  3928. "query": {
  3929. "path": "collection",
  3930. "filters": [],
  3931. "orderBys": []
  3932. },
  3933. "removed": [
  3934. {
  3935. "key": "collection/c",
  3936. "version": 1002,
  3937. "value": {
  3938. "key": "c"
  3939. },
  3940. "options": {
  3941. "hasLocalMutations": false,
  3942. "hasCommittedMutations": false
  3943. }
  3944. }
  3945. ],
  3946. "errorCode": 0,
  3947. "fromCache": false,
  3948. "hasPendingWrites": false
  3949. }
  3950. ],
  3951. "clientIndex": 0
  3952. }
  3953. ]
  3954. },
  3955. "Limbo documents stay consistent between views": {
  3956. "describeName": "Limbo Documents:",
  3957. "itName": "Limbo documents stay consistent between views",
  3958. "tags": [],
  3959. "config": {
  3960. "useGarbageCollection": false,
  3961. "numClients": 1
  3962. },
  3963. "steps": [
  3964. {
  3965. "userSet": [
  3966. "collection/a",
  3967. {
  3968. "matches": true
  3969. }
  3970. ]
  3971. },
  3972. {
  3973. "userSet": [
  3974. "collection/b",
  3975. {
  3976. "matches": true
  3977. }
  3978. ]
  3979. },
  3980. {
  3981. "writeAck": {
  3982. "version": 1000
  3983. },
  3984. "expectedState": {
  3985. "userCallbacks": {
  3986. "acknowledgedDocs": [
  3987. "collection/a"
  3988. ],
  3989. "rejectedDocs": []
  3990. }
  3991. }
  3992. },
  3993. {
  3994. "writeAck": {
  3995. "version": 1001
  3996. },
  3997. "expectedState": {
  3998. "userCallbacks": {
  3999. "acknowledgedDocs": [
  4000. "collection/b"
  4001. ],
  4002. "rejectedDocs": []
  4003. }
  4004. }
  4005. },
  4006. {
  4007. "userListen": [
  4008. 2,
  4009. {
  4010. "path": "collection",
  4011. "filters": [],
  4012. "orderBys": []
  4013. }
  4014. ],
  4015. "expectedState": {
  4016. "activeTargets": {
  4017. "2": {
  4018. "queries": [
  4019. {
  4020. "path": "collection",
  4021. "filters": [],
  4022. "orderBys": []
  4023. }
  4024. ],
  4025. "resumeToken": ""
  4026. }
  4027. }
  4028. },
  4029. "expectedSnapshotEvents": [
  4030. {
  4031. "query": {
  4032. "path": "collection",
  4033. "filters": [],
  4034. "orderBys": []
  4035. },
  4036. "added": [
  4037. {
  4038. "key": "collection/a",
  4039. "version": 1000,
  4040. "value": {
  4041. "matches": true
  4042. },
  4043. "options": {
  4044. "hasLocalMutations": false,
  4045. "hasCommittedMutations": true
  4046. }
  4047. },
  4048. {
  4049. "key": "collection/b",
  4050. "version": 1001,
  4051. "value": {
  4052. "matches": true
  4053. },
  4054. "options": {
  4055. "hasLocalMutations": false,
  4056. "hasCommittedMutations": true
  4057. }
  4058. }
  4059. ],
  4060. "errorCode": 0,
  4061. "fromCache": true,
  4062. "hasPendingWrites": false
  4063. }
  4064. ]
  4065. },
  4066. {
  4067. "watchAck": [
  4068. 2
  4069. ]
  4070. },
  4071. {
  4072. "watchEntity": {
  4073. "docs": [
  4074. {
  4075. "key": "collection/a",
  4076. "version": 1000,
  4077. "value": {
  4078. "matches": true
  4079. },
  4080. "options": {
  4081. "hasLocalMutations": false,
  4082. "hasCommittedMutations": false
  4083. }
  4084. }
  4085. ],
  4086. "targets": [
  4087. 2
  4088. ]
  4089. }
  4090. },
  4091. {
  4092. "watchCurrent": [
  4093. [
  4094. 2
  4095. ],
  4096. "resume-token-2000"
  4097. ]
  4098. },
  4099. {
  4100. "watchSnapshot": {
  4101. "version": 2000,
  4102. "targetIds": []
  4103. },
  4104. "expectedState": {
  4105. "limboDocs": [
  4106. "collection/b"
  4107. ],
  4108. "activeTargets": {
  4109. "1": {
  4110. "queries": [
  4111. {
  4112. "path": "collection/b",
  4113. "filters": [],
  4114. "orderBys": []
  4115. }
  4116. ],
  4117. "resumeToken": ""
  4118. },
  4119. "2": {
  4120. "queries": [
  4121. {
  4122. "path": "collection",
  4123. "filters": [],
  4124. "orderBys": []
  4125. }
  4126. ],
  4127. "resumeToken": ""
  4128. }
  4129. }
  4130. }
  4131. },
  4132. {
  4133. "userListen": [
  4134. 4,
  4135. {
  4136. "path": "collection",
  4137. "filters": [
  4138. [
  4139. "matches",
  4140. "==",
  4141. true
  4142. ]
  4143. ],
  4144. "orderBys": []
  4145. }
  4146. ],
  4147. "expectedState": {
  4148. "activeTargets": {
  4149. "1": {
  4150. "queries": [
  4151. {
  4152. "path": "collection/b",
  4153. "filters": [],
  4154. "orderBys": []
  4155. }
  4156. ],
  4157. "resumeToken": ""
  4158. },
  4159. "2": {
  4160. "queries": [
  4161. {
  4162. "path": "collection",
  4163. "filters": [],
  4164. "orderBys": []
  4165. }
  4166. ],
  4167. "resumeToken": ""
  4168. },
  4169. "4": {
  4170. "queries": [
  4171. {
  4172. "path": "collection",
  4173. "filters": [
  4174. [
  4175. "matches",
  4176. "==",
  4177. true
  4178. ]
  4179. ],
  4180. "orderBys": []
  4181. }
  4182. ],
  4183. "resumeToken": ""
  4184. }
  4185. }
  4186. },
  4187. "expectedSnapshotEvents": [
  4188. {
  4189. "query": {
  4190. "path": "collection",
  4191. "filters": [
  4192. [
  4193. "matches",
  4194. "==",
  4195. true
  4196. ]
  4197. ],
  4198. "orderBys": []
  4199. },
  4200. "added": [
  4201. {
  4202. "key": "collection/a",
  4203. "version": 1000,
  4204. "value": {
  4205. "matches": true
  4206. },
  4207. "options": {
  4208. "hasLocalMutations": false,
  4209. "hasCommittedMutations": false
  4210. }
  4211. },
  4212. {
  4213. "key": "collection/b",
  4214. "version": 1001,
  4215. "value": {
  4216. "matches": true
  4217. },
  4218. "options": {
  4219. "hasLocalMutations": false,
  4220. "hasCommittedMutations": true
  4221. }
  4222. }
  4223. ],
  4224. "errorCode": 0,
  4225. "fromCache": true,
  4226. "hasPendingWrites": false
  4227. }
  4228. ]
  4229. },
  4230. {
  4231. "userUnlisten": [
  4232. 2,
  4233. {
  4234. "path": "collection",
  4235. "filters": [],
  4236. "orderBys": []
  4237. }
  4238. ],
  4239. "expectedState": {
  4240. "activeTargets": {
  4241. "4": {
  4242. "queries": [
  4243. {
  4244. "path": "collection",
  4245. "filters": [
  4246. [
  4247. "matches",
  4248. "==",
  4249. true
  4250. ]
  4251. ],
  4252. "orderBys": []
  4253. }
  4254. ],
  4255. "resumeToken": ""
  4256. }
  4257. },
  4258. "limboDocs": []
  4259. }
  4260. },
  4261. {
  4262. "userListen": [
  4263. 2,
  4264. {
  4265. "path": "collection",
  4266. "filters": [],
  4267. "orderBys": []
  4268. }
  4269. ],
  4270. "expectedState": {
  4271. "activeTargets": {
  4272. "2": {
  4273. "queries": [
  4274. {
  4275. "path": "collection",
  4276. "filters": [],
  4277. "orderBys": []
  4278. }
  4279. ],
  4280. "resumeToken": "resume-token-2000"
  4281. },
  4282. "4": {
  4283. "queries": [
  4284. {
  4285. "path": "collection",
  4286. "filters": [
  4287. [
  4288. "matches",
  4289. "==",
  4290. true
  4291. ]
  4292. ],
  4293. "orderBys": []
  4294. }
  4295. ],
  4296. "resumeToken": ""
  4297. }
  4298. }
  4299. },
  4300. "expectedSnapshotEvents": [
  4301. {
  4302. "query": {
  4303. "path": "collection",
  4304. "filters": [],
  4305. "orderBys": []
  4306. },
  4307. "added": [
  4308. {
  4309. "key": "collection/a",
  4310. "version": 1000,
  4311. "value": {
  4312. "matches": true
  4313. },
  4314. "options": {
  4315. "hasLocalMutations": false,
  4316. "hasCommittedMutations": false
  4317. }
  4318. },
  4319. {
  4320. "key": "collection/b",
  4321. "version": 1001,
  4322. "value": {
  4323. "matches": true
  4324. },
  4325. "options": {
  4326. "hasLocalMutations": false,
  4327. "hasCommittedMutations": true
  4328. }
  4329. }
  4330. ],
  4331. "errorCode": 0,
  4332. "fromCache": true,
  4333. "hasPendingWrites": false
  4334. }
  4335. ]
  4336. }
  4337. ]
  4338. },
  4339. "LimitToLast query from secondary results in no expected limbo doc": {
  4340. "describeName": "Limbo Documents:",
  4341. "itName": "LimitToLast query from secondary results in no expected limbo doc",
  4342. "tags": [
  4343. "multi-client"
  4344. ],
  4345. "config": {
  4346. "useGarbageCollection": false,
  4347. "numClients": 2
  4348. },
  4349. "steps": [
  4350. {
  4351. "drainQueue": true,
  4352. "clientIndex": 0
  4353. },
  4354. {
  4355. "applyClientState": {
  4356. "visibility": "visible"
  4357. },
  4358. "clientIndex": 0
  4359. },
  4360. {
  4361. "drainQueue": true,
  4362. "clientIndex": 1
  4363. },
  4364. {
  4365. "userListen": [
  4366. 2,
  4367. {
  4368. "path": "collection",
  4369. "limit": 3,
  4370. "limitType": "LimitToLast",
  4371. "filters": [],
  4372. "orderBys": [
  4373. [
  4374. "val",
  4375. "desc"
  4376. ]
  4377. ]
  4378. }
  4379. ],
  4380. "expectedState": {
  4381. "activeTargets": {
  4382. "2": {
  4383. "queries": [
  4384. {
  4385. "path": "collection",
  4386. "limit": 3,
  4387. "limitType": "LimitToLast",
  4388. "filters": [],
  4389. "orderBys": [
  4390. [
  4391. "val",
  4392. "desc"
  4393. ]
  4394. ]
  4395. }
  4396. ],
  4397. "resumeToken": ""
  4398. }
  4399. }
  4400. },
  4401. "clientIndex": 1
  4402. },
  4403. {
  4404. "drainQueue": true,
  4405. "expectedState": {
  4406. "activeTargets": {
  4407. "2": {
  4408. "queries": [
  4409. {
  4410. "path": "collection",
  4411. "limit": 3,
  4412. "limitType": "LimitToLast",
  4413. "filters": [],
  4414. "orderBys": [
  4415. [
  4416. "val",
  4417. "desc"
  4418. ]
  4419. ]
  4420. }
  4421. ],
  4422. "resumeToken": ""
  4423. }
  4424. }
  4425. },
  4426. "clientIndex": 0
  4427. },
  4428. {
  4429. "watchAck": [
  4430. 2
  4431. ],
  4432. "clientIndex": 0
  4433. },
  4434. {
  4435. "watchEntity": {
  4436. "docs": [
  4437. {
  4438. "key": "collection/a",
  4439. "version": 1000,
  4440. "value": {
  4441. "val": 11
  4442. },
  4443. "options": {
  4444. "hasLocalMutations": false,
  4445. "hasCommittedMutations": false
  4446. }
  4447. },
  4448. {
  4449. "key": "collection/b",
  4450. "version": 1000,
  4451. "value": {
  4452. "val": 12
  4453. },
  4454. "options": {
  4455. "hasLocalMutations": false,
  4456. "hasCommittedMutations": false
  4457. }
  4458. },
  4459. {
  4460. "key": "collection/c",
  4461. "version": 1000,
  4462. "value": {
  4463. "val": 13
  4464. },
  4465. "options": {
  4466. "hasLocalMutations": false,
  4467. "hasCommittedMutations": false
  4468. }
  4469. }
  4470. ],
  4471. "targets": [
  4472. 2
  4473. ]
  4474. },
  4475. "clientIndex": 0
  4476. },
  4477. {
  4478. "watchCurrent": [
  4479. [
  4480. 2
  4481. ],
  4482. "resume-token-1000"
  4483. ],
  4484. "clientIndex": 0
  4485. },
  4486. {
  4487. "watchSnapshot": {
  4488. "version": 1000,
  4489. "targetIds": []
  4490. },
  4491. "clientIndex": 0
  4492. },
  4493. {
  4494. "drainQueue": true,
  4495. "expectedSnapshotEvents": [
  4496. {
  4497. "query": {
  4498. "path": "collection",
  4499. "limit": 3,
  4500. "limitType": "LimitToLast",
  4501. "filters": [],
  4502. "orderBys": [
  4503. [
  4504. "val",
  4505. "desc"
  4506. ]
  4507. ]
  4508. },
  4509. "added": [
  4510. {
  4511. "key": "collection/c",
  4512. "version": 1000,
  4513. "value": {
  4514. "val": 13
  4515. },
  4516. "options": {
  4517. "hasLocalMutations": false,
  4518. "hasCommittedMutations": false
  4519. }
  4520. },
  4521. {
  4522. "key": "collection/b",
  4523. "version": 1000,
  4524. "value": {
  4525. "val": 12
  4526. },
  4527. "options": {
  4528. "hasLocalMutations": false,
  4529. "hasCommittedMutations": false
  4530. }
  4531. },
  4532. {
  4533. "key": "collection/a",
  4534. "version": 1000,
  4535. "value": {
  4536. "val": 11
  4537. },
  4538. "options": {
  4539. "hasLocalMutations": false,
  4540. "hasCommittedMutations": false
  4541. }
  4542. }
  4543. ],
  4544. "errorCode": 0,
  4545. "fromCache": false,
  4546. "hasPendingWrites": false
  4547. }
  4548. ],
  4549. "clientIndex": 1
  4550. },
  4551. {
  4552. "drainQueue": true,
  4553. "clientIndex": 0
  4554. },
  4555. {
  4556. "watchReset": [],
  4557. "clientIndex": 0
  4558. },
  4559. {
  4560. "watchEntity": {
  4561. "docs": [
  4562. {
  4563. "key": "collection/a",
  4564. "version": 2000,
  4565. "value": {
  4566. "val": 5
  4567. },
  4568. "options": {
  4569. "hasLocalMutations": false,
  4570. "hasCommittedMutations": false
  4571. }
  4572. },
  4573. {
  4574. "key": "collection/b",
  4575. "version": 2000,
  4576. "value": {
  4577. "val": 6
  4578. },
  4579. "options": {
  4580. "hasLocalMutations": false,
  4581. "hasCommittedMutations": false
  4582. }
  4583. },
  4584. {
  4585. "key": "collection/d",
  4586. "version": 2000,
  4587. "value": {
  4588. "val": 7
  4589. },
  4590. "options": {
  4591. "hasLocalMutations": false,
  4592. "hasCommittedMutations": false
  4593. }
  4594. }
  4595. ],
  4596. "targets": [
  4597. 2
  4598. ]
  4599. },
  4600. "clientIndex": 0
  4601. },
  4602. {
  4603. "watchCurrent": [
  4604. [
  4605. 2
  4606. ],
  4607. "resume-token-2000"
  4608. ],
  4609. "clientIndex": 0
  4610. },
  4611. {
  4612. "watchSnapshot": {
  4613. "version": 2000,
  4614. "targetIds": []
  4615. },
  4616. "clientIndex": 0
  4617. },
  4618. {
  4619. "drainQueue": true,
  4620. "expectedSnapshotEvents": [
  4621. {
  4622. "query": {
  4623. "path": "collection",
  4624. "limit": 3,
  4625. "limitType": "LimitToLast",
  4626. "filters": [],
  4627. "orderBys": [
  4628. [
  4629. "val",
  4630. "desc"
  4631. ]
  4632. ]
  4633. },
  4634. "added": [
  4635. {
  4636. "key": "collection/d",
  4637. "version": 2000,
  4638. "value": {
  4639. "val": 7
  4640. },
  4641. "options": {
  4642. "hasLocalMutations": false,
  4643. "hasCommittedMutations": false
  4644. }
  4645. }
  4646. ],
  4647. "modified": [
  4648. {
  4649. "key": "collection/b",
  4650. "version": 2000,
  4651. "value": {
  4652. "val": 6
  4653. },
  4654. "options": {
  4655. "hasLocalMutations": false,
  4656. "hasCommittedMutations": false
  4657. }
  4658. },
  4659. {
  4660. "key": "collection/a",
  4661. "version": 2000,
  4662. "value": {
  4663. "val": 5
  4664. },
  4665. "options": {
  4666. "hasLocalMutations": false,
  4667. "hasCommittedMutations": false
  4668. }
  4669. }
  4670. ],
  4671. "removed": [
  4672. {
  4673. "key": "collection/c",
  4674. "version": 1000,
  4675. "value": {
  4676. "val": 13
  4677. },
  4678. "options": {
  4679. "hasLocalMutations": false,
  4680. "hasCommittedMutations": false
  4681. }
  4682. }
  4683. ],
  4684. "errorCode": 0,
  4685. "fromCache": false,
  4686. "hasPendingWrites": false
  4687. }
  4688. ],
  4689. "clientIndex": 1
  4690. },
  4691. {
  4692. "drainQueue": true,
  4693. "expectedState": {
  4694. "limboDocs": [],
  4695. "activeTargets": {
  4696. "2": {
  4697. "queries": [
  4698. {
  4699. "path": "collection",
  4700. "limit": 3,
  4701. "limitType": "LimitToLast",
  4702. "filters": [],
  4703. "orderBys": [
  4704. [
  4705. "val",
  4706. "desc"
  4707. ]
  4708. ]
  4709. }
  4710. ],
  4711. "resumeToken": ""
  4712. }
  4713. }
  4714. },
  4715. "clientIndex": 0
  4716. }
  4717. ]
  4718. },
  4719. "LimitToLast query from secondary results in expected limbo doc": {
  4720. "describeName": "Limbo Documents:",
  4721. "itName": "LimitToLast query from secondary results in expected limbo doc",
  4722. "tags": [
  4723. "multi-client"
  4724. ],
  4725. "config": {
  4726. "useGarbageCollection": false,
  4727. "numClients": 2
  4728. },
  4729. "steps": [
  4730. {
  4731. "drainQueue": true,
  4732. "clientIndex": 0
  4733. },
  4734. {
  4735. "applyClientState": {
  4736. "visibility": "visible"
  4737. },
  4738. "clientIndex": 0
  4739. },
  4740. {
  4741. "drainQueue": true,
  4742. "clientIndex": 1
  4743. },
  4744. {
  4745. "userListen": [
  4746. 2,
  4747. {
  4748. "path": "collection",
  4749. "limit": 3,
  4750. "limitType": "LimitToLast",
  4751. "filters": [],
  4752. "orderBys": [
  4753. [
  4754. "val",
  4755. "desc"
  4756. ]
  4757. ]
  4758. }
  4759. ],
  4760. "expectedState": {
  4761. "activeTargets": {
  4762. "2": {
  4763. "queries": [
  4764. {
  4765. "path": "collection",
  4766. "limit": 3,
  4767. "limitType": "LimitToLast",
  4768. "filters": [],
  4769. "orderBys": [
  4770. [
  4771. "val",
  4772. "desc"
  4773. ]
  4774. ]
  4775. }
  4776. ],
  4777. "resumeToken": ""
  4778. }
  4779. }
  4780. },
  4781. "clientIndex": 1
  4782. },
  4783. {
  4784. "drainQueue": true,
  4785. "expectedState": {
  4786. "activeTargets": {
  4787. "2": {
  4788. "queries": [
  4789. {
  4790. "path": "collection",
  4791. "limit": 3,
  4792. "limitType": "LimitToLast",
  4793. "filters": [],
  4794. "orderBys": [
  4795. [
  4796. "val",
  4797. "desc"
  4798. ]
  4799. ]
  4800. }
  4801. ],
  4802. "resumeToken": ""
  4803. }
  4804. }
  4805. },
  4806. "clientIndex": 0
  4807. },
  4808. {
  4809. "watchAck": [
  4810. 2
  4811. ],
  4812. "clientIndex": 0
  4813. },
  4814. {
  4815. "watchEntity": {
  4816. "docs": [
  4817. {
  4818. "key": "collection/a",
  4819. "version": 1000,
  4820. "value": {
  4821. "val": 11
  4822. },
  4823. "options": {
  4824. "hasLocalMutations": false,
  4825. "hasCommittedMutations": false
  4826. }
  4827. },
  4828. {
  4829. "key": "collection/b",
  4830. "version": 1000,
  4831. "value": {
  4832. "val": 12
  4833. },
  4834. "options": {
  4835. "hasLocalMutations": false,
  4836. "hasCommittedMutations": false
  4837. }
  4838. },
  4839. {
  4840. "key": "collection/c",
  4841. "version": 1000,
  4842. "value": {
  4843. "val": 13
  4844. },
  4845. "options": {
  4846. "hasLocalMutations": false,
  4847. "hasCommittedMutations": false
  4848. }
  4849. }
  4850. ],
  4851. "targets": [
  4852. 2
  4853. ]
  4854. },
  4855. "clientIndex": 0
  4856. },
  4857. {
  4858. "watchCurrent": [
  4859. [
  4860. 2
  4861. ],
  4862. "resume-token-1000"
  4863. ],
  4864. "clientIndex": 0
  4865. },
  4866. {
  4867. "watchSnapshot": {
  4868. "version": 1000,
  4869. "targetIds": []
  4870. },
  4871. "clientIndex": 0
  4872. },
  4873. {
  4874. "drainQueue": true,
  4875. "expectedSnapshotEvents": [
  4876. {
  4877. "query": {
  4878. "path": "collection",
  4879. "limit": 3,
  4880. "limitType": "LimitToLast",
  4881. "filters": [],
  4882. "orderBys": [
  4883. [
  4884. "val",
  4885. "desc"
  4886. ]
  4887. ]
  4888. },
  4889. "added": [
  4890. {
  4891. "key": "collection/c",
  4892. "version": 1000,
  4893. "value": {
  4894. "val": 13
  4895. },
  4896. "options": {
  4897. "hasLocalMutations": false,
  4898. "hasCommittedMutations": false
  4899. }
  4900. },
  4901. {
  4902. "key": "collection/b",
  4903. "version": 1000,
  4904. "value": {
  4905. "val": 12
  4906. },
  4907. "options": {
  4908. "hasLocalMutations": false,
  4909. "hasCommittedMutations": false
  4910. }
  4911. },
  4912. {
  4913. "key": "collection/a",
  4914. "version": 1000,
  4915. "value": {
  4916. "val": 11
  4917. },
  4918. "options": {
  4919. "hasLocalMutations": false,
  4920. "hasCommittedMutations": false
  4921. }
  4922. }
  4923. ],
  4924. "errorCode": 0,
  4925. "fromCache": false,
  4926. "hasPendingWrites": false
  4927. }
  4928. ],
  4929. "clientIndex": 1
  4930. },
  4931. {
  4932. "drainQueue": true,
  4933. "clientIndex": 0
  4934. },
  4935. {
  4936. "watchReset": [],
  4937. "clientIndex": 0
  4938. },
  4939. {
  4940. "watchEntity": {
  4941. "docs": [
  4942. {
  4943. "key": "collection/a",
  4944. "version": 2000,
  4945. "value": {
  4946. "val": 11
  4947. },
  4948. "options": {
  4949. "hasLocalMutations": false,
  4950. "hasCommittedMutations": false
  4951. }
  4952. },
  4953. {
  4954. "key": "collection/b",
  4955. "version": 2000,
  4956. "value": {
  4957. "val": 12
  4958. },
  4959. "options": {
  4960. "hasLocalMutations": false,
  4961. "hasCommittedMutations": false
  4962. }
  4963. },
  4964. {
  4965. "key": "collection/d",
  4966. "version": 2000,
  4967. "value": {
  4968. "val": 100
  4969. },
  4970. "options": {
  4971. "hasLocalMutations": false,
  4972. "hasCommittedMutations": false
  4973. }
  4974. }
  4975. ],
  4976. "targets": [
  4977. 2
  4978. ]
  4979. },
  4980. "clientIndex": 0
  4981. },
  4982. {
  4983. "watchCurrent": [
  4984. [
  4985. 2
  4986. ],
  4987. "resume-token-2000"
  4988. ],
  4989. "clientIndex": 0
  4990. },
  4991. {
  4992. "watchSnapshot": {
  4993. "version": 2000,
  4994. "targetIds": []
  4995. },
  4996. "expectedState": {
  4997. "limboDocs": [
  4998. "collection/c"
  4999. ],
  5000. "activeTargets": {
  5001. "1": {
  5002. "queries": [
  5003. {
  5004. "path": "collection/c",
  5005. "filters": [],
  5006. "orderBys": []
  5007. }
  5008. ],
  5009. "resumeToken": ""
  5010. },
  5011. "2": {
  5012. "queries": [
  5013. {
  5014. "path": "collection",
  5015. "limit": 3,
  5016. "limitType": "LimitToLast",
  5017. "filters": [],
  5018. "orderBys": [
  5019. [
  5020. "val",
  5021. "desc"
  5022. ]
  5023. ]
  5024. }
  5025. ],
  5026. "resumeToken": ""
  5027. }
  5028. }
  5029. },
  5030. "clientIndex": 0
  5031. },
  5032. {
  5033. "drainQueue": true,
  5034. "expectedSnapshotEvents": [
  5035. {
  5036. "query": {
  5037. "path": "collection",
  5038. "limit": 3,
  5039. "limitType": "LimitToLast",
  5040. "filters": [],
  5041. "orderBys": [
  5042. [
  5043. "val",
  5044. "desc"
  5045. ]
  5046. ]
  5047. },
  5048. "errorCode": 0,
  5049. "fromCache": true,
  5050. "hasPendingWrites": false
  5051. }
  5052. ],
  5053. "clientIndex": 1
  5054. }
  5055. ]
  5056. }
  5057. }