limit_spec_test.json 143 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267
  1. {
  2. "Deleted Document in limbo in full limit query": {
  3. "describeName": "Limits:",
  4. "itName": "Deleted Document in limbo in full limit query",
  5. "tags": [
  6. ],
  7. "config": {
  8. "numClients": 1,
  9. "useEagerGCForMemory": true
  10. },
  11. "steps": [
  12. {
  13. "userListen": {
  14. "query": {
  15. "filters": [
  16. ],
  17. "limit": 2,
  18. "limitType": "LimitToFirst",
  19. "orderBys": [
  20. ],
  21. "path": "collection"
  22. },
  23. "targetId": 2
  24. },
  25. "expectedState": {
  26. "activeTargets": {
  27. "2": {
  28. "queries": [
  29. {
  30. "filters": [
  31. ],
  32. "limit": 2,
  33. "limitType": "LimitToFirst",
  34. "orderBys": [
  35. ],
  36. "path": "collection"
  37. }
  38. ],
  39. "resumeToken": ""
  40. }
  41. }
  42. }
  43. },
  44. {
  45. "watchAck": [
  46. 2
  47. ]
  48. },
  49. {
  50. "watchEntity": {
  51. "docs": [
  52. {
  53. "createTime": 0,
  54. "key": "collection/a",
  55. "options": {
  56. "hasCommittedMutations": false,
  57. "hasLocalMutations": false
  58. },
  59. "value": {
  60. "key": "a"
  61. },
  62. "version": 1000
  63. },
  64. {
  65. "createTime": 0,
  66. "key": "collection/b",
  67. "options": {
  68. "hasCommittedMutations": false,
  69. "hasLocalMutations": false
  70. },
  71. "value": {
  72. "key": "b"
  73. },
  74. "version": 1001
  75. }
  76. ],
  77. "targets": [
  78. 2
  79. ]
  80. }
  81. },
  82. {
  83. "watchCurrent": [
  84. [
  85. 2
  86. ],
  87. "resume-token-1002"
  88. ]
  89. },
  90. {
  91. "watchSnapshot": {
  92. "targetIds": [
  93. ],
  94. "version": 1002
  95. },
  96. "expectedSnapshotEvents": [
  97. {
  98. "added": [
  99. {
  100. "createTime": 0,
  101. "key": "collection/a",
  102. "options": {
  103. "hasCommittedMutations": false,
  104. "hasLocalMutations": false
  105. },
  106. "value": {
  107. "key": "a"
  108. },
  109. "version": 1000
  110. },
  111. {
  112. "createTime": 0,
  113. "key": "collection/b",
  114. "options": {
  115. "hasCommittedMutations": false,
  116. "hasLocalMutations": false
  117. },
  118. "value": {
  119. "key": "b"
  120. },
  121. "version": 1001
  122. }
  123. ],
  124. "errorCode": 0,
  125. "fromCache": false,
  126. "hasPendingWrites": false,
  127. "query": {
  128. "filters": [
  129. ],
  130. "limit": 2,
  131. "limitType": "LimitToFirst",
  132. "orderBys": [
  133. ],
  134. "path": "collection"
  135. }
  136. }
  137. ]
  138. },
  139. {
  140. "watchReset": [
  141. 2
  142. ]
  143. },
  144. {
  145. "watchEntity": {
  146. "docs": [
  147. {
  148. "createTime": 0,
  149. "key": "collection/b",
  150. "options": {
  151. "hasCommittedMutations": false,
  152. "hasLocalMutations": false
  153. },
  154. "value": {
  155. "key": "b"
  156. },
  157. "version": 1001
  158. },
  159. {
  160. "createTime": 0,
  161. "key": "collection/c",
  162. "options": {
  163. "hasCommittedMutations": false,
  164. "hasLocalMutations": false
  165. },
  166. "value": {
  167. "key": "c"
  168. },
  169. "version": 1002
  170. }
  171. ],
  172. "targets": [
  173. 2
  174. ]
  175. }
  176. },
  177. {
  178. "watchCurrent": [
  179. [
  180. 2
  181. ],
  182. "resume-token-2000"
  183. ]
  184. },
  185. {
  186. "watchSnapshot": {
  187. "targetIds": [
  188. ],
  189. "version": 2000
  190. },
  191. "expectedSnapshotEvents": [
  192. {
  193. "errorCode": 0,
  194. "fromCache": true,
  195. "hasPendingWrites": false,
  196. "query": {
  197. "filters": [
  198. ],
  199. "limit": 2,
  200. "limitType": "LimitToFirst",
  201. "orderBys": [
  202. ],
  203. "path": "collection"
  204. }
  205. }
  206. ],
  207. "expectedState": {
  208. "activeLimboDocs": [
  209. "collection/a"
  210. ],
  211. "activeTargets": {
  212. "1": {
  213. "queries": [
  214. {
  215. "filters": [
  216. ],
  217. "orderBys": [
  218. ],
  219. "path": "collection/a"
  220. }
  221. ],
  222. "resumeToken": "",
  223. "targetPurpose": "TargetPurposeLimboResolution"
  224. },
  225. "2": {
  226. "queries": [
  227. {
  228. "filters": [
  229. ],
  230. "limit": 2,
  231. "limitType": "LimitToFirst",
  232. "orderBys": [
  233. ],
  234. "path": "collection"
  235. }
  236. ],
  237. "resumeToken": ""
  238. }
  239. }
  240. }
  241. },
  242. {
  243. "watchAck": [
  244. 1
  245. ]
  246. },
  247. {
  248. "watchCurrent": [
  249. [
  250. 1
  251. ],
  252. "resume-token-2000"
  253. ]
  254. },
  255. {
  256. "watchSnapshot": {
  257. "targetIds": [
  258. ],
  259. "version": 2000
  260. },
  261. "expectedSnapshotEvents": [
  262. {
  263. "added": [
  264. {
  265. "createTime": 0,
  266. "key": "collection/c",
  267. "options": {
  268. "hasCommittedMutations": false,
  269. "hasLocalMutations": false
  270. },
  271. "value": {
  272. "key": "c"
  273. },
  274. "version": 1002
  275. }
  276. ],
  277. "errorCode": 0,
  278. "fromCache": false,
  279. "hasPendingWrites": false,
  280. "query": {
  281. "filters": [
  282. ],
  283. "limit": 2,
  284. "limitType": "LimitToFirst",
  285. "orderBys": [
  286. ],
  287. "path": "collection"
  288. },
  289. "removed": [
  290. {
  291. "createTime": 0,
  292. "key": "collection/a",
  293. "options": {
  294. "hasCommittedMutations": false,
  295. "hasLocalMutations": false
  296. },
  297. "value": {
  298. "key": "a"
  299. },
  300. "version": 1000
  301. }
  302. ]
  303. }
  304. ],
  305. "expectedState": {
  306. "activeLimboDocs": [
  307. ],
  308. "activeTargets": {
  309. "2": {
  310. "queries": [
  311. {
  312. "filters": [
  313. ],
  314. "limit": 2,
  315. "limitType": "LimitToFirst",
  316. "orderBys": [
  317. ],
  318. "path": "collection"
  319. }
  320. ],
  321. "resumeToken": ""
  322. }
  323. }
  324. }
  325. }
  326. ]
  327. },
  328. "Documents in limit are can handle removed messages for only one of many query": {
  329. "describeName": "Limits:",
  330. "itName": "Documents in limit are can handle removed messages for only one of many query",
  331. "tags": [
  332. ],
  333. "config": {
  334. "numClients": 1,
  335. "useEagerGCForMemory": true
  336. },
  337. "steps": [
  338. {
  339. "userListen": {
  340. "query": {
  341. "filters": [
  342. ],
  343. "limit": 2,
  344. "limitType": "LimitToFirst",
  345. "orderBys": [
  346. ],
  347. "path": "collection"
  348. },
  349. "targetId": 2
  350. },
  351. "expectedState": {
  352. "activeTargets": {
  353. "2": {
  354. "queries": [
  355. {
  356. "filters": [
  357. ],
  358. "limit": 2,
  359. "limitType": "LimitToFirst",
  360. "orderBys": [
  361. ],
  362. "path": "collection"
  363. }
  364. ],
  365. "resumeToken": ""
  366. }
  367. }
  368. }
  369. },
  370. {
  371. "userListen": {
  372. "query": {
  373. "filters": [
  374. ],
  375. "limit": 3,
  376. "limitType": "LimitToFirst",
  377. "orderBys": [
  378. ],
  379. "path": "collection"
  380. },
  381. "targetId": 4
  382. },
  383. "expectedState": {
  384. "activeTargets": {
  385. "2": {
  386. "queries": [
  387. {
  388. "filters": [
  389. ],
  390. "limit": 2,
  391. "limitType": "LimitToFirst",
  392. "orderBys": [
  393. ],
  394. "path": "collection"
  395. }
  396. ],
  397. "resumeToken": ""
  398. },
  399. "4": {
  400. "queries": [
  401. {
  402. "filters": [
  403. ],
  404. "limit": 3,
  405. "limitType": "LimitToFirst",
  406. "orderBys": [
  407. ],
  408. "path": "collection"
  409. }
  410. ],
  411. "resumeToken": ""
  412. }
  413. }
  414. }
  415. },
  416. {
  417. "watchAck": [
  418. 2
  419. ]
  420. },
  421. {
  422. "watchAck": [
  423. 4
  424. ]
  425. },
  426. {
  427. "watchEntity": {
  428. "docs": [
  429. {
  430. "createTime": 0,
  431. "key": "collection/a",
  432. "options": {
  433. "hasCommittedMutations": false,
  434. "hasLocalMutations": false
  435. },
  436. "value": {
  437. "key": "a"
  438. },
  439. "version": 1000
  440. },
  441. {
  442. "createTime": 0,
  443. "key": "collection/c",
  444. "options": {
  445. "hasCommittedMutations": false,
  446. "hasLocalMutations": false
  447. },
  448. "value": {
  449. "key": "c"
  450. },
  451. "version": 1001
  452. }
  453. ],
  454. "targets": [
  455. 2
  456. ]
  457. }
  458. },
  459. {
  460. "watchEntity": {
  461. "docs": [
  462. {
  463. "createTime": 0,
  464. "key": "collection/a",
  465. "options": {
  466. "hasCommittedMutations": false,
  467. "hasLocalMutations": false
  468. },
  469. "value": {
  470. "key": "a"
  471. },
  472. "version": 1000
  473. },
  474. {
  475. "createTime": 0,
  476. "key": "collection/c",
  477. "options": {
  478. "hasCommittedMutations": false,
  479. "hasLocalMutations": false
  480. },
  481. "value": {
  482. "key": "c"
  483. },
  484. "version": 1001
  485. }
  486. ],
  487. "targets": [
  488. 4
  489. ]
  490. }
  491. },
  492. {
  493. "watchCurrent": [
  494. [
  495. 2
  496. ],
  497. "resume-token-1001"
  498. ]
  499. },
  500. {
  501. "watchCurrent": [
  502. [
  503. 4
  504. ],
  505. "resume-token-1001"
  506. ]
  507. },
  508. {
  509. "watchSnapshot": {
  510. "targetIds": [
  511. ],
  512. "version": 1001
  513. },
  514. "expectedSnapshotEvents": [
  515. {
  516. "added": [
  517. {
  518. "createTime": 0,
  519. "key": "collection/a",
  520. "options": {
  521. "hasCommittedMutations": false,
  522. "hasLocalMutations": false
  523. },
  524. "value": {
  525. "key": "a"
  526. },
  527. "version": 1000
  528. },
  529. {
  530. "createTime": 0,
  531. "key": "collection/c",
  532. "options": {
  533. "hasCommittedMutations": false,
  534. "hasLocalMutations": false
  535. },
  536. "value": {
  537. "key": "c"
  538. },
  539. "version": 1001
  540. }
  541. ],
  542. "errorCode": 0,
  543. "fromCache": false,
  544. "hasPendingWrites": false,
  545. "query": {
  546. "filters": [
  547. ],
  548. "limit": 2,
  549. "limitType": "LimitToFirst",
  550. "orderBys": [
  551. ],
  552. "path": "collection"
  553. }
  554. },
  555. {
  556. "added": [
  557. {
  558. "createTime": 0,
  559. "key": "collection/a",
  560. "options": {
  561. "hasCommittedMutations": false,
  562. "hasLocalMutations": false
  563. },
  564. "value": {
  565. "key": "a"
  566. },
  567. "version": 1000
  568. },
  569. {
  570. "createTime": 0,
  571. "key": "collection/c",
  572. "options": {
  573. "hasCommittedMutations": false,
  574. "hasLocalMutations": false
  575. },
  576. "value": {
  577. "key": "c"
  578. },
  579. "version": 1001
  580. }
  581. ],
  582. "errorCode": 0,
  583. "fromCache": false,
  584. "hasPendingWrites": false,
  585. "query": {
  586. "filters": [
  587. ],
  588. "limit": 3,
  589. "limitType": "LimitToFirst",
  590. "orderBys": [
  591. ],
  592. "path": "collection"
  593. }
  594. }
  595. ]
  596. },
  597. {
  598. "watchEntity": {
  599. "docs": [
  600. {
  601. "createTime": 0,
  602. "key": "collection/b",
  603. "options": {
  604. "hasCommittedMutations": false,
  605. "hasLocalMutations": false
  606. },
  607. "value": {
  608. "key": "b"
  609. },
  610. "version": 1002
  611. }
  612. ],
  613. "targets": [
  614. 2,
  615. 4
  616. ]
  617. }
  618. },
  619. {
  620. "watchEntity": {
  621. "key": "collection/c",
  622. "removedTargets": [
  623. 2
  624. ]
  625. }
  626. },
  627. {
  628. "watchSnapshot": {
  629. "targetIds": [
  630. ],
  631. "version": 1002
  632. },
  633. "expectedSnapshotEvents": [
  634. {
  635. "added": [
  636. {
  637. "createTime": 0,
  638. "key": "collection/b",
  639. "options": {
  640. "hasCommittedMutations": false,
  641. "hasLocalMutations": false
  642. },
  643. "value": {
  644. "key": "b"
  645. },
  646. "version": 1002
  647. }
  648. ],
  649. "errorCode": 0,
  650. "fromCache": false,
  651. "hasPendingWrites": false,
  652. "query": {
  653. "filters": [
  654. ],
  655. "limit": 2,
  656. "limitType": "LimitToFirst",
  657. "orderBys": [
  658. ],
  659. "path": "collection"
  660. },
  661. "removed": [
  662. {
  663. "createTime": 0,
  664. "key": "collection/c",
  665. "options": {
  666. "hasCommittedMutations": false,
  667. "hasLocalMutations": false
  668. },
  669. "value": {
  670. "key": "c"
  671. },
  672. "version": 1001
  673. }
  674. ]
  675. },
  676. {
  677. "added": [
  678. {
  679. "createTime": 0,
  680. "key": "collection/b",
  681. "options": {
  682. "hasCommittedMutations": false,
  683. "hasLocalMutations": false
  684. },
  685. "value": {
  686. "key": "b"
  687. },
  688. "version": 1002
  689. }
  690. ],
  691. "errorCode": 0,
  692. "fromCache": false,
  693. "hasPendingWrites": false,
  694. "query": {
  695. "filters": [
  696. ],
  697. "limit": 3,
  698. "limitType": "LimitToFirst",
  699. "orderBys": [
  700. ],
  701. "path": "collection"
  702. }
  703. }
  704. ],
  705. "expectedState": {
  706. "activeLimboDocs": [
  707. ],
  708. "activeTargets": {
  709. "2": {
  710. "queries": [
  711. {
  712. "filters": [
  713. ],
  714. "limit": 2,
  715. "limitType": "LimitToFirst",
  716. "orderBys": [
  717. ],
  718. "path": "collection"
  719. }
  720. ],
  721. "resumeToken": ""
  722. },
  723. "4": {
  724. "queries": [
  725. {
  726. "filters": [
  727. ],
  728. "limit": 3,
  729. "limitType": "LimitToFirst",
  730. "orderBys": [
  731. ],
  732. "path": "collection"
  733. }
  734. ],
  735. "resumeToken": ""
  736. }
  737. }
  738. }
  739. }
  740. ]
  741. },
  742. "Documents in limit are replaced by remote event": {
  743. "describeName": "Limits:",
  744. "itName": "Documents in limit are replaced by remote event",
  745. "tags": [
  746. ],
  747. "config": {
  748. "numClients": 1,
  749. "useEagerGCForMemory": true
  750. },
  751. "steps": [
  752. {
  753. "userListen": {
  754. "query": {
  755. "filters": [
  756. ],
  757. "limit": 2,
  758. "limitType": "LimitToFirst",
  759. "orderBys": [
  760. ],
  761. "path": "collection"
  762. },
  763. "targetId": 2
  764. },
  765. "expectedState": {
  766. "activeTargets": {
  767. "2": {
  768. "queries": [
  769. {
  770. "filters": [
  771. ],
  772. "limit": 2,
  773. "limitType": "LimitToFirst",
  774. "orderBys": [
  775. ],
  776. "path": "collection"
  777. }
  778. ],
  779. "resumeToken": ""
  780. }
  781. }
  782. }
  783. },
  784. {
  785. "watchAck": [
  786. 2
  787. ]
  788. },
  789. {
  790. "watchEntity": {
  791. "docs": [
  792. {
  793. "createTime": 0,
  794. "key": "collection/a",
  795. "options": {
  796. "hasCommittedMutations": false,
  797. "hasLocalMutations": false
  798. },
  799. "value": {
  800. "key": "a"
  801. },
  802. "version": 1000
  803. },
  804. {
  805. "createTime": 0,
  806. "key": "collection/c",
  807. "options": {
  808. "hasCommittedMutations": false,
  809. "hasLocalMutations": false
  810. },
  811. "value": {
  812. "key": "c"
  813. },
  814. "version": 1001
  815. }
  816. ],
  817. "targets": [
  818. 2
  819. ]
  820. }
  821. },
  822. {
  823. "watchCurrent": [
  824. [
  825. 2
  826. ],
  827. "resume-token-1001"
  828. ]
  829. },
  830. {
  831. "watchSnapshot": {
  832. "targetIds": [
  833. ],
  834. "version": 1001
  835. },
  836. "expectedSnapshotEvents": [
  837. {
  838. "added": [
  839. {
  840. "createTime": 0,
  841. "key": "collection/a",
  842. "options": {
  843. "hasCommittedMutations": false,
  844. "hasLocalMutations": false
  845. },
  846. "value": {
  847. "key": "a"
  848. },
  849. "version": 1000
  850. },
  851. {
  852. "createTime": 0,
  853. "key": "collection/c",
  854. "options": {
  855. "hasCommittedMutations": false,
  856. "hasLocalMutations": false
  857. },
  858. "value": {
  859. "key": "c"
  860. },
  861. "version": 1001
  862. }
  863. ],
  864. "errorCode": 0,
  865. "fromCache": false,
  866. "hasPendingWrites": false,
  867. "query": {
  868. "filters": [
  869. ],
  870. "limit": 2,
  871. "limitType": "LimitToFirst",
  872. "orderBys": [
  873. ],
  874. "path": "collection"
  875. }
  876. }
  877. ]
  878. },
  879. {
  880. "watchEntity": {
  881. "docs": [
  882. {
  883. "createTime": 0,
  884. "key": "collection/b",
  885. "options": {
  886. "hasCommittedMutations": false,
  887. "hasLocalMutations": false
  888. },
  889. "value": {
  890. "key": "b"
  891. },
  892. "version": 1002
  893. }
  894. ],
  895. "targets": [
  896. 2
  897. ]
  898. }
  899. },
  900. {
  901. "watchEntity": {
  902. "docs": [
  903. {
  904. "createTime": 0,
  905. "key": "collection/c",
  906. "options": {
  907. "hasCommittedMutations": false,
  908. "hasLocalMutations": false
  909. },
  910. "value": {
  911. "key": "c"
  912. },
  913. "version": 1001
  914. }
  915. ],
  916. "removedTargets": [
  917. 2
  918. ]
  919. }
  920. },
  921. {
  922. "watchSnapshot": {
  923. "targetIds": [
  924. ],
  925. "version": 1002
  926. },
  927. "expectedSnapshotEvents": [
  928. {
  929. "added": [
  930. {
  931. "createTime": 0,
  932. "key": "collection/b",
  933. "options": {
  934. "hasCommittedMutations": false,
  935. "hasLocalMutations": false
  936. },
  937. "value": {
  938. "key": "b"
  939. },
  940. "version": 1002
  941. }
  942. ],
  943. "errorCode": 0,
  944. "fromCache": false,
  945. "hasPendingWrites": false,
  946. "query": {
  947. "filters": [
  948. ],
  949. "limit": 2,
  950. "limitType": "LimitToFirst",
  951. "orderBys": [
  952. ],
  953. "path": "collection"
  954. },
  955. "removed": [
  956. {
  957. "createTime": 0,
  958. "key": "collection/c",
  959. "options": {
  960. "hasCommittedMutations": false,
  961. "hasLocalMutations": false
  962. },
  963. "value": {
  964. "key": "c"
  965. },
  966. "version": 1001
  967. }
  968. ]
  969. }
  970. ]
  971. }
  972. ]
  973. },
  974. "Documents in limit can handle removed messages": {
  975. "describeName": "Limits:",
  976. "itName": "Documents in limit can handle removed messages",
  977. "tags": [
  978. ],
  979. "config": {
  980. "numClients": 1,
  981. "useEagerGCForMemory": true
  982. },
  983. "steps": [
  984. {
  985. "userListen": {
  986. "query": {
  987. "filters": [
  988. ],
  989. "limit": 2,
  990. "limitType": "LimitToFirst",
  991. "orderBys": [
  992. ],
  993. "path": "collection"
  994. },
  995. "targetId": 2
  996. },
  997. "expectedState": {
  998. "activeTargets": {
  999. "2": {
  1000. "queries": [
  1001. {
  1002. "filters": [
  1003. ],
  1004. "limit": 2,
  1005. "limitType": "LimitToFirst",
  1006. "orderBys": [
  1007. ],
  1008. "path": "collection"
  1009. }
  1010. ],
  1011. "resumeToken": ""
  1012. }
  1013. }
  1014. }
  1015. },
  1016. {
  1017. "watchAck": [
  1018. 2
  1019. ]
  1020. },
  1021. {
  1022. "watchEntity": {
  1023. "docs": [
  1024. {
  1025. "createTime": 0,
  1026. "key": "collection/a",
  1027. "options": {
  1028. "hasCommittedMutations": false,
  1029. "hasLocalMutations": false
  1030. },
  1031. "value": {
  1032. "key": "a"
  1033. },
  1034. "version": 1000
  1035. },
  1036. {
  1037. "createTime": 0,
  1038. "key": "collection/c",
  1039. "options": {
  1040. "hasCommittedMutations": false,
  1041. "hasLocalMutations": false
  1042. },
  1043. "value": {
  1044. "key": "c"
  1045. },
  1046. "version": 1001
  1047. }
  1048. ],
  1049. "targets": [
  1050. 2
  1051. ]
  1052. }
  1053. },
  1054. {
  1055. "watchCurrent": [
  1056. [
  1057. 2
  1058. ],
  1059. "resume-token-1001"
  1060. ]
  1061. },
  1062. {
  1063. "watchSnapshot": {
  1064. "targetIds": [
  1065. ],
  1066. "version": 1001
  1067. },
  1068. "expectedSnapshotEvents": [
  1069. {
  1070. "added": [
  1071. {
  1072. "createTime": 0,
  1073. "key": "collection/a",
  1074. "options": {
  1075. "hasCommittedMutations": false,
  1076. "hasLocalMutations": false
  1077. },
  1078. "value": {
  1079. "key": "a"
  1080. },
  1081. "version": 1000
  1082. },
  1083. {
  1084. "createTime": 0,
  1085. "key": "collection/c",
  1086. "options": {
  1087. "hasCommittedMutations": false,
  1088. "hasLocalMutations": false
  1089. },
  1090. "value": {
  1091. "key": "c"
  1092. },
  1093. "version": 1001
  1094. }
  1095. ],
  1096. "errorCode": 0,
  1097. "fromCache": false,
  1098. "hasPendingWrites": false,
  1099. "query": {
  1100. "filters": [
  1101. ],
  1102. "limit": 2,
  1103. "limitType": "LimitToFirst",
  1104. "orderBys": [
  1105. ],
  1106. "path": "collection"
  1107. }
  1108. }
  1109. ]
  1110. },
  1111. {
  1112. "watchEntity": {
  1113. "docs": [
  1114. {
  1115. "createTime": 0,
  1116. "key": "collection/b",
  1117. "options": {
  1118. "hasCommittedMutations": false,
  1119. "hasLocalMutations": false
  1120. },
  1121. "value": {
  1122. "key": "b"
  1123. },
  1124. "version": 1002
  1125. }
  1126. ],
  1127. "targets": [
  1128. 2
  1129. ]
  1130. }
  1131. },
  1132. {
  1133. "watchEntity": {
  1134. "key": "collection/c",
  1135. "removedTargets": [
  1136. 2
  1137. ]
  1138. }
  1139. },
  1140. {
  1141. "watchSnapshot": {
  1142. "targetIds": [
  1143. ],
  1144. "version": 1002
  1145. },
  1146. "expectedSnapshotEvents": [
  1147. {
  1148. "added": [
  1149. {
  1150. "createTime": 0,
  1151. "key": "collection/b",
  1152. "options": {
  1153. "hasCommittedMutations": false,
  1154. "hasLocalMutations": false
  1155. },
  1156. "value": {
  1157. "key": "b"
  1158. },
  1159. "version": 1002
  1160. }
  1161. ],
  1162. "errorCode": 0,
  1163. "fromCache": false,
  1164. "hasPendingWrites": false,
  1165. "query": {
  1166. "filters": [
  1167. ],
  1168. "limit": 2,
  1169. "limitType": "LimitToFirst",
  1170. "orderBys": [
  1171. ],
  1172. "path": "collection"
  1173. },
  1174. "removed": [
  1175. {
  1176. "createTime": 0,
  1177. "key": "collection/c",
  1178. "options": {
  1179. "hasCommittedMutations": false,
  1180. "hasLocalMutations": false
  1181. },
  1182. "value": {
  1183. "key": "c"
  1184. },
  1185. "version": 1001
  1186. }
  1187. ]
  1188. }
  1189. ],
  1190. "expectedState": {
  1191. "activeLimboDocs": [
  1192. ],
  1193. "activeTargets": {
  1194. "2": {
  1195. "queries": [
  1196. {
  1197. "filters": [
  1198. ],
  1199. "limit": 2,
  1200. "limitType": "LimitToFirst",
  1201. "orderBys": [
  1202. ],
  1203. "path": "collection"
  1204. }
  1205. ],
  1206. "resumeToken": ""
  1207. }
  1208. }
  1209. }
  1210. }
  1211. ]
  1212. },
  1213. "Documents outside of limit don't raise hasPendingWrites": {
  1214. "describeName": "Limits:",
  1215. "itName": "Documents outside of limit don't raise hasPendingWrites",
  1216. "tags": [
  1217. ],
  1218. "config": {
  1219. "numClients": 1,
  1220. "useEagerGCForMemory": false
  1221. },
  1222. "steps": [
  1223. {
  1224. "userListen": {
  1225. "query": {
  1226. "filters": [
  1227. ],
  1228. "limit": 2,
  1229. "limitType": "LimitToFirst",
  1230. "orderBys": [
  1231. ],
  1232. "path": "collection"
  1233. },
  1234. "targetId": 2
  1235. },
  1236. "expectedState": {
  1237. "activeTargets": {
  1238. "2": {
  1239. "queries": [
  1240. {
  1241. "filters": [
  1242. ],
  1243. "limit": 2,
  1244. "limitType": "LimitToFirst",
  1245. "orderBys": [
  1246. ],
  1247. "path": "collection"
  1248. }
  1249. ],
  1250. "resumeToken": ""
  1251. }
  1252. }
  1253. }
  1254. },
  1255. {
  1256. "watchAck": [
  1257. 2
  1258. ]
  1259. },
  1260. {
  1261. "watchEntity": {
  1262. "docs": [
  1263. {
  1264. "createTime": 0,
  1265. "key": "collection/a",
  1266. "options": {
  1267. "hasCommittedMutations": false,
  1268. "hasLocalMutations": false
  1269. },
  1270. "value": {
  1271. "key": "a"
  1272. },
  1273. "version": 1000
  1274. },
  1275. {
  1276. "createTime": 0,
  1277. "key": "collection/b",
  1278. "options": {
  1279. "hasCommittedMutations": false,
  1280. "hasLocalMutations": false
  1281. },
  1282. "value": {
  1283. "key": "b"
  1284. },
  1285. "version": 1000
  1286. }
  1287. ],
  1288. "targets": [
  1289. 2
  1290. ]
  1291. }
  1292. },
  1293. {
  1294. "watchCurrent": [
  1295. [
  1296. 2
  1297. ],
  1298. "resume-token-1000"
  1299. ]
  1300. },
  1301. {
  1302. "watchSnapshot": {
  1303. "targetIds": [
  1304. ],
  1305. "version": 1000
  1306. },
  1307. "expectedSnapshotEvents": [
  1308. {
  1309. "added": [
  1310. {
  1311. "createTime": 0,
  1312. "key": "collection/a",
  1313. "options": {
  1314. "hasCommittedMutations": false,
  1315. "hasLocalMutations": false
  1316. },
  1317. "value": {
  1318. "key": "a"
  1319. },
  1320. "version": 1000
  1321. },
  1322. {
  1323. "createTime": 0,
  1324. "key": "collection/b",
  1325. "options": {
  1326. "hasCommittedMutations": false,
  1327. "hasLocalMutations": false
  1328. },
  1329. "value": {
  1330. "key": "b"
  1331. },
  1332. "version": 1000
  1333. }
  1334. ],
  1335. "errorCode": 0,
  1336. "fromCache": false,
  1337. "hasPendingWrites": false,
  1338. "query": {
  1339. "filters": [
  1340. ],
  1341. "limit": 2,
  1342. "limitType": "LimitToFirst",
  1343. "orderBys": [
  1344. ],
  1345. "path": "collection"
  1346. }
  1347. }
  1348. ]
  1349. },
  1350. {
  1351. "userUnlisten": [
  1352. 2,
  1353. {
  1354. "filters": [
  1355. ],
  1356. "limit": 2,
  1357. "limitType": "LimitToFirst",
  1358. "orderBys": [
  1359. ],
  1360. "path": "collection"
  1361. }
  1362. ],
  1363. "expectedState": {
  1364. "activeTargets": {
  1365. }
  1366. }
  1367. },
  1368. {
  1369. "userSet": [
  1370. "collection/c",
  1371. {
  1372. "key": "c"
  1373. }
  1374. ]
  1375. },
  1376. {
  1377. "userListen": {
  1378. "query": {
  1379. "filters": [
  1380. ],
  1381. "limit": 2,
  1382. "limitType": "LimitToFirst",
  1383. "orderBys": [
  1384. ],
  1385. "path": "collection"
  1386. },
  1387. "targetId": 2
  1388. },
  1389. "expectedSnapshotEvents": [
  1390. {
  1391. "added": [
  1392. {
  1393. "createTime": 0,
  1394. "key": "collection/a",
  1395. "options": {
  1396. "hasCommittedMutations": false,
  1397. "hasLocalMutations": false
  1398. },
  1399. "value": {
  1400. "key": "a"
  1401. },
  1402. "version": 1000
  1403. },
  1404. {
  1405. "createTime": 0,
  1406. "key": "collection/b",
  1407. "options": {
  1408. "hasCommittedMutations": false,
  1409. "hasLocalMutations": false
  1410. },
  1411. "value": {
  1412. "key": "b"
  1413. },
  1414. "version": 1000
  1415. }
  1416. ],
  1417. "errorCode": 0,
  1418. "fromCache": true,
  1419. "hasPendingWrites": false,
  1420. "query": {
  1421. "filters": [
  1422. ],
  1423. "limit": 2,
  1424. "limitType": "LimitToFirst",
  1425. "orderBys": [
  1426. ],
  1427. "path": "collection"
  1428. }
  1429. }
  1430. ],
  1431. "expectedState": {
  1432. "activeTargets": {
  1433. "2": {
  1434. "queries": [
  1435. {
  1436. "filters": [
  1437. ],
  1438. "limit": 2,
  1439. "limitType": "LimitToFirst",
  1440. "orderBys": [
  1441. ],
  1442. "path": "collection"
  1443. }
  1444. ],
  1445. "resumeToken": "resume-token-1000"
  1446. }
  1447. }
  1448. }
  1449. }
  1450. ]
  1451. },
  1452. "Initial snapshots for limit queries are re-filled from cache (with latency-compensated edit)": {
  1453. "describeName": "Limits:",
  1454. "itName": "Initial snapshots for limit queries are re-filled from cache (with latency-compensated edit)",
  1455. "tags": [
  1456. ],
  1457. "config": {
  1458. "numClients": 1,
  1459. "useEagerGCForMemory": false
  1460. },
  1461. "steps": [
  1462. {
  1463. "userListen": {
  1464. "query": {
  1465. "filters": [
  1466. ],
  1467. "orderBys": [
  1468. ],
  1469. "path": "collection"
  1470. },
  1471. "targetId": 2
  1472. },
  1473. "expectedState": {
  1474. "activeTargets": {
  1475. "2": {
  1476. "queries": [
  1477. {
  1478. "filters": [
  1479. ],
  1480. "orderBys": [
  1481. ],
  1482. "path": "collection"
  1483. }
  1484. ],
  1485. "resumeToken": ""
  1486. }
  1487. }
  1488. }
  1489. },
  1490. {
  1491. "watchAck": [
  1492. 2
  1493. ]
  1494. },
  1495. {
  1496. "watchEntity": {
  1497. "docs": [
  1498. {
  1499. "createTime": 0,
  1500. "key": "collection/a",
  1501. "options": {
  1502. "hasCommittedMutations": false,
  1503. "hasLocalMutations": false
  1504. },
  1505. "value": {
  1506. "pos": 1
  1507. },
  1508. "version": 1001
  1509. },
  1510. {
  1511. "createTime": 0,
  1512. "key": "collection/b",
  1513. "options": {
  1514. "hasCommittedMutations": false,
  1515. "hasLocalMutations": false
  1516. },
  1517. "value": {
  1518. "pos": 2
  1519. },
  1520. "version": 1002
  1521. },
  1522. {
  1523. "createTime": 0,
  1524. "key": "collection/c",
  1525. "options": {
  1526. "hasCommittedMutations": false,
  1527. "hasLocalMutations": false
  1528. },
  1529. "value": {
  1530. "pos": 3
  1531. },
  1532. "version": 1003
  1533. }
  1534. ],
  1535. "targets": [
  1536. 2
  1537. ]
  1538. }
  1539. },
  1540. {
  1541. "watchCurrent": [
  1542. [
  1543. 2
  1544. ],
  1545. "resume-token-1003"
  1546. ]
  1547. },
  1548. {
  1549. "watchSnapshot": {
  1550. "targetIds": [
  1551. ],
  1552. "version": 1003
  1553. },
  1554. "expectedSnapshotEvents": [
  1555. {
  1556. "added": [
  1557. {
  1558. "createTime": 0,
  1559. "key": "collection/a",
  1560. "options": {
  1561. "hasCommittedMutations": false,
  1562. "hasLocalMutations": false
  1563. },
  1564. "value": {
  1565. "pos": 1
  1566. },
  1567. "version": 1001
  1568. },
  1569. {
  1570. "createTime": 0,
  1571. "key": "collection/b",
  1572. "options": {
  1573. "hasCommittedMutations": false,
  1574. "hasLocalMutations": false
  1575. },
  1576. "value": {
  1577. "pos": 2
  1578. },
  1579. "version": 1002
  1580. },
  1581. {
  1582. "createTime": 0,
  1583. "key": "collection/c",
  1584. "options": {
  1585. "hasCommittedMutations": false,
  1586. "hasLocalMutations": false
  1587. },
  1588. "value": {
  1589. "pos": 3
  1590. },
  1591. "version": 1003
  1592. }
  1593. ],
  1594. "errorCode": 0,
  1595. "fromCache": false,
  1596. "hasPendingWrites": false,
  1597. "query": {
  1598. "filters": [
  1599. ],
  1600. "orderBys": [
  1601. ],
  1602. "path": "collection"
  1603. }
  1604. }
  1605. ]
  1606. },
  1607. {
  1608. "userUnlisten": [
  1609. 2,
  1610. {
  1611. "filters": [
  1612. ],
  1613. "orderBys": [
  1614. ],
  1615. "path": "collection"
  1616. }
  1617. ],
  1618. "expectedState": {
  1619. "activeTargets": {
  1620. }
  1621. }
  1622. },
  1623. {
  1624. "watchRemove": {
  1625. "targetIds": [
  1626. 2
  1627. ]
  1628. }
  1629. },
  1630. {
  1631. "userListen": {
  1632. "query": {
  1633. "filters": [
  1634. ],
  1635. "limit": 2,
  1636. "limitType": "LimitToFirst",
  1637. "orderBys": [
  1638. [
  1639. "pos",
  1640. "asc"
  1641. ]
  1642. ],
  1643. "path": "collection"
  1644. },
  1645. "targetId": 4
  1646. },
  1647. "expectedSnapshotEvents": [
  1648. {
  1649. "added": [
  1650. {
  1651. "createTime": 0,
  1652. "key": "collection/a",
  1653. "options": {
  1654. "hasCommittedMutations": false,
  1655. "hasLocalMutations": false
  1656. },
  1657. "value": {
  1658. "pos": 1
  1659. },
  1660. "version": 1001
  1661. },
  1662. {
  1663. "createTime": 0,
  1664. "key": "collection/b",
  1665. "options": {
  1666. "hasCommittedMutations": false,
  1667. "hasLocalMutations": false
  1668. },
  1669. "value": {
  1670. "pos": 2
  1671. },
  1672. "version": 1002
  1673. }
  1674. ],
  1675. "errorCode": 0,
  1676. "fromCache": true,
  1677. "hasPendingWrites": false,
  1678. "query": {
  1679. "filters": [
  1680. ],
  1681. "limit": 2,
  1682. "limitType": "LimitToFirst",
  1683. "orderBys": [
  1684. [
  1685. "pos",
  1686. "asc"
  1687. ]
  1688. ],
  1689. "path": "collection"
  1690. }
  1691. }
  1692. ],
  1693. "expectedState": {
  1694. "activeTargets": {
  1695. "4": {
  1696. "queries": [
  1697. {
  1698. "filters": [
  1699. ],
  1700. "limit": 2,
  1701. "limitType": "LimitToFirst",
  1702. "orderBys": [
  1703. [
  1704. "pos",
  1705. "asc"
  1706. ]
  1707. ],
  1708. "path": "collection"
  1709. }
  1710. ],
  1711. "resumeToken": ""
  1712. }
  1713. }
  1714. }
  1715. },
  1716. {
  1717. "watchAck": [
  1718. 4
  1719. ]
  1720. },
  1721. {
  1722. "watchEntity": {
  1723. "docs": [
  1724. {
  1725. "createTime": 0,
  1726. "key": "collection/a",
  1727. "options": {
  1728. "hasCommittedMutations": false,
  1729. "hasLocalMutations": false
  1730. },
  1731. "value": {
  1732. "pos": 1
  1733. },
  1734. "version": 1001
  1735. },
  1736. {
  1737. "createTime": 0,
  1738. "key": "collection/b",
  1739. "options": {
  1740. "hasCommittedMutations": false,
  1741. "hasLocalMutations": false
  1742. },
  1743. "value": {
  1744. "pos": 2
  1745. },
  1746. "version": 1002
  1747. }
  1748. ],
  1749. "targets": [
  1750. 4
  1751. ]
  1752. }
  1753. },
  1754. {
  1755. "watchCurrent": [
  1756. [
  1757. 4
  1758. ],
  1759. "resume-token-1004"
  1760. ]
  1761. },
  1762. {
  1763. "watchSnapshot": {
  1764. "targetIds": [
  1765. ],
  1766. "version": 1004
  1767. },
  1768. "expectedSnapshotEvents": [
  1769. {
  1770. "errorCode": 0,
  1771. "fromCache": false,
  1772. "hasPendingWrites": false,
  1773. "query": {
  1774. "filters": [
  1775. ],
  1776. "limit": 2,
  1777. "limitType": "LimitToFirst",
  1778. "orderBys": [
  1779. [
  1780. "pos",
  1781. "asc"
  1782. ]
  1783. ],
  1784. "path": "collection"
  1785. }
  1786. }
  1787. ]
  1788. },
  1789. {
  1790. "userUnlisten": [
  1791. 4,
  1792. {
  1793. "filters": [
  1794. ],
  1795. "limit": 2,
  1796. "limitType": "LimitToFirst",
  1797. "orderBys": [
  1798. [
  1799. "pos",
  1800. "asc"
  1801. ]
  1802. ],
  1803. "path": "collection"
  1804. }
  1805. ],
  1806. "expectedState": {
  1807. "activeTargets": {
  1808. }
  1809. }
  1810. },
  1811. {
  1812. "watchRemove": {
  1813. "targetIds": [
  1814. 4
  1815. ]
  1816. }
  1817. },
  1818. {
  1819. "userSet": [
  1820. "collection/a",
  1821. {
  1822. "pos": 4
  1823. }
  1824. ]
  1825. },
  1826. {
  1827. "userListen": {
  1828. "query": {
  1829. "filters": [
  1830. ],
  1831. "limit": 2,
  1832. "limitType": "LimitToFirst",
  1833. "orderBys": [
  1834. [
  1835. "pos",
  1836. "asc"
  1837. ]
  1838. ],
  1839. "path": "collection"
  1840. },
  1841. "targetId": 4
  1842. },
  1843. "expectedSnapshotEvents": [
  1844. {
  1845. "added": [
  1846. {
  1847. "createTime": 0,
  1848. "key": "collection/b",
  1849. "options": {
  1850. "hasCommittedMutations": false,
  1851. "hasLocalMutations": false
  1852. },
  1853. "value": {
  1854. "pos": 2
  1855. },
  1856. "version": 1002
  1857. },
  1858. {
  1859. "createTime": 0,
  1860. "key": "collection/c",
  1861. "options": {
  1862. "hasCommittedMutations": false,
  1863. "hasLocalMutations": false
  1864. },
  1865. "value": {
  1866. "pos": 3
  1867. },
  1868. "version": 1003
  1869. }
  1870. ],
  1871. "errorCode": 0,
  1872. "fromCache": true,
  1873. "hasPendingWrites": false,
  1874. "query": {
  1875. "filters": [
  1876. ],
  1877. "limit": 2,
  1878. "limitType": "LimitToFirst",
  1879. "orderBys": [
  1880. [
  1881. "pos",
  1882. "asc"
  1883. ]
  1884. ],
  1885. "path": "collection"
  1886. }
  1887. }
  1888. ],
  1889. "expectedState": {
  1890. "activeTargets": {
  1891. "4": {
  1892. "queries": [
  1893. {
  1894. "filters": [
  1895. ],
  1896. "limit": 2,
  1897. "limitType": "LimitToFirst",
  1898. "orderBys": [
  1899. [
  1900. "pos",
  1901. "asc"
  1902. ]
  1903. ],
  1904. "path": "collection"
  1905. }
  1906. ],
  1907. "resumeToken": "resume-token-1004"
  1908. }
  1909. }
  1910. }
  1911. }
  1912. ]
  1913. },
  1914. "Initial snapshots for limit queries are re-filled from cache (with removal)": {
  1915. "describeName": "Limits:",
  1916. "itName": "Initial snapshots for limit queries are re-filled from cache (with removal)",
  1917. "tags": [
  1918. ],
  1919. "config": {
  1920. "numClients": 1,
  1921. "useEagerGCForMemory": false
  1922. },
  1923. "steps": [
  1924. {
  1925. "userListen": {
  1926. "query": {
  1927. "filters": [
  1928. [
  1929. "matches",
  1930. "==",
  1931. true
  1932. ]
  1933. ],
  1934. "orderBys": [
  1935. ],
  1936. "path": "collection"
  1937. },
  1938. "targetId": 2
  1939. },
  1940. "expectedState": {
  1941. "activeTargets": {
  1942. "2": {
  1943. "queries": [
  1944. {
  1945. "filters": [
  1946. [
  1947. "matches",
  1948. "==",
  1949. true
  1950. ]
  1951. ],
  1952. "orderBys": [
  1953. ],
  1954. "path": "collection"
  1955. }
  1956. ],
  1957. "resumeToken": ""
  1958. }
  1959. }
  1960. }
  1961. },
  1962. {
  1963. "watchAck": [
  1964. 2
  1965. ]
  1966. },
  1967. {
  1968. "watchEntity": {
  1969. "docs": [
  1970. {
  1971. "createTime": 0,
  1972. "key": "collection/a",
  1973. "options": {
  1974. "hasCommittedMutations": false,
  1975. "hasLocalMutations": false
  1976. },
  1977. "value": {
  1978. "matches": true
  1979. },
  1980. "version": 1001
  1981. },
  1982. {
  1983. "createTime": 0,
  1984. "key": "collection/b",
  1985. "options": {
  1986. "hasCommittedMutations": false,
  1987. "hasLocalMutations": false
  1988. },
  1989. "value": {
  1990. "matches": true
  1991. },
  1992. "version": 1002
  1993. },
  1994. {
  1995. "createTime": 0,
  1996. "key": "collection/c",
  1997. "options": {
  1998. "hasCommittedMutations": false,
  1999. "hasLocalMutations": false
  2000. },
  2001. "value": {
  2002. "matches": true
  2003. },
  2004. "version": 1003
  2005. }
  2006. ],
  2007. "targets": [
  2008. 2
  2009. ]
  2010. }
  2011. },
  2012. {
  2013. "watchCurrent": [
  2014. [
  2015. 2
  2016. ],
  2017. "resume-token-1003"
  2018. ]
  2019. },
  2020. {
  2021. "watchSnapshot": {
  2022. "targetIds": [
  2023. ],
  2024. "version": 1003
  2025. },
  2026. "expectedSnapshotEvents": [
  2027. {
  2028. "added": [
  2029. {
  2030. "createTime": 0,
  2031. "key": "collection/a",
  2032. "options": {
  2033. "hasCommittedMutations": false,
  2034. "hasLocalMutations": false
  2035. },
  2036. "value": {
  2037. "matches": true
  2038. },
  2039. "version": 1001
  2040. },
  2041. {
  2042. "createTime": 0,
  2043. "key": "collection/b",
  2044. "options": {
  2045. "hasCommittedMutations": false,
  2046. "hasLocalMutations": false
  2047. },
  2048. "value": {
  2049. "matches": true
  2050. },
  2051. "version": 1002
  2052. },
  2053. {
  2054. "createTime": 0,
  2055. "key": "collection/c",
  2056. "options": {
  2057. "hasCommittedMutations": false,
  2058. "hasLocalMutations": false
  2059. },
  2060. "value": {
  2061. "matches": true
  2062. },
  2063. "version": 1003
  2064. }
  2065. ],
  2066. "errorCode": 0,
  2067. "fromCache": false,
  2068. "hasPendingWrites": false,
  2069. "query": {
  2070. "filters": [
  2071. [
  2072. "matches",
  2073. "==",
  2074. true
  2075. ]
  2076. ],
  2077. "orderBys": [
  2078. ],
  2079. "path": "collection"
  2080. }
  2081. }
  2082. ]
  2083. },
  2084. {
  2085. "userUnlisten": [
  2086. 2,
  2087. {
  2088. "filters": [
  2089. [
  2090. "matches",
  2091. "==",
  2092. true
  2093. ]
  2094. ],
  2095. "orderBys": [
  2096. ],
  2097. "path": "collection"
  2098. }
  2099. ],
  2100. "expectedState": {
  2101. "activeTargets": {
  2102. }
  2103. }
  2104. },
  2105. {
  2106. "userListen": {
  2107. "query": {
  2108. "filters": [
  2109. [
  2110. "matches",
  2111. "==",
  2112. true
  2113. ]
  2114. ],
  2115. "limit": 2,
  2116. "limitType": "LimitToFirst",
  2117. "orderBys": [
  2118. ],
  2119. "path": "collection"
  2120. },
  2121. "targetId": 4
  2122. },
  2123. "expectedSnapshotEvents": [
  2124. {
  2125. "added": [
  2126. {
  2127. "createTime": 0,
  2128. "key": "collection/a",
  2129. "options": {
  2130. "hasCommittedMutations": false,
  2131. "hasLocalMutations": false
  2132. },
  2133. "value": {
  2134. "matches": true
  2135. },
  2136. "version": 1001
  2137. },
  2138. {
  2139. "createTime": 0,
  2140. "key": "collection/b",
  2141. "options": {
  2142. "hasCommittedMutations": false,
  2143. "hasLocalMutations": false
  2144. },
  2145. "value": {
  2146. "matches": true
  2147. },
  2148. "version": 1002
  2149. }
  2150. ],
  2151. "errorCode": 0,
  2152. "fromCache": true,
  2153. "hasPendingWrites": false,
  2154. "query": {
  2155. "filters": [
  2156. [
  2157. "matches",
  2158. "==",
  2159. true
  2160. ]
  2161. ],
  2162. "limit": 2,
  2163. "limitType": "LimitToFirst",
  2164. "orderBys": [
  2165. ],
  2166. "path": "collection"
  2167. }
  2168. }
  2169. ],
  2170. "expectedState": {
  2171. "activeTargets": {
  2172. "4": {
  2173. "queries": [
  2174. {
  2175. "filters": [
  2176. [
  2177. "matches",
  2178. "==",
  2179. true
  2180. ]
  2181. ],
  2182. "limit": 2,
  2183. "limitType": "LimitToFirst",
  2184. "orderBys": [
  2185. ],
  2186. "path": "collection"
  2187. }
  2188. ],
  2189. "resumeToken": ""
  2190. }
  2191. }
  2192. }
  2193. },
  2194. {
  2195. "watchAck": [
  2196. 4
  2197. ]
  2198. },
  2199. {
  2200. "watchEntity": {
  2201. "docs": [
  2202. {
  2203. "createTime": 0,
  2204. "key": "collection/a",
  2205. "options": {
  2206. "hasCommittedMutations": false,
  2207. "hasLocalMutations": false
  2208. },
  2209. "value": {
  2210. "matches": true
  2211. },
  2212. "version": 1001
  2213. },
  2214. {
  2215. "createTime": 0,
  2216. "key": "collection/b",
  2217. "options": {
  2218. "hasCommittedMutations": false,
  2219. "hasLocalMutations": false
  2220. },
  2221. "value": {
  2222. "matches": true
  2223. },
  2224. "version": 1002
  2225. }
  2226. ],
  2227. "targets": [
  2228. 4
  2229. ]
  2230. }
  2231. },
  2232. {
  2233. "watchCurrent": [
  2234. [
  2235. 4
  2236. ],
  2237. "resume-token-1004"
  2238. ]
  2239. },
  2240. {
  2241. "watchSnapshot": {
  2242. "targetIds": [
  2243. ],
  2244. "version": 1004
  2245. },
  2246. "expectedSnapshotEvents": [
  2247. {
  2248. "errorCode": 0,
  2249. "fromCache": false,
  2250. "hasPendingWrites": false,
  2251. "query": {
  2252. "filters": [
  2253. [
  2254. "matches",
  2255. "==",
  2256. true
  2257. ]
  2258. ],
  2259. "limit": 2,
  2260. "limitType": "LimitToFirst",
  2261. "orderBys": [
  2262. ],
  2263. "path": "collection"
  2264. }
  2265. }
  2266. ]
  2267. },
  2268. {
  2269. "userUnlisten": [
  2270. 4,
  2271. {
  2272. "filters": [
  2273. [
  2274. "matches",
  2275. "==",
  2276. true
  2277. ]
  2278. ],
  2279. "limit": 2,
  2280. "limitType": "LimitToFirst",
  2281. "orderBys": [
  2282. ],
  2283. "path": "collection"
  2284. }
  2285. ],
  2286. "expectedState": {
  2287. "activeTargets": {
  2288. }
  2289. }
  2290. },
  2291. {
  2292. "watchRemove": {
  2293. "targetIds": [
  2294. 4
  2295. ]
  2296. }
  2297. },
  2298. {
  2299. "userSet": [
  2300. "collection/a",
  2301. {
  2302. "matches": false
  2303. }
  2304. ]
  2305. },
  2306. {
  2307. "userListen": {
  2308. "query": {
  2309. "filters": [
  2310. [
  2311. "matches",
  2312. "==",
  2313. true
  2314. ]
  2315. ],
  2316. "limit": 2,
  2317. "limitType": "LimitToFirst",
  2318. "orderBys": [
  2319. ],
  2320. "path": "collection"
  2321. },
  2322. "targetId": 4
  2323. },
  2324. "expectedSnapshotEvents": [
  2325. {
  2326. "added": [
  2327. {
  2328. "createTime": 0,
  2329. "key": "collection/b",
  2330. "options": {
  2331. "hasCommittedMutations": false,
  2332. "hasLocalMutations": false
  2333. },
  2334. "value": {
  2335. "matches": true
  2336. },
  2337. "version": 1002
  2338. },
  2339. {
  2340. "createTime": 0,
  2341. "key": "collection/c",
  2342. "options": {
  2343. "hasCommittedMutations": false,
  2344. "hasLocalMutations": false
  2345. },
  2346. "value": {
  2347. "matches": true
  2348. },
  2349. "version": 1003
  2350. }
  2351. ],
  2352. "errorCode": 0,
  2353. "fromCache": true,
  2354. "hasPendingWrites": false,
  2355. "query": {
  2356. "filters": [
  2357. [
  2358. "matches",
  2359. "==",
  2360. true
  2361. ]
  2362. ],
  2363. "limit": 2,
  2364. "limitType": "LimitToFirst",
  2365. "orderBys": [
  2366. ],
  2367. "path": "collection"
  2368. }
  2369. }
  2370. ],
  2371. "expectedState": {
  2372. "activeTargets": {
  2373. "4": {
  2374. "queries": [
  2375. {
  2376. "filters": [
  2377. [
  2378. "matches",
  2379. "==",
  2380. true
  2381. ]
  2382. ],
  2383. "limit": 2,
  2384. "limitType": "LimitToFirst",
  2385. "orderBys": [
  2386. ],
  2387. "path": "collection"
  2388. }
  2389. ],
  2390. "resumeToken": "resume-token-1004"
  2391. }
  2392. }
  2393. }
  2394. }
  2395. ]
  2396. },
  2397. "Initial snapshots for limit queries are re-filled from cache (with update from backend)": {
  2398. "describeName": "Limits:",
  2399. "itName": "Initial snapshots for limit queries are re-filled from cache (with update from backend)",
  2400. "tags": [
  2401. ],
  2402. "config": {
  2403. "numClients": 1,
  2404. "useEagerGCForMemory": false
  2405. },
  2406. "steps": [
  2407. {
  2408. "userListen": {
  2409. "query": {
  2410. "filters": [
  2411. ],
  2412. "orderBys": [
  2413. ],
  2414. "path": "collection"
  2415. },
  2416. "targetId": 2
  2417. },
  2418. "expectedState": {
  2419. "activeTargets": {
  2420. "2": {
  2421. "queries": [
  2422. {
  2423. "filters": [
  2424. ],
  2425. "orderBys": [
  2426. ],
  2427. "path": "collection"
  2428. }
  2429. ],
  2430. "resumeToken": ""
  2431. }
  2432. }
  2433. }
  2434. },
  2435. {
  2436. "watchAck": [
  2437. 2
  2438. ]
  2439. },
  2440. {
  2441. "watchEntity": {
  2442. "docs": [
  2443. {
  2444. "createTime": 0,
  2445. "key": "collection/a",
  2446. "options": {
  2447. "hasCommittedMutations": false,
  2448. "hasLocalMutations": false
  2449. },
  2450. "value": {
  2451. "pos": 1
  2452. },
  2453. "version": 1001
  2454. },
  2455. {
  2456. "createTime": 0,
  2457. "key": "collection/b",
  2458. "options": {
  2459. "hasCommittedMutations": false,
  2460. "hasLocalMutations": false
  2461. },
  2462. "value": {
  2463. "pos": 2
  2464. },
  2465. "version": 1002
  2466. },
  2467. {
  2468. "createTime": 0,
  2469. "key": "collection/c",
  2470. "options": {
  2471. "hasCommittedMutations": false,
  2472. "hasLocalMutations": false
  2473. },
  2474. "value": {
  2475. "pos": 3
  2476. },
  2477. "version": 1003
  2478. }
  2479. ],
  2480. "targets": [
  2481. 2
  2482. ]
  2483. }
  2484. },
  2485. {
  2486. "watchCurrent": [
  2487. [
  2488. 2
  2489. ],
  2490. "resume-token-1003"
  2491. ]
  2492. },
  2493. {
  2494. "watchSnapshot": {
  2495. "targetIds": [
  2496. ],
  2497. "version": 1003
  2498. },
  2499. "expectedSnapshotEvents": [
  2500. {
  2501. "added": [
  2502. {
  2503. "createTime": 0,
  2504. "key": "collection/a",
  2505. "options": {
  2506. "hasCommittedMutations": false,
  2507. "hasLocalMutations": false
  2508. },
  2509. "value": {
  2510. "pos": 1
  2511. },
  2512. "version": 1001
  2513. },
  2514. {
  2515. "createTime": 0,
  2516. "key": "collection/b",
  2517. "options": {
  2518. "hasCommittedMutations": false,
  2519. "hasLocalMutations": false
  2520. },
  2521. "value": {
  2522. "pos": 2
  2523. },
  2524. "version": 1002
  2525. },
  2526. {
  2527. "createTime": 0,
  2528. "key": "collection/c",
  2529. "options": {
  2530. "hasCommittedMutations": false,
  2531. "hasLocalMutations": false
  2532. },
  2533. "value": {
  2534. "pos": 3
  2535. },
  2536. "version": 1003
  2537. }
  2538. ],
  2539. "errorCode": 0,
  2540. "fromCache": false,
  2541. "hasPendingWrites": false,
  2542. "query": {
  2543. "filters": [
  2544. ],
  2545. "orderBys": [
  2546. ],
  2547. "path": "collection"
  2548. }
  2549. }
  2550. ]
  2551. },
  2552. {
  2553. "userUnlisten": [
  2554. 2,
  2555. {
  2556. "filters": [
  2557. ],
  2558. "orderBys": [
  2559. ],
  2560. "path": "collection"
  2561. }
  2562. ],
  2563. "expectedState": {
  2564. "activeTargets": {
  2565. }
  2566. }
  2567. },
  2568. {
  2569. "watchRemove": {
  2570. "targetIds": [
  2571. 2
  2572. ]
  2573. }
  2574. },
  2575. {
  2576. "userListen": {
  2577. "query": {
  2578. "filters": [
  2579. ],
  2580. "limit": 2,
  2581. "limitType": "LimitToFirst",
  2582. "orderBys": [
  2583. [
  2584. "pos",
  2585. "asc"
  2586. ]
  2587. ],
  2588. "path": "collection"
  2589. },
  2590. "targetId": 4
  2591. },
  2592. "expectedSnapshotEvents": [
  2593. {
  2594. "added": [
  2595. {
  2596. "createTime": 0,
  2597. "key": "collection/a",
  2598. "options": {
  2599. "hasCommittedMutations": false,
  2600. "hasLocalMutations": false
  2601. },
  2602. "value": {
  2603. "pos": 1
  2604. },
  2605. "version": 1001
  2606. },
  2607. {
  2608. "createTime": 0,
  2609. "key": "collection/b",
  2610. "options": {
  2611. "hasCommittedMutations": false,
  2612. "hasLocalMutations": false
  2613. },
  2614. "value": {
  2615. "pos": 2
  2616. },
  2617. "version": 1002
  2618. }
  2619. ],
  2620. "errorCode": 0,
  2621. "fromCache": true,
  2622. "hasPendingWrites": false,
  2623. "query": {
  2624. "filters": [
  2625. ],
  2626. "limit": 2,
  2627. "limitType": "LimitToFirst",
  2628. "orderBys": [
  2629. [
  2630. "pos",
  2631. "asc"
  2632. ]
  2633. ],
  2634. "path": "collection"
  2635. }
  2636. }
  2637. ],
  2638. "expectedState": {
  2639. "activeTargets": {
  2640. "4": {
  2641. "queries": [
  2642. {
  2643. "filters": [
  2644. ],
  2645. "limit": 2,
  2646. "limitType": "LimitToFirst",
  2647. "orderBys": [
  2648. [
  2649. "pos",
  2650. "asc"
  2651. ]
  2652. ],
  2653. "path": "collection"
  2654. }
  2655. ],
  2656. "resumeToken": ""
  2657. }
  2658. }
  2659. }
  2660. },
  2661. {
  2662. "watchAck": [
  2663. 4
  2664. ]
  2665. },
  2666. {
  2667. "watchEntity": {
  2668. "docs": [
  2669. {
  2670. "createTime": 0,
  2671. "key": "collection/a",
  2672. "options": {
  2673. "hasCommittedMutations": false,
  2674. "hasLocalMutations": false
  2675. },
  2676. "value": {
  2677. "pos": 1
  2678. },
  2679. "version": 1001
  2680. },
  2681. {
  2682. "createTime": 0,
  2683. "key": "collection/b",
  2684. "options": {
  2685. "hasCommittedMutations": false,
  2686. "hasLocalMutations": false
  2687. },
  2688. "value": {
  2689. "pos": 2
  2690. },
  2691. "version": 1002
  2692. }
  2693. ],
  2694. "targets": [
  2695. 4
  2696. ]
  2697. }
  2698. },
  2699. {
  2700. "watchCurrent": [
  2701. [
  2702. 4
  2703. ],
  2704. "resume-token-1004"
  2705. ]
  2706. },
  2707. {
  2708. "watchSnapshot": {
  2709. "targetIds": [
  2710. ],
  2711. "version": 1004
  2712. },
  2713. "expectedSnapshotEvents": [
  2714. {
  2715. "errorCode": 0,
  2716. "fromCache": false,
  2717. "hasPendingWrites": false,
  2718. "query": {
  2719. "filters": [
  2720. ],
  2721. "limit": 2,
  2722. "limitType": "LimitToFirst",
  2723. "orderBys": [
  2724. [
  2725. "pos",
  2726. "asc"
  2727. ]
  2728. ],
  2729. "path": "collection"
  2730. }
  2731. }
  2732. ]
  2733. },
  2734. {
  2735. "userUnlisten": [
  2736. 4,
  2737. {
  2738. "filters": [
  2739. ],
  2740. "limit": 2,
  2741. "limitType": "LimitToFirst",
  2742. "orderBys": [
  2743. [
  2744. "pos",
  2745. "asc"
  2746. ]
  2747. ],
  2748. "path": "collection"
  2749. }
  2750. ],
  2751. "expectedState": {
  2752. "activeTargets": {
  2753. }
  2754. }
  2755. },
  2756. {
  2757. "watchRemove": {
  2758. "targetIds": [
  2759. 4
  2760. ]
  2761. }
  2762. },
  2763. {
  2764. "userListen": {
  2765. "query": {
  2766. "filters": [
  2767. ],
  2768. "orderBys": [
  2769. ],
  2770. "path": "collection"
  2771. },
  2772. "targetId": 2
  2773. },
  2774. "expectedSnapshotEvents": [
  2775. {
  2776. "added": [
  2777. {
  2778. "createTime": 0,
  2779. "key": "collection/a",
  2780. "options": {
  2781. "hasCommittedMutations": false,
  2782. "hasLocalMutations": false
  2783. },
  2784. "value": {
  2785. "pos": 1
  2786. },
  2787. "version": 1001
  2788. },
  2789. {
  2790. "createTime": 0,
  2791. "key": "collection/b",
  2792. "options": {
  2793. "hasCommittedMutations": false,
  2794. "hasLocalMutations": false
  2795. },
  2796. "value": {
  2797. "pos": 2
  2798. },
  2799. "version": 1002
  2800. },
  2801. {
  2802. "createTime": 0,
  2803. "key": "collection/c",
  2804. "options": {
  2805. "hasCommittedMutations": false,
  2806. "hasLocalMutations": false
  2807. },
  2808. "value": {
  2809. "pos": 3
  2810. },
  2811. "version": 1003
  2812. }
  2813. ],
  2814. "errorCode": 0,
  2815. "fromCache": true,
  2816. "hasPendingWrites": false,
  2817. "query": {
  2818. "filters": [
  2819. ],
  2820. "orderBys": [
  2821. ],
  2822. "path": "collection"
  2823. }
  2824. }
  2825. ],
  2826. "expectedState": {
  2827. "activeTargets": {
  2828. "2": {
  2829. "queries": [
  2830. {
  2831. "filters": [
  2832. ],
  2833. "orderBys": [
  2834. ],
  2835. "path": "collection"
  2836. }
  2837. ],
  2838. "resumeToken": "resume-token-1003"
  2839. }
  2840. }
  2841. }
  2842. },
  2843. {
  2844. "watchAck": [
  2845. 2
  2846. ]
  2847. },
  2848. {
  2849. "watchEntity": {
  2850. "docs": [
  2851. {
  2852. "createTime": 0,
  2853. "key": "collection/a",
  2854. "options": {
  2855. "hasCommittedMutations": false,
  2856. "hasLocalMutations": false
  2857. },
  2858. "value": {
  2859. "pos": 4
  2860. },
  2861. "version": 1005
  2862. }
  2863. ],
  2864. "targets": [
  2865. 2
  2866. ]
  2867. }
  2868. },
  2869. {
  2870. "watchCurrent": [
  2871. [
  2872. 2
  2873. ],
  2874. "resume-token-1005"
  2875. ]
  2876. },
  2877. {
  2878. "watchSnapshot": {
  2879. "targetIds": [
  2880. ],
  2881. "version": 1005
  2882. },
  2883. "expectedSnapshotEvents": [
  2884. {
  2885. "errorCode": 0,
  2886. "fromCache": false,
  2887. "hasPendingWrites": false,
  2888. "modified": [
  2889. {
  2890. "createTime": 0,
  2891. "key": "collection/a",
  2892. "options": {
  2893. "hasCommittedMutations": false,
  2894. "hasLocalMutations": false
  2895. },
  2896. "value": {
  2897. "pos": 4
  2898. },
  2899. "version": 1005
  2900. }
  2901. ],
  2902. "query": {
  2903. "filters": [
  2904. ],
  2905. "orderBys": [
  2906. ],
  2907. "path": "collection"
  2908. }
  2909. }
  2910. ]
  2911. },
  2912. {
  2913. "userListen": {
  2914. "query": {
  2915. "filters": [
  2916. ],
  2917. "limit": 2,
  2918. "limitType": "LimitToFirst",
  2919. "orderBys": [
  2920. [
  2921. "pos",
  2922. "asc"
  2923. ]
  2924. ],
  2925. "path": "collection"
  2926. },
  2927. "targetId": 4
  2928. },
  2929. "expectedSnapshotEvents": [
  2930. {
  2931. "added": [
  2932. {
  2933. "createTime": 0,
  2934. "key": "collection/b",
  2935. "options": {
  2936. "hasCommittedMutations": false,
  2937. "hasLocalMutations": false
  2938. },
  2939. "value": {
  2940. "pos": 2
  2941. },
  2942. "version": 1002
  2943. },
  2944. {
  2945. "createTime": 0,
  2946. "key": "collection/c",
  2947. "options": {
  2948. "hasCommittedMutations": false,
  2949. "hasLocalMutations": false
  2950. },
  2951. "value": {
  2952. "pos": 3
  2953. },
  2954. "version": 1003
  2955. }
  2956. ],
  2957. "errorCode": 0,
  2958. "fromCache": true,
  2959. "hasPendingWrites": false,
  2960. "query": {
  2961. "filters": [
  2962. ],
  2963. "limit": 2,
  2964. "limitType": "LimitToFirst",
  2965. "orderBys": [
  2966. [
  2967. "pos",
  2968. "asc"
  2969. ]
  2970. ],
  2971. "path": "collection"
  2972. }
  2973. }
  2974. ],
  2975. "expectedState": {
  2976. "activeTargets": {
  2977. "2": {
  2978. "queries": [
  2979. {
  2980. "filters": [
  2981. ],
  2982. "orderBys": [
  2983. ],
  2984. "path": "collection"
  2985. }
  2986. ],
  2987. "resumeToken": "resume-token-1003"
  2988. },
  2989. "4": {
  2990. "queries": [
  2991. {
  2992. "filters": [
  2993. ],
  2994. "limit": 2,
  2995. "limitType": "LimitToFirst",
  2996. "orderBys": [
  2997. [
  2998. "pos",
  2999. "asc"
  3000. ]
  3001. ],
  3002. "path": "collection"
  3003. }
  3004. ],
  3005. "resumeToken": "resume-token-1004"
  3006. }
  3007. }
  3008. }
  3009. }
  3010. ]
  3011. },
  3012. "Limit query includes write from secondary client ": {
  3013. "describeName": "Limits:",
  3014. "itName": "Limit query includes write from secondary client ",
  3015. "tags": [
  3016. "multi-client"
  3017. ],
  3018. "config": {
  3019. "numClients": 3,
  3020. "useEagerGCForMemory": false
  3021. },
  3022. "steps": [
  3023. {
  3024. "clientIndex": 0,
  3025. "drainQueue": true
  3026. },
  3027. {
  3028. "applyClientState": {
  3029. "visibility": "visible"
  3030. },
  3031. "clientIndex": 0
  3032. },
  3033. {
  3034. "clientIndex": 1,
  3035. "drainQueue": true
  3036. },
  3037. {
  3038. "clientIndex": 1,
  3039. "userListen": {
  3040. "query": {
  3041. "filters": [
  3042. ],
  3043. "limit": 2,
  3044. "limitType": "LimitToFirst",
  3045. "orderBys": [
  3046. ],
  3047. "path": "collection"
  3048. },
  3049. "targetId": 2
  3050. },
  3051. "expectedState": {
  3052. "activeTargets": {
  3053. "2": {
  3054. "queries": [
  3055. {
  3056. "filters": [
  3057. ],
  3058. "limit": 2,
  3059. "limitType": "LimitToFirst",
  3060. "orderBys": [
  3061. ],
  3062. "path": "collection"
  3063. }
  3064. ],
  3065. "resumeToken": ""
  3066. }
  3067. }
  3068. }
  3069. },
  3070. {
  3071. "clientIndex": 0,
  3072. "drainQueue": true,
  3073. "expectedState": {
  3074. "activeTargets": {
  3075. "2": {
  3076. "queries": [
  3077. {
  3078. "filters": [
  3079. ],
  3080. "limit": 2,
  3081. "limitType": "LimitToFirst",
  3082. "orderBys": [
  3083. ],
  3084. "path": "collection"
  3085. }
  3086. ],
  3087. "resumeToken": ""
  3088. }
  3089. }
  3090. }
  3091. },
  3092. {
  3093. "clientIndex": 0,
  3094. "watchAck": [
  3095. 2
  3096. ]
  3097. },
  3098. {
  3099. "clientIndex": 0,
  3100. "watchEntity": {
  3101. "docs": [
  3102. {
  3103. "createTime": 0,
  3104. "key": "collection/b",
  3105. "options": {
  3106. "hasCommittedMutations": false,
  3107. "hasLocalMutations": false
  3108. },
  3109. "value": {
  3110. "key": "b"
  3111. },
  3112. "version": 1001
  3113. },
  3114. {
  3115. "createTime": 0,
  3116. "key": "collection/c",
  3117. "options": {
  3118. "hasCommittedMutations": false,
  3119. "hasLocalMutations": false
  3120. },
  3121. "value": {
  3122. "key": "c"
  3123. },
  3124. "version": 1002
  3125. }
  3126. ],
  3127. "targets": [
  3128. 2
  3129. ]
  3130. }
  3131. },
  3132. {
  3133. "clientIndex": 0,
  3134. "watchCurrent": [
  3135. [
  3136. 2
  3137. ],
  3138. "resume-token-1002"
  3139. ]
  3140. },
  3141. {
  3142. "clientIndex": 0,
  3143. "watchSnapshot": {
  3144. "targetIds": [
  3145. ],
  3146. "version": 1002
  3147. }
  3148. },
  3149. {
  3150. "clientIndex": 1,
  3151. "drainQueue": true,
  3152. "expectedSnapshotEvents": [
  3153. {
  3154. "added": [
  3155. {
  3156. "createTime": 0,
  3157. "key": "collection/b",
  3158. "options": {
  3159. "hasCommittedMutations": false,
  3160. "hasLocalMutations": false
  3161. },
  3162. "value": {
  3163. "key": "b"
  3164. },
  3165. "version": 1001
  3166. },
  3167. {
  3168. "createTime": 0,
  3169. "key": "collection/c",
  3170. "options": {
  3171. "hasCommittedMutations": false,
  3172. "hasLocalMutations": false
  3173. },
  3174. "value": {
  3175. "key": "c"
  3176. },
  3177. "version": 1002
  3178. }
  3179. ],
  3180. "errorCode": 0,
  3181. "fromCache": false,
  3182. "hasPendingWrites": false,
  3183. "query": {
  3184. "filters": [
  3185. ],
  3186. "limit": 2,
  3187. "limitType": "LimitToFirst",
  3188. "orderBys": [
  3189. ],
  3190. "path": "collection"
  3191. }
  3192. }
  3193. ]
  3194. },
  3195. {
  3196. "clientIndex": 2,
  3197. "drainQueue": true
  3198. },
  3199. {
  3200. "clientIndex": 2,
  3201. "userSet": [
  3202. "collection/a",
  3203. {
  3204. "key": "a"
  3205. }
  3206. ]
  3207. },
  3208. {
  3209. "clientIndex": 1,
  3210. "drainQueue": true,
  3211. "expectedSnapshotEvents": [
  3212. {
  3213. "added": [
  3214. {
  3215. "createTime": 0,
  3216. "key": "collection/a",
  3217. "options": {
  3218. "hasCommittedMutations": false,
  3219. "hasLocalMutations": true
  3220. },
  3221. "value": {
  3222. "key": "a"
  3223. },
  3224. "version": 0
  3225. }
  3226. ],
  3227. "errorCode": 0,
  3228. "fromCache": false,
  3229. "hasPendingWrites": true,
  3230. "query": {
  3231. "filters": [
  3232. ],
  3233. "limit": 2,
  3234. "limitType": "LimitToFirst",
  3235. "orderBys": [
  3236. ],
  3237. "path": "collection"
  3238. },
  3239. "removed": [
  3240. {
  3241. "createTime": 0,
  3242. "key": "collection/c",
  3243. "options": {
  3244. "hasCommittedMutations": false,
  3245. "hasLocalMutations": false
  3246. },
  3247. "value": {
  3248. "key": "c"
  3249. },
  3250. "version": 1002
  3251. }
  3252. ]
  3253. }
  3254. ]
  3255. },
  3256. {
  3257. "clientIndex": 0,
  3258. "drainQueue": true
  3259. },
  3260. {
  3261. "clientIndex": 0,
  3262. "writeAck": {
  3263. "version": 1003
  3264. }
  3265. },
  3266. {
  3267. "clientIndex": 0,
  3268. "watchEntity": {
  3269. "docs": [
  3270. {
  3271. "createTime": 0,
  3272. "key": "collection/a",
  3273. "options": {
  3274. "hasCommittedMutations": false,
  3275. "hasLocalMutations": false
  3276. },
  3277. "value": {
  3278. "key": "a"
  3279. },
  3280. "version": 1003
  3281. }
  3282. ],
  3283. "targets": [
  3284. 2
  3285. ]
  3286. }
  3287. },
  3288. {
  3289. "clientIndex": 0,
  3290. "watchEntity": {
  3291. "docs": [
  3292. {
  3293. "createTime": 0,
  3294. "key": "collection/c",
  3295. "options": {
  3296. "hasCommittedMutations": false,
  3297. "hasLocalMutations": false
  3298. },
  3299. "value": {
  3300. "key": "c"
  3301. },
  3302. "version": 1002
  3303. }
  3304. ],
  3305. "removedTargets": [
  3306. 2
  3307. ]
  3308. }
  3309. },
  3310. {
  3311. "clientIndex": 0,
  3312. "watchSnapshot": {
  3313. "targetIds": [
  3314. ],
  3315. "version": 1003
  3316. }
  3317. },
  3318. {
  3319. "clientIndex": 1,
  3320. "drainQueue": true,
  3321. "expectedSnapshotEvents": [
  3322. {
  3323. "errorCode": 0,
  3324. "fromCache": false,
  3325. "hasPendingWrites": false,
  3326. "metadata": [
  3327. {
  3328. "createTime": 0,
  3329. "key": "collection/a",
  3330. "options": {
  3331. "hasCommittedMutations": false,
  3332. "hasLocalMutations": false
  3333. },
  3334. "value": {
  3335. "key": "a"
  3336. },
  3337. "version": 1003
  3338. }
  3339. ],
  3340. "query": {
  3341. "filters": [
  3342. ],
  3343. "limit": 2,
  3344. "limitType": "LimitToFirst",
  3345. "orderBys": [
  3346. ],
  3347. "path": "collection"
  3348. }
  3349. }
  3350. ]
  3351. },
  3352. {
  3353. "clientIndex": 2,
  3354. "drainQueue": true,
  3355. "expectedState": {
  3356. "userCallbacks": {
  3357. "acknowledgedDocs": [
  3358. "collection/a"
  3359. ],
  3360. "rejectedDocs": [
  3361. ]
  3362. }
  3363. }
  3364. }
  3365. ]
  3366. },
  3367. "Limit query is refilled by primary client": {
  3368. "describeName": "Limits:",
  3369. "itName": "Limit query is refilled by primary client",
  3370. "tags": [
  3371. "multi-client"
  3372. ],
  3373. "config": {
  3374. "numClients": 2,
  3375. "useEagerGCForMemory": false
  3376. },
  3377. "steps": [
  3378. {
  3379. "clientIndex": 0,
  3380. "drainQueue": true
  3381. },
  3382. {
  3383. "applyClientState": {
  3384. "visibility": "visible"
  3385. },
  3386. "clientIndex": 0
  3387. },
  3388. {
  3389. "clientIndex": 1,
  3390. "drainQueue": true
  3391. },
  3392. {
  3393. "clientIndex": 1,
  3394. "userListen": {
  3395. "query": {
  3396. "filters": [
  3397. ],
  3398. "limit": 2,
  3399. "limitType": "LimitToFirst",
  3400. "orderBys": [
  3401. ],
  3402. "path": "collection"
  3403. },
  3404. "targetId": 2
  3405. },
  3406. "expectedState": {
  3407. "activeTargets": {
  3408. "2": {
  3409. "queries": [
  3410. {
  3411. "filters": [
  3412. ],
  3413. "limit": 2,
  3414. "limitType": "LimitToFirst",
  3415. "orderBys": [
  3416. ],
  3417. "path": "collection"
  3418. }
  3419. ],
  3420. "resumeToken": ""
  3421. }
  3422. }
  3423. }
  3424. },
  3425. {
  3426. "clientIndex": 0,
  3427. "drainQueue": true,
  3428. "expectedState": {
  3429. "activeTargets": {
  3430. "2": {
  3431. "queries": [
  3432. {
  3433. "filters": [
  3434. ],
  3435. "limit": 2,
  3436. "limitType": "LimitToFirst",
  3437. "orderBys": [
  3438. ],
  3439. "path": "collection"
  3440. }
  3441. ],
  3442. "resumeToken": ""
  3443. }
  3444. }
  3445. }
  3446. },
  3447. {
  3448. "clientIndex": 0,
  3449. "watchAck": [
  3450. 2
  3451. ]
  3452. },
  3453. {
  3454. "clientIndex": 0,
  3455. "watchEntity": {
  3456. "docs": [
  3457. {
  3458. "createTime": 0,
  3459. "key": "collection/a",
  3460. "options": {
  3461. "hasCommittedMutations": false,
  3462. "hasLocalMutations": false
  3463. },
  3464. "value": {
  3465. "key": "a"
  3466. },
  3467. "version": 1000
  3468. },
  3469. {
  3470. "createTime": 0,
  3471. "key": "collection/c",
  3472. "options": {
  3473. "hasCommittedMutations": false,
  3474. "hasLocalMutations": false
  3475. },
  3476. "value": {
  3477. "key": "c"
  3478. },
  3479. "version": 1001
  3480. }
  3481. ],
  3482. "targets": [
  3483. 2
  3484. ]
  3485. }
  3486. },
  3487. {
  3488. "clientIndex": 0,
  3489. "watchCurrent": [
  3490. [
  3491. 2
  3492. ],
  3493. "resume-token-1001"
  3494. ]
  3495. },
  3496. {
  3497. "clientIndex": 0,
  3498. "watchSnapshot": {
  3499. "targetIds": [
  3500. ],
  3501. "version": 1001
  3502. }
  3503. },
  3504. {
  3505. "clientIndex": 1,
  3506. "drainQueue": true,
  3507. "expectedSnapshotEvents": [
  3508. {
  3509. "added": [
  3510. {
  3511. "createTime": 0,
  3512. "key": "collection/a",
  3513. "options": {
  3514. "hasCommittedMutations": false,
  3515. "hasLocalMutations": false
  3516. },
  3517. "value": {
  3518. "key": "a"
  3519. },
  3520. "version": 1000
  3521. },
  3522. {
  3523. "createTime": 0,
  3524. "key": "collection/c",
  3525. "options": {
  3526. "hasCommittedMutations": false,
  3527. "hasLocalMutations": false
  3528. },
  3529. "value": {
  3530. "key": "c"
  3531. },
  3532. "version": 1001
  3533. }
  3534. ],
  3535. "errorCode": 0,
  3536. "fromCache": false,
  3537. "hasPendingWrites": false,
  3538. "query": {
  3539. "filters": [
  3540. ],
  3541. "limit": 2,
  3542. "limitType": "LimitToFirst",
  3543. "orderBys": [
  3544. ],
  3545. "path": "collection"
  3546. }
  3547. }
  3548. ]
  3549. },
  3550. {
  3551. "clientIndex": 0,
  3552. "drainQueue": true
  3553. },
  3554. {
  3555. "clientIndex": 0,
  3556. "watchEntity": {
  3557. "docs": [
  3558. {
  3559. "createTime": 0,
  3560. "key": "collection/b",
  3561. "options": {
  3562. "hasCommittedMutations": false,
  3563. "hasLocalMutations": false
  3564. },
  3565. "value": {
  3566. "key": "b"
  3567. },
  3568. "version": 1002
  3569. }
  3570. ],
  3571. "targets": [
  3572. 2
  3573. ]
  3574. }
  3575. },
  3576. {
  3577. "clientIndex": 0,
  3578. "watchEntity": {
  3579. "docs": [
  3580. {
  3581. "createTime": 0,
  3582. "key": "collection/c",
  3583. "options": {
  3584. "hasCommittedMutations": false,
  3585. "hasLocalMutations": false
  3586. },
  3587. "value": {
  3588. "key": "c"
  3589. },
  3590. "version": 1001
  3591. }
  3592. ],
  3593. "removedTargets": [
  3594. 2
  3595. ]
  3596. }
  3597. },
  3598. {
  3599. "clientIndex": 0,
  3600. "watchSnapshot": {
  3601. "targetIds": [
  3602. ],
  3603. "version": 1002
  3604. }
  3605. },
  3606. {
  3607. "clientIndex": 1,
  3608. "drainQueue": true,
  3609. "expectedSnapshotEvents": [
  3610. {
  3611. "added": [
  3612. {
  3613. "createTime": 0,
  3614. "key": "collection/b",
  3615. "options": {
  3616. "hasCommittedMutations": false,
  3617. "hasLocalMutations": false
  3618. },
  3619. "value": {
  3620. "key": "b"
  3621. },
  3622. "version": 1002
  3623. }
  3624. ],
  3625. "errorCode": 0,
  3626. "fromCache": false,
  3627. "hasPendingWrites": false,
  3628. "query": {
  3629. "filters": [
  3630. ],
  3631. "limit": 2,
  3632. "limitType": "LimitToFirst",
  3633. "orderBys": [
  3634. ],
  3635. "path": "collection"
  3636. },
  3637. "removed": [
  3638. {
  3639. "createTime": 0,
  3640. "key": "collection/c",
  3641. "options": {
  3642. "hasCommittedMutations": false,
  3643. "hasLocalMutations": false
  3644. },
  3645. "value": {
  3646. "key": "c"
  3647. },
  3648. "version": 1001
  3649. }
  3650. ]
  3651. }
  3652. ]
  3653. }
  3654. ]
  3655. },
  3656. "Limits are re-filled from cache": {
  3657. "describeName": "Limits:",
  3658. "itName": "Limits are re-filled from cache",
  3659. "tags": [
  3660. ],
  3661. "config": {
  3662. "numClients": 1,
  3663. "useEagerGCForMemory": false
  3664. },
  3665. "steps": [
  3666. {
  3667. "userListen": {
  3668. "query": {
  3669. "filters": [
  3670. [
  3671. "matches",
  3672. "==",
  3673. true
  3674. ]
  3675. ],
  3676. "orderBys": [
  3677. ],
  3678. "path": "collection"
  3679. },
  3680. "targetId": 2
  3681. },
  3682. "expectedState": {
  3683. "activeTargets": {
  3684. "2": {
  3685. "queries": [
  3686. {
  3687. "filters": [
  3688. [
  3689. "matches",
  3690. "==",
  3691. true
  3692. ]
  3693. ],
  3694. "orderBys": [
  3695. ],
  3696. "path": "collection"
  3697. }
  3698. ],
  3699. "resumeToken": ""
  3700. }
  3701. }
  3702. }
  3703. },
  3704. {
  3705. "watchAck": [
  3706. 2
  3707. ]
  3708. },
  3709. {
  3710. "watchEntity": {
  3711. "docs": [
  3712. {
  3713. "createTime": 0,
  3714. "key": "collection/a",
  3715. "options": {
  3716. "hasCommittedMutations": false,
  3717. "hasLocalMutations": false
  3718. },
  3719. "value": {
  3720. "matches": true
  3721. },
  3722. "version": 1001
  3723. },
  3724. {
  3725. "createTime": 0,
  3726. "key": "collection/b",
  3727. "options": {
  3728. "hasCommittedMutations": false,
  3729. "hasLocalMutations": false
  3730. },
  3731. "value": {
  3732. "matches": true
  3733. },
  3734. "version": 1002
  3735. },
  3736. {
  3737. "createTime": 0,
  3738. "key": "collection/c",
  3739. "options": {
  3740. "hasCommittedMutations": false,
  3741. "hasLocalMutations": false
  3742. },
  3743. "value": {
  3744. "matches": true
  3745. },
  3746. "version": 1000
  3747. }
  3748. ],
  3749. "targets": [
  3750. 2
  3751. ]
  3752. }
  3753. },
  3754. {
  3755. "watchCurrent": [
  3756. [
  3757. 2
  3758. ],
  3759. "resume-token-1002"
  3760. ]
  3761. },
  3762. {
  3763. "watchSnapshot": {
  3764. "targetIds": [
  3765. ],
  3766. "version": 1002
  3767. },
  3768. "expectedSnapshotEvents": [
  3769. {
  3770. "added": [
  3771. {
  3772. "createTime": 0,
  3773. "key": "collection/a",
  3774. "options": {
  3775. "hasCommittedMutations": false,
  3776. "hasLocalMutations": false
  3777. },
  3778. "value": {
  3779. "matches": true
  3780. },
  3781. "version": 1001
  3782. },
  3783. {
  3784. "createTime": 0,
  3785. "key": "collection/b",
  3786. "options": {
  3787. "hasCommittedMutations": false,
  3788. "hasLocalMutations": false
  3789. },
  3790. "value": {
  3791. "matches": true
  3792. },
  3793. "version": 1002
  3794. },
  3795. {
  3796. "createTime": 0,
  3797. "key": "collection/c",
  3798. "options": {
  3799. "hasCommittedMutations": false,
  3800. "hasLocalMutations": false
  3801. },
  3802. "value": {
  3803. "matches": true
  3804. },
  3805. "version": 1000
  3806. }
  3807. ],
  3808. "errorCode": 0,
  3809. "fromCache": false,
  3810. "hasPendingWrites": false,
  3811. "query": {
  3812. "filters": [
  3813. [
  3814. "matches",
  3815. "==",
  3816. true
  3817. ]
  3818. ],
  3819. "orderBys": [
  3820. ],
  3821. "path": "collection"
  3822. }
  3823. }
  3824. ]
  3825. },
  3826. {
  3827. "userUnlisten": [
  3828. 2,
  3829. {
  3830. "filters": [
  3831. [
  3832. "matches",
  3833. "==",
  3834. true
  3835. ]
  3836. ],
  3837. "orderBys": [
  3838. ],
  3839. "path": "collection"
  3840. }
  3841. ],
  3842. "expectedState": {
  3843. "activeTargets": {
  3844. }
  3845. }
  3846. },
  3847. {
  3848. "userListen": {
  3849. "query": {
  3850. "filters": [
  3851. [
  3852. "matches",
  3853. "==",
  3854. true
  3855. ]
  3856. ],
  3857. "limit": 2,
  3858. "limitType": "LimitToFirst",
  3859. "orderBys": [
  3860. ],
  3861. "path": "collection"
  3862. },
  3863. "targetId": 4
  3864. },
  3865. "expectedSnapshotEvents": [
  3866. {
  3867. "added": [
  3868. {
  3869. "createTime": 0,
  3870. "key": "collection/a",
  3871. "options": {
  3872. "hasCommittedMutations": false,
  3873. "hasLocalMutations": false
  3874. },
  3875. "value": {
  3876. "matches": true
  3877. },
  3878. "version": 1001
  3879. },
  3880. {
  3881. "createTime": 0,
  3882. "key": "collection/b",
  3883. "options": {
  3884. "hasCommittedMutations": false,
  3885. "hasLocalMutations": false
  3886. },
  3887. "value": {
  3888. "matches": true
  3889. },
  3890. "version": 1002
  3891. }
  3892. ],
  3893. "errorCode": 0,
  3894. "fromCache": true,
  3895. "hasPendingWrites": false,
  3896. "query": {
  3897. "filters": [
  3898. [
  3899. "matches",
  3900. "==",
  3901. true
  3902. ]
  3903. ],
  3904. "limit": 2,
  3905. "limitType": "LimitToFirst",
  3906. "orderBys": [
  3907. ],
  3908. "path": "collection"
  3909. }
  3910. }
  3911. ],
  3912. "expectedState": {
  3913. "activeTargets": {
  3914. "4": {
  3915. "queries": [
  3916. {
  3917. "filters": [
  3918. [
  3919. "matches",
  3920. "==",
  3921. true
  3922. ]
  3923. ],
  3924. "limit": 2,
  3925. "limitType": "LimitToFirst",
  3926. "orderBys": [
  3927. ],
  3928. "path": "collection"
  3929. }
  3930. ],
  3931. "resumeToken": ""
  3932. }
  3933. }
  3934. }
  3935. },
  3936. {
  3937. "userSet": [
  3938. "collection/a",
  3939. {
  3940. "matches": false
  3941. }
  3942. ],
  3943. "expectedSnapshotEvents": [
  3944. {
  3945. "added": [
  3946. {
  3947. "createTime": 0,
  3948. "key": "collection/c",
  3949. "options": {
  3950. "hasCommittedMutations": false,
  3951. "hasLocalMutations": false
  3952. },
  3953. "value": {
  3954. "matches": true
  3955. },
  3956. "version": 1000
  3957. }
  3958. ],
  3959. "errorCode": 0,
  3960. "fromCache": true,
  3961. "hasPendingWrites": false,
  3962. "query": {
  3963. "filters": [
  3964. [
  3965. "matches",
  3966. "==",
  3967. true
  3968. ]
  3969. ],
  3970. "limit": 2,
  3971. "limitType": "LimitToFirst",
  3972. "orderBys": [
  3973. ],
  3974. "path": "collection"
  3975. },
  3976. "removed": [
  3977. {
  3978. "createTime": 0,
  3979. "key": "collection/a",
  3980. "options": {
  3981. "hasCommittedMutations": false,
  3982. "hasLocalMutations": false
  3983. },
  3984. "value": {
  3985. "matches": true
  3986. },
  3987. "version": 1001
  3988. }
  3989. ]
  3990. }
  3991. ]
  3992. }
  3993. ]
  3994. },
  3995. "Multiple docs in limbo in full limit query": {
  3996. "describeName": "Limits:",
  3997. "itName": "Multiple docs in limbo in full limit query",
  3998. "tags": [
  3999. ],
  4000. "config": {
  4001. "numClients": 1,
  4002. "useEagerGCForMemory": true
  4003. },
  4004. "steps": [
  4005. {
  4006. "userListen": {
  4007. "query": {
  4008. "filters": [
  4009. ],
  4010. "limit": 2,
  4011. "limitType": "LimitToFirst",
  4012. "orderBys": [
  4013. ],
  4014. "path": "collection"
  4015. },
  4016. "targetId": 2
  4017. },
  4018. "expectedState": {
  4019. "activeTargets": {
  4020. "2": {
  4021. "queries": [
  4022. {
  4023. "filters": [
  4024. ],
  4025. "limit": 2,
  4026. "limitType": "LimitToFirst",
  4027. "orderBys": [
  4028. ],
  4029. "path": "collection"
  4030. }
  4031. ],
  4032. "resumeToken": ""
  4033. }
  4034. }
  4035. }
  4036. },
  4037. {
  4038. "watchAck": [
  4039. 2
  4040. ]
  4041. },
  4042. {
  4043. "watchEntity": {
  4044. "docs": [
  4045. {
  4046. "createTime": 0,
  4047. "key": "collection/a",
  4048. "options": {
  4049. "hasCommittedMutations": false,
  4050. "hasLocalMutations": false
  4051. },
  4052. "value": {
  4053. "key": "a"
  4054. },
  4055. "version": 1000
  4056. },
  4057. {
  4058. "createTime": 0,
  4059. "key": "collection/b",
  4060. "options": {
  4061. "hasCommittedMutations": false,
  4062. "hasLocalMutations": false
  4063. },
  4064. "value": {
  4065. "key": "b"
  4066. },
  4067. "version": 1001
  4068. }
  4069. ],
  4070. "targets": [
  4071. 2
  4072. ]
  4073. }
  4074. },
  4075. {
  4076. "watchCurrent": [
  4077. [
  4078. 2
  4079. ],
  4080. "resume-token-1001"
  4081. ]
  4082. },
  4083. {
  4084. "watchSnapshot": {
  4085. "targetIds": [
  4086. ],
  4087. "version": 1001
  4088. },
  4089. "expectedSnapshotEvents": [
  4090. {
  4091. "added": [
  4092. {
  4093. "createTime": 0,
  4094. "key": "collection/a",
  4095. "options": {
  4096. "hasCommittedMutations": false,
  4097. "hasLocalMutations": false
  4098. },
  4099. "value": {
  4100. "key": "a"
  4101. },
  4102. "version": 1000
  4103. },
  4104. {
  4105. "createTime": 0,
  4106. "key": "collection/b",
  4107. "options": {
  4108. "hasCommittedMutations": false,
  4109. "hasLocalMutations": false
  4110. },
  4111. "value": {
  4112. "key": "b"
  4113. },
  4114. "version": 1001
  4115. }
  4116. ],
  4117. "errorCode": 0,
  4118. "fromCache": false,
  4119. "hasPendingWrites": false,
  4120. "query": {
  4121. "filters": [
  4122. ],
  4123. "limit": 2,
  4124. "limitType": "LimitToFirst",
  4125. "orderBys": [
  4126. ],
  4127. "path": "collection"
  4128. }
  4129. }
  4130. ]
  4131. },
  4132. {
  4133. "userListen": {
  4134. "query": {
  4135. "filters": [
  4136. ],
  4137. "orderBys": [
  4138. ],
  4139. "path": "collection"
  4140. },
  4141. "targetId": 4
  4142. },
  4143. "expectedSnapshotEvents": [
  4144. {
  4145. "added": [
  4146. {
  4147. "createTime": 0,
  4148. "key": "collection/a",
  4149. "options": {
  4150. "hasCommittedMutations": false,
  4151. "hasLocalMutations": false
  4152. },
  4153. "value": {
  4154. "key": "a"
  4155. },
  4156. "version": 1000
  4157. },
  4158. {
  4159. "createTime": 0,
  4160. "key": "collection/b",
  4161. "options": {
  4162. "hasCommittedMutations": false,
  4163. "hasLocalMutations": false
  4164. },
  4165. "value": {
  4166. "key": "b"
  4167. },
  4168. "version": 1001
  4169. }
  4170. ],
  4171. "errorCode": 0,
  4172. "fromCache": true,
  4173. "hasPendingWrites": false,
  4174. "query": {
  4175. "filters": [
  4176. ],
  4177. "orderBys": [
  4178. ],
  4179. "path": "collection"
  4180. }
  4181. }
  4182. ],
  4183. "expectedState": {
  4184. "activeTargets": {
  4185. "2": {
  4186. "queries": [
  4187. {
  4188. "filters": [
  4189. ],
  4190. "limit": 2,
  4191. "limitType": "LimitToFirst",
  4192. "orderBys": [
  4193. ],
  4194. "path": "collection"
  4195. }
  4196. ],
  4197. "resumeToken": ""
  4198. },
  4199. "4": {
  4200. "queries": [
  4201. {
  4202. "filters": [
  4203. ],
  4204. "orderBys": [
  4205. ],
  4206. "path": "collection"
  4207. }
  4208. ],
  4209. "resumeToken": ""
  4210. }
  4211. }
  4212. }
  4213. },
  4214. {
  4215. "watchAck": [
  4216. 4
  4217. ]
  4218. },
  4219. {
  4220. "watchEntity": {
  4221. "docs": [
  4222. {
  4223. "createTime": 0,
  4224. "key": "collection/a",
  4225. "options": {
  4226. "hasCommittedMutations": false,
  4227. "hasLocalMutations": false
  4228. },
  4229. "value": {
  4230. "key": "a"
  4231. },
  4232. "version": 1000
  4233. },
  4234. {
  4235. "createTime": 0,
  4236. "key": "collection/b",
  4237. "options": {
  4238. "hasCommittedMutations": false,
  4239. "hasLocalMutations": false
  4240. },
  4241. "value": {
  4242. "key": "b"
  4243. },
  4244. "version": 1001
  4245. },
  4246. {
  4247. "createTime": 0,
  4248. "key": "collection/c",
  4249. "options": {
  4250. "hasCommittedMutations": false,
  4251. "hasLocalMutations": false
  4252. },
  4253. "value": {
  4254. "key": "c"
  4255. },
  4256. "version": 1002
  4257. },
  4258. {
  4259. "createTime": 0,
  4260. "key": "collection/d",
  4261. "options": {
  4262. "hasCommittedMutations": false,
  4263. "hasLocalMutations": false
  4264. },
  4265. "value": {
  4266. "key": "d"
  4267. },
  4268. "version": 1003
  4269. },
  4270. {
  4271. "createTime": 0,
  4272. "key": "collection/e",
  4273. "options": {
  4274. "hasCommittedMutations": false,
  4275. "hasLocalMutations": false
  4276. },
  4277. "value": {
  4278. "key": "e"
  4279. },
  4280. "version": 1004
  4281. },
  4282. {
  4283. "createTime": 0,
  4284. "key": "collection/f",
  4285. "options": {
  4286. "hasCommittedMutations": false,
  4287. "hasLocalMutations": false
  4288. },
  4289. "value": {
  4290. "key": "f"
  4291. },
  4292. "version": 1005
  4293. }
  4294. ],
  4295. "targets": [
  4296. 4
  4297. ]
  4298. }
  4299. },
  4300. {
  4301. "watchCurrent": [
  4302. [
  4303. 4
  4304. ],
  4305. "resume-token-1005"
  4306. ]
  4307. },
  4308. {
  4309. "watchSnapshot": {
  4310. "targetIds": [
  4311. ],
  4312. "version": 1005
  4313. },
  4314. "expectedSnapshotEvents": [
  4315. {
  4316. "added": [
  4317. {
  4318. "createTime": 0,
  4319. "key": "collection/c",
  4320. "options": {
  4321. "hasCommittedMutations": false,
  4322. "hasLocalMutations": false
  4323. },
  4324. "value": {
  4325. "key": "c"
  4326. },
  4327. "version": 1002
  4328. },
  4329. {
  4330. "createTime": 0,
  4331. "key": "collection/d",
  4332. "options": {
  4333. "hasCommittedMutations": false,
  4334. "hasLocalMutations": false
  4335. },
  4336. "value": {
  4337. "key": "d"
  4338. },
  4339. "version": 1003
  4340. },
  4341. {
  4342. "createTime": 0,
  4343. "key": "collection/e",
  4344. "options": {
  4345. "hasCommittedMutations": false,
  4346. "hasLocalMutations": false
  4347. },
  4348. "value": {
  4349. "key": "e"
  4350. },
  4351. "version": 1004
  4352. },
  4353. {
  4354. "createTime": 0,
  4355. "key": "collection/f",
  4356. "options": {
  4357. "hasCommittedMutations": false,
  4358. "hasLocalMutations": false
  4359. },
  4360. "value": {
  4361. "key": "f"
  4362. },
  4363. "version": 1005
  4364. }
  4365. ],
  4366. "errorCode": 0,
  4367. "fromCache": false,
  4368. "hasPendingWrites": false,
  4369. "query": {
  4370. "filters": [
  4371. ],
  4372. "orderBys": [
  4373. ],
  4374. "path": "collection"
  4375. }
  4376. }
  4377. ]
  4378. },
  4379. {
  4380. "watchReset": [
  4381. 2
  4382. ]
  4383. },
  4384. {
  4385. "watchEntity": {
  4386. "docs": [
  4387. {
  4388. "createTime": 0,
  4389. "key": "collection/e",
  4390. "options": {
  4391. "hasCommittedMutations": false,
  4392. "hasLocalMutations": false
  4393. },
  4394. "value": {
  4395. "key": "e"
  4396. },
  4397. "version": 1004
  4398. },
  4399. {
  4400. "createTime": 0,
  4401. "key": "collection/f",
  4402. "options": {
  4403. "hasCommittedMutations": false,
  4404. "hasLocalMutations": false
  4405. },
  4406. "value": {
  4407. "key": "f"
  4408. },
  4409. "version": 1005
  4410. }
  4411. ],
  4412. "targets": [
  4413. 2
  4414. ]
  4415. }
  4416. },
  4417. {
  4418. "watchCurrent": [
  4419. [
  4420. 2
  4421. ],
  4422. "resume-token-2000"
  4423. ]
  4424. },
  4425. {
  4426. "watchSnapshot": {
  4427. "targetIds": [
  4428. ],
  4429. "version": 2000
  4430. },
  4431. "expectedSnapshotEvents": [
  4432. {
  4433. "errorCode": 0,
  4434. "fromCache": true,
  4435. "hasPendingWrites": false,
  4436. "query": {
  4437. "filters": [
  4438. ],
  4439. "limit": 2,
  4440. "limitType": "LimitToFirst",
  4441. "orderBys": [
  4442. ],
  4443. "path": "collection"
  4444. }
  4445. }
  4446. ],
  4447. "expectedState": {
  4448. "activeLimboDocs": [
  4449. "collection/a",
  4450. "collection/b"
  4451. ],
  4452. "activeTargets": {
  4453. "1": {
  4454. "queries": [
  4455. {
  4456. "filters": [
  4457. ],
  4458. "orderBys": [
  4459. ],
  4460. "path": "collection/a"
  4461. }
  4462. ],
  4463. "resumeToken": "",
  4464. "targetPurpose": "TargetPurposeLimboResolution"
  4465. },
  4466. "2": {
  4467. "queries": [
  4468. {
  4469. "filters": [
  4470. ],
  4471. "limit": 2,
  4472. "limitType": "LimitToFirst",
  4473. "orderBys": [
  4474. ],
  4475. "path": "collection"
  4476. }
  4477. ],
  4478. "resumeToken": ""
  4479. },
  4480. "3": {
  4481. "queries": [
  4482. {
  4483. "filters": [
  4484. ],
  4485. "orderBys": [
  4486. ],
  4487. "path": "collection/b"
  4488. }
  4489. ],
  4490. "resumeToken": "",
  4491. "targetPurpose": "TargetPurposeLimboResolution"
  4492. },
  4493. "4": {
  4494. "queries": [
  4495. {
  4496. "filters": [
  4497. ],
  4498. "orderBys": [
  4499. ],
  4500. "path": "collection"
  4501. }
  4502. ],
  4503. "resumeToken": ""
  4504. }
  4505. }
  4506. }
  4507. },
  4508. {
  4509. "watchAck": [
  4510. 1
  4511. ]
  4512. },
  4513. {
  4514. "watchCurrent": [
  4515. [
  4516. 1
  4517. ],
  4518. "resume-token-2000"
  4519. ]
  4520. },
  4521. {
  4522. "watchSnapshot": {
  4523. "targetIds": [
  4524. ],
  4525. "version": 2000
  4526. },
  4527. "expectedSnapshotEvents": [
  4528. {
  4529. "errorCode": 0,
  4530. "fromCache": false,
  4531. "hasPendingWrites": false,
  4532. "query": {
  4533. "filters": [
  4534. ],
  4535. "orderBys": [
  4536. ],
  4537. "path": "collection"
  4538. },
  4539. "removed": [
  4540. {
  4541. "createTime": 0,
  4542. "key": "collection/a",
  4543. "options": {
  4544. "hasCommittedMutations": false,
  4545. "hasLocalMutations": false
  4546. },
  4547. "value": {
  4548. "key": "a"
  4549. },
  4550. "version": 1000
  4551. }
  4552. ]
  4553. },
  4554. {
  4555. "added": [
  4556. {
  4557. "createTime": 0,
  4558. "key": "collection/c",
  4559. "options": {
  4560. "hasCommittedMutations": false,
  4561. "hasLocalMutations": false
  4562. },
  4563. "value": {
  4564. "key": "c"
  4565. },
  4566. "version": 1002
  4567. }
  4568. ],
  4569. "errorCode": 0,
  4570. "fromCache": true,
  4571. "hasPendingWrites": false,
  4572. "query": {
  4573. "filters": [
  4574. ],
  4575. "limit": 2,
  4576. "limitType": "LimitToFirst",
  4577. "orderBys": [
  4578. ],
  4579. "path": "collection"
  4580. },
  4581. "removed": [
  4582. {
  4583. "createTime": 0,
  4584. "key": "collection/a",
  4585. "options": {
  4586. "hasCommittedMutations": false,
  4587. "hasLocalMutations": false
  4588. },
  4589. "value": {
  4590. "key": "a"
  4591. },
  4592. "version": 1000
  4593. }
  4594. ]
  4595. }
  4596. ],
  4597. "expectedState": {
  4598. "activeLimboDocs": [
  4599. "collection/b",
  4600. "collection/c"
  4601. ],
  4602. "activeTargets": {
  4603. "2": {
  4604. "queries": [
  4605. {
  4606. "filters": [
  4607. ],
  4608. "limit": 2,
  4609. "limitType": "LimitToFirst",
  4610. "orderBys": [
  4611. ],
  4612. "path": "collection"
  4613. }
  4614. ],
  4615. "resumeToken": ""
  4616. },
  4617. "3": {
  4618. "queries": [
  4619. {
  4620. "filters": [
  4621. ],
  4622. "orderBys": [
  4623. ],
  4624. "path": "collection/b"
  4625. }
  4626. ],
  4627. "resumeToken": "",
  4628. "targetPurpose": "TargetPurposeLimboResolution"
  4629. },
  4630. "4": {
  4631. "queries": [
  4632. {
  4633. "filters": [
  4634. ],
  4635. "orderBys": [
  4636. ],
  4637. "path": "collection"
  4638. }
  4639. ],
  4640. "resumeToken": ""
  4641. },
  4642. "5": {
  4643. "queries": [
  4644. {
  4645. "filters": [
  4646. ],
  4647. "orderBys": [
  4648. ],
  4649. "path": "collection/c"
  4650. }
  4651. ],
  4652. "resumeToken": "",
  4653. "targetPurpose": "TargetPurposeLimboResolution"
  4654. }
  4655. }
  4656. }
  4657. },
  4658. {
  4659. "watchRemove": {
  4660. "targetIds": [
  4661. 1
  4662. ]
  4663. }
  4664. },
  4665. {
  4666. "watchAck": [
  4667. 3
  4668. ]
  4669. },
  4670. {
  4671. "watchCurrent": [
  4672. [
  4673. 3
  4674. ],
  4675. "resume-token-2001"
  4676. ]
  4677. },
  4678. {
  4679. "watchSnapshot": {
  4680. "targetIds": [
  4681. ],
  4682. "version": 2001
  4683. },
  4684. "expectedSnapshotEvents": [
  4685. {
  4686. "errorCode": 0,
  4687. "fromCache": false,
  4688. "hasPendingWrites": false,
  4689. "query": {
  4690. "filters": [
  4691. ],
  4692. "orderBys": [
  4693. ],
  4694. "path": "collection"
  4695. },
  4696. "removed": [
  4697. {
  4698. "createTime": 0,
  4699. "key": "collection/b",
  4700. "options": {
  4701. "hasCommittedMutations": false,
  4702. "hasLocalMutations": false
  4703. },
  4704. "value": {
  4705. "key": "b"
  4706. },
  4707. "version": 1001
  4708. }
  4709. ]
  4710. },
  4711. {
  4712. "added": [
  4713. {
  4714. "createTime": 0,
  4715. "key": "collection/d",
  4716. "options": {
  4717. "hasCommittedMutations": false,
  4718. "hasLocalMutations": false
  4719. },
  4720. "value": {
  4721. "key": "d"
  4722. },
  4723. "version": 1003
  4724. }
  4725. ],
  4726. "errorCode": 0,
  4727. "fromCache": true,
  4728. "hasPendingWrites": false,
  4729. "query": {
  4730. "filters": [
  4731. ],
  4732. "limit": 2,
  4733. "limitType": "LimitToFirst",
  4734. "orderBys": [
  4735. ],
  4736. "path": "collection"
  4737. },
  4738. "removed": [
  4739. {
  4740. "createTime": 0,
  4741. "key": "collection/b",
  4742. "options": {
  4743. "hasCommittedMutations": false,
  4744. "hasLocalMutations": false
  4745. },
  4746. "value": {
  4747. "key": "b"
  4748. },
  4749. "version": 1001
  4750. }
  4751. ]
  4752. }
  4753. ],
  4754. "expectedState": {
  4755. "activeLimboDocs": [
  4756. "collection/c",
  4757. "collection/d"
  4758. ],
  4759. "activeTargets": {
  4760. "2": {
  4761. "queries": [
  4762. {
  4763. "filters": [
  4764. ],
  4765. "limit": 2,
  4766. "limitType": "LimitToFirst",
  4767. "orderBys": [
  4768. ],
  4769. "path": "collection"
  4770. }
  4771. ],
  4772. "resumeToken": ""
  4773. },
  4774. "4": {
  4775. "queries": [
  4776. {
  4777. "filters": [
  4778. ],
  4779. "orderBys": [
  4780. ],
  4781. "path": "collection"
  4782. }
  4783. ],
  4784. "resumeToken": ""
  4785. },
  4786. "5": {
  4787. "queries": [
  4788. {
  4789. "filters": [
  4790. ],
  4791. "orderBys": [
  4792. ],
  4793. "path": "collection/c"
  4794. }
  4795. ],
  4796. "resumeToken": "",
  4797. "targetPurpose": "TargetPurposeLimboResolution"
  4798. },
  4799. "7": {
  4800. "queries": [
  4801. {
  4802. "filters": [
  4803. ],
  4804. "orderBys": [
  4805. ],
  4806. "path": "collection/d"
  4807. }
  4808. ],
  4809. "resumeToken": "",
  4810. "targetPurpose": "TargetPurposeLimboResolution"
  4811. }
  4812. }
  4813. }
  4814. },
  4815. {
  4816. "watchRemove": {
  4817. "targetIds": [
  4818. 3
  4819. ]
  4820. }
  4821. },
  4822. {
  4823. "watchAck": [
  4824. 5
  4825. ]
  4826. },
  4827. {
  4828. "watchCurrent": [
  4829. [
  4830. 5
  4831. ],
  4832. "resume-token-2002"
  4833. ]
  4834. },
  4835. {
  4836. "watchSnapshot": {
  4837. "targetIds": [
  4838. ],
  4839. "version": 2002
  4840. },
  4841. "expectedSnapshotEvents": [
  4842. {
  4843. "errorCode": 0,
  4844. "fromCache": false,
  4845. "hasPendingWrites": false,
  4846. "query": {
  4847. "filters": [
  4848. ],
  4849. "orderBys": [
  4850. ],
  4851. "path": "collection"
  4852. },
  4853. "removed": [
  4854. {
  4855. "createTime": 0,
  4856. "key": "collection/c",
  4857. "options": {
  4858. "hasCommittedMutations": false,
  4859. "hasLocalMutations": false
  4860. },
  4861. "value": {
  4862. "key": "c"
  4863. },
  4864. "version": 1002
  4865. }
  4866. ]
  4867. },
  4868. {
  4869. "added": [
  4870. {
  4871. "createTime": 0,
  4872. "key": "collection/e",
  4873. "options": {
  4874. "hasCommittedMutations": false,
  4875. "hasLocalMutations": false
  4876. },
  4877. "value": {
  4878. "key": "e"
  4879. },
  4880. "version": 1004
  4881. }
  4882. ],
  4883. "errorCode": 0,
  4884. "fromCache": true,
  4885. "hasPendingWrites": false,
  4886. "query": {
  4887. "filters": [
  4888. ],
  4889. "limit": 2,
  4890. "limitType": "LimitToFirst",
  4891. "orderBys": [
  4892. ],
  4893. "path": "collection"
  4894. },
  4895. "removed": [
  4896. {
  4897. "createTime": 0,
  4898. "key": "collection/c",
  4899. "options": {
  4900. "hasCommittedMutations": false,
  4901. "hasLocalMutations": false
  4902. },
  4903. "value": {
  4904. "key": "c"
  4905. },
  4906. "version": 1002
  4907. }
  4908. ]
  4909. }
  4910. ],
  4911. "expectedState": {
  4912. "activeLimboDocs": [
  4913. "collection/d"
  4914. ],
  4915. "activeTargets": {
  4916. "2": {
  4917. "queries": [
  4918. {
  4919. "filters": [
  4920. ],
  4921. "limit": 2,
  4922. "limitType": "LimitToFirst",
  4923. "orderBys": [
  4924. ],
  4925. "path": "collection"
  4926. }
  4927. ],
  4928. "resumeToken": ""
  4929. },
  4930. "4": {
  4931. "queries": [
  4932. {
  4933. "filters": [
  4934. ],
  4935. "orderBys": [
  4936. ],
  4937. "path": "collection"
  4938. }
  4939. ],
  4940. "resumeToken": ""
  4941. },
  4942. "7": {
  4943. "queries": [
  4944. {
  4945. "filters": [
  4946. ],
  4947. "orderBys": [
  4948. ],
  4949. "path": "collection/d"
  4950. }
  4951. ],
  4952. "resumeToken": "",
  4953. "targetPurpose": "TargetPurposeLimboResolution"
  4954. }
  4955. }
  4956. }
  4957. },
  4958. {
  4959. "watchRemove": {
  4960. "targetIds": [
  4961. 5
  4962. ]
  4963. }
  4964. },
  4965. {
  4966. "watchAck": [
  4967. 7
  4968. ]
  4969. },
  4970. {
  4971. "watchCurrent": [
  4972. [
  4973. 7
  4974. ],
  4975. "resume-token-2003"
  4976. ]
  4977. },
  4978. {
  4979. "watchSnapshot": {
  4980. "targetIds": [
  4981. ],
  4982. "version": 2003
  4983. },
  4984. "expectedSnapshotEvents": [
  4985. {
  4986. "errorCode": 0,
  4987. "fromCache": false,
  4988. "hasPendingWrites": false,
  4989. "query": {
  4990. "filters": [
  4991. ],
  4992. "orderBys": [
  4993. ],
  4994. "path": "collection"
  4995. },
  4996. "removed": [
  4997. {
  4998. "createTime": 0,
  4999. "key": "collection/d",
  5000. "options": {
  5001. "hasCommittedMutations": false,
  5002. "hasLocalMutations": false
  5003. },
  5004. "value": {
  5005. "key": "d"
  5006. },
  5007. "version": 1003
  5008. }
  5009. ]
  5010. },
  5011. {
  5012. "added": [
  5013. {
  5014. "createTime": 0,
  5015. "key": "collection/f",
  5016. "options": {
  5017. "hasCommittedMutations": false,
  5018. "hasLocalMutations": false
  5019. },
  5020. "value": {
  5021. "key": "f"
  5022. },
  5023. "version": 1005
  5024. }
  5025. ],
  5026. "errorCode": 0,
  5027. "fromCache": false,
  5028. "hasPendingWrites": false,
  5029. "query": {
  5030. "filters": [
  5031. ],
  5032. "limit": 2,
  5033. "limitType": "LimitToFirst",
  5034. "orderBys": [
  5035. ],
  5036. "path": "collection"
  5037. },
  5038. "removed": [
  5039. {
  5040. "createTime": 0,
  5041. "key": "collection/d",
  5042. "options": {
  5043. "hasCommittedMutations": false,
  5044. "hasLocalMutations": false
  5045. },
  5046. "value": {
  5047. "key": "d"
  5048. },
  5049. "version": 1003
  5050. }
  5051. ]
  5052. }
  5053. ],
  5054. "expectedState": {
  5055. "activeLimboDocs": [
  5056. ],
  5057. "activeTargets": {
  5058. "2": {
  5059. "queries": [
  5060. {
  5061. "filters": [
  5062. ],
  5063. "limit": 2,
  5064. "limitType": "LimitToFirst",
  5065. "orderBys": [
  5066. ],
  5067. "path": "collection"
  5068. }
  5069. ],
  5070. "resumeToken": ""
  5071. },
  5072. "4": {
  5073. "queries": [
  5074. {
  5075. "filters": [
  5076. ],
  5077. "orderBys": [
  5078. ],
  5079. "path": "collection"
  5080. }
  5081. ],
  5082. "resumeToken": ""
  5083. }
  5084. }
  5085. }
  5086. },
  5087. {
  5088. "watchRemove": {
  5089. "targetIds": [
  5090. 7
  5091. ]
  5092. }
  5093. }
  5094. ]
  5095. },
  5096. "Resumed limit queries exclude deleted documents ": {
  5097. "describeName": "Limits:",
  5098. "itName": "Resumed limit queries exclude deleted documents ",
  5099. "tags": [
  5100. "durable-persistence"
  5101. ],
  5102. "config": {
  5103. "numClients": 1,
  5104. "useEagerGCForMemory": false
  5105. },
  5106. "steps": [
  5107. {
  5108. "userListen": {
  5109. "query": {
  5110. "filters": [
  5111. ],
  5112. "limit": 1,
  5113. "limitType": "LimitToFirst",
  5114. "orderBys": [
  5115. [
  5116. "a",
  5117. "asc"
  5118. ]
  5119. ],
  5120. "path": "collection"
  5121. },
  5122. "targetId": 2
  5123. },
  5124. "expectedState": {
  5125. "activeTargets": {
  5126. "2": {
  5127. "queries": [
  5128. {
  5129. "filters": [
  5130. ],
  5131. "limit": 1,
  5132. "limitType": "LimitToFirst",
  5133. "orderBys": [
  5134. [
  5135. "a",
  5136. "asc"
  5137. ]
  5138. ],
  5139. "path": "collection"
  5140. }
  5141. ],
  5142. "resumeToken": ""
  5143. }
  5144. }
  5145. }
  5146. },
  5147. {
  5148. "watchAck": [
  5149. 2
  5150. ]
  5151. },
  5152. {
  5153. "watchEntity": {
  5154. "docs": [
  5155. {
  5156. "createTime": 0,
  5157. "key": "collection/a",
  5158. "options": {
  5159. "hasCommittedMutations": false,
  5160. "hasLocalMutations": false
  5161. },
  5162. "value": {
  5163. "a": 1
  5164. },
  5165. "version": 1001
  5166. }
  5167. ],
  5168. "targets": [
  5169. 2
  5170. ]
  5171. }
  5172. },
  5173. {
  5174. "watchCurrent": [
  5175. [
  5176. 2
  5177. ],
  5178. "resume-token-1001"
  5179. ]
  5180. },
  5181. {
  5182. "watchSnapshot": {
  5183. "targetIds": [
  5184. ],
  5185. "version": 1001
  5186. },
  5187. "expectedSnapshotEvents": [
  5188. {
  5189. "added": [
  5190. {
  5191. "createTime": 0,
  5192. "key": "collection/a",
  5193. "options": {
  5194. "hasCommittedMutations": false,
  5195. "hasLocalMutations": false
  5196. },
  5197. "value": {
  5198. "a": 1
  5199. },
  5200. "version": 1001
  5201. }
  5202. ],
  5203. "errorCode": 0,
  5204. "fromCache": false,
  5205. "hasPendingWrites": false,
  5206. "query": {
  5207. "filters": [
  5208. ],
  5209. "limit": 1,
  5210. "limitType": "LimitToFirst",
  5211. "orderBys": [
  5212. [
  5213. "a",
  5214. "asc"
  5215. ]
  5216. ],
  5217. "path": "collection"
  5218. }
  5219. }
  5220. ]
  5221. },
  5222. {
  5223. "userUnlisten": [
  5224. 2,
  5225. {
  5226. "filters": [
  5227. ],
  5228. "limit": 1,
  5229. "limitType": "LimitToFirst",
  5230. "orderBys": [
  5231. [
  5232. "a",
  5233. "asc"
  5234. ]
  5235. ],
  5236. "path": "collection"
  5237. }
  5238. ],
  5239. "expectedState": {
  5240. "activeTargets": {
  5241. }
  5242. }
  5243. },
  5244. {
  5245. "watchRemove": {
  5246. "targetIds": [
  5247. 2
  5248. ]
  5249. }
  5250. },
  5251. {
  5252. "userListen": {
  5253. "query": {
  5254. "filters": [
  5255. ],
  5256. "orderBys": [
  5257. [
  5258. "a",
  5259. "asc"
  5260. ]
  5261. ],
  5262. "path": "collection"
  5263. },
  5264. "targetId": 4
  5265. },
  5266. "expectedSnapshotEvents": [
  5267. {
  5268. "added": [
  5269. {
  5270. "createTime": 0,
  5271. "key": "collection/a",
  5272. "options": {
  5273. "hasCommittedMutations": false,
  5274. "hasLocalMutations": false
  5275. },
  5276. "value": {
  5277. "a": 1
  5278. },
  5279. "version": 1001
  5280. }
  5281. ],
  5282. "errorCode": 0,
  5283. "fromCache": true,
  5284. "hasPendingWrites": false,
  5285. "query": {
  5286. "filters": [
  5287. ],
  5288. "orderBys": [
  5289. [
  5290. "a",
  5291. "asc"
  5292. ]
  5293. ],
  5294. "path": "collection"
  5295. }
  5296. }
  5297. ],
  5298. "expectedState": {
  5299. "activeTargets": {
  5300. "4": {
  5301. "queries": [
  5302. {
  5303. "filters": [
  5304. ],
  5305. "orderBys": [
  5306. [
  5307. "a",
  5308. "asc"
  5309. ]
  5310. ],
  5311. "path": "collection"
  5312. }
  5313. ],
  5314. "resumeToken": ""
  5315. }
  5316. }
  5317. }
  5318. },
  5319. {
  5320. "watchAck": [
  5321. 4
  5322. ]
  5323. },
  5324. {
  5325. "watchEntity": {
  5326. "docs": [
  5327. {
  5328. "createTime": 0,
  5329. "key": "collection/a",
  5330. "options": {
  5331. "hasCommittedMutations": false,
  5332. "hasLocalMutations": false
  5333. },
  5334. "value": {
  5335. "a": 1
  5336. },
  5337. "version": 1001
  5338. },
  5339. {
  5340. "createTime": 0,
  5341. "key": "collection/b",
  5342. "options": {
  5343. "hasCommittedMutations": false,
  5344. "hasLocalMutations": false
  5345. },
  5346. "value": {
  5347. "a": 2
  5348. },
  5349. "version": 1000
  5350. }
  5351. ],
  5352. "targets": [
  5353. 4
  5354. ]
  5355. }
  5356. },
  5357. {
  5358. "watchCurrent": [
  5359. [
  5360. 4
  5361. ],
  5362. "resume-token-1002"
  5363. ]
  5364. },
  5365. {
  5366. "watchSnapshot": {
  5367. "targetIds": [
  5368. ],
  5369. "version": 1002
  5370. },
  5371. "expectedSnapshotEvents": [
  5372. {
  5373. "added": [
  5374. {
  5375. "createTime": 0,
  5376. "key": "collection/b",
  5377. "options": {
  5378. "hasCommittedMutations": false,
  5379. "hasLocalMutations": false
  5380. },
  5381. "value": {
  5382. "a": 2
  5383. },
  5384. "version": 1000
  5385. }
  5386. ],
  5387. "errorCode": 0,
  5388. "fromCache": false,
  5389. "hasPendingWrites": false,
  5390. "query": {
  5391. "filters": [
  5392. ],
  5393. "orderBys": [
  5394. [
  5395. "a",
  5396. "asc"
  5397. ]
  5398. ],
  5399. "path": "collection"
  5400. }
  5401. }
  5402. ]
  5403. },
  5404. {
  5405. "watchEntity": {
  5406. "key": "collection/a",
  5407. "removedTargets": [
  5408. 4
  5409. ]
  5410. }
  5411. },
  5412. {
  5413. "watchSnapshot": {
  5414. "targetIds": [
  5415. ],
  5416. "version": 1003
  5417. },
  5418. "expectedSnapshotEvents": [
  5419. {
  5420. "errorCode": 0,
  5421. "fromCache": true,
  5422. "hasPendingWrites": false,
  5423. "query": {
  5424. "filters": [
  5425. ],
  5426. "orderBys": [
  5427. [
  5428. "a",
  5429. "asc"
  5430. ]
  5431. ],
  5432. "path": "collection"
  5433. }
  5434. }
  5435. ],
  5436. "expectedState": {
  5437. "activeLimboDocs": [
  5438. "collection/a"
  5439. ],
  5440. "activeTargets": {
  5441. "1": {
  5442. "queries": [
  5443. {
  5444. "filters": [
  5445. ],
  5446. "orderBys": [
  5447. ],
  5448. "path": "collection/a"
  5449. }
  5450. ],
  5451. "resumeToken": "",
  5452. "targetPurpose": "TargetPurposeLimboResolution"
  5453. },
  5454. "4": {
  5455. "queries": [
  5456. {
  5457. "filters": [
  5458. ],
  5459. "orderBys": [
  5460. [
  5461. "a",
  5462. "asc"
  5463. ]
  5464. ],
  5465. "path": "collection"
  5466. }
  5467. ],
  5468. "resumeToken": ""
  5469. }
  5470. }
  5471. }
  5472. },
  5473. {
  5474. "userUnlisten": [
  5475. 4,
  5476. {
  5477. "filters": [
  5478. ],
  5479. "orderBys": [
  5480. [
  5481. "a",
  5482. "asc"
  5483. ]
  5484. ],
  5485. "path": "collection"
  5486. }
  5487. ],
  5488. "expectedState": {
  5489. "activeLimboDocs": [
  5490. ],
  5491. "activeTargets": {
  5492. }
  5493. }
  5494. },
  5495. {
  5496. "watchRemove": {
  5497. "targetIds": [
  5498. 4
  5499. ]
  5500. }
  5501. },
  5502. {
  5503. "restart": true,
  5504. "expectedState": {
  5505. "activeLimboDocs": [
  5506. ],
  5507. "activeTargets": {
  5508. },
  5509. "enqueuedLimboDocs": [
  5510. ]
  5511. }
  5512. },
  5513. {
  5514. "userListen": {
  5515. "query": {
  5516. "filters": [
  5517. ],
  5518. "limit": 1,
  5519. "limitType": "LimitToFirst",
  5520. "orderBys": [
  5521. [
  5522. "a",
  5523. "asc"
  5524. ]
  5525. ],
  5526. "path": "collection"
  5527. },
  5528. "targetId": 2
  5529. },
  5530. "expectedSnapshotEvents": [
  5531. {
  5532. "added": [
  5533. {
  5534. "createTime": 0,
  5535. "key": "collection/a",
  5536. "options": {
  5537. "hasCommittedMutations": false,
  5538. "hasLocalMutations": false
  5539. },
  5540. "value": {
  5541. "a": 1
  5542. },
  5543. "version": 1001
  5544. }
  5545. ],
  5546. "errorCode": 0,
  5547. "fromCache": true,
  5548. "hasPendingWrites": false,
  5549. "query": {
  5550. "filters": [
  5551. ],
  5552. "limit": 1,
  5553. "limitType": "LimitToFirst",
  5554. "orderBys": [
  5555. [
  5556. "a",
  5557. "asc"
  5558. ]
  5559. ],
  5560. "path": "collection"
  5561. }
  5562. }
  5563. ],
  5564. "expectedState": {
  5565. "activeTargets": {
  5566. "2": {
  5567. "queries": [
  5568. {
  5569. "filters": [
  5570. ],
  5571. "limit": 1,
  5572. "limitType": "LimitToFirst",
  5573. "orderBys": [
  5574. [
  5575. "a",
  5576. "asc"
  5577. ]
  5578. ],
  5579. "path": "collection"
  5580. }
  5581. ],
  5582. "resumeToken": "resume-token-1001"
  5583. }
  5584. }
  5585. }
  5586. },
  5587. {
  5588. "watchAck": [
  5589. 2
  5590. ]
  5591. },
  5592. {
  5593. "watchEntity": {
  5594. "docs": [
  5595. {
  5596. "createTime": 0,
  5597. "key": "collection/b",
  5598. "options": {
  5599. "hasCommittedMutations": false,
  5600. "hasLocalMutations": false
  5601. },
  5602. "value": {
  5603. "a": 2
  5604. },
  5605. "version": 1000
  5606. }
  5607. ],
  5608. "targets": [
  5609. 2
  5610. ]
  5611. }
  5612. },
  5613. {
  5614. "watchFilter": {
  5615. "keys": [
  5616. "collection/b"
  5617. ],
  5618. "targetIds": [
  5619. 2
  5620. ]
  5621. }
  5622. },
  5623. {
  5624. "watchCurrent": [
  5625. [
  5626. 2
  5627. ],
  5628. "resume-token-1004"
  5629. ]
  5630. },
  5631. {
  5632. "watchSnapshot": {
  5633. "targetIds": [
  5634. ],
  5635. "version": 1004
  5636. },
  5637. "expectedState": {
  5638. "activeTargets": {
  5639. "2": {
  5640. "queries": [
  5641. {
  5642. "filters": [
  5643. ],
  5644. "limit": 1,
  5645. "limitType": "LimitToFirst",
  5646. "orderBys": [
  5647. [
  5648. "a",
  5649. "asc"
  5650. ]
  5651. ],
  5652. "path": "collection"
  5653. }
  5654. ],
  5655. "resumeToken": "",
  5656. "targetPurpose": "TargetPurposeExistenceFilterMismatch"
  5657. }
  5658. }
  5659. }
  5660. },
  5661. {
  5662. "watchRemove": {
  5663. "targetIds": [
  5664. 2
  5665. ]
  5666. }
  5667. },
  5668. {
  5669. "watchAck": [
  5670. 2
  5671. ]
  5672. },
  5673. {
  5674. "watchEntity": {
  5675. "docs": [
  5676. {
  5677. "createTime": 0,
  5678. "key": "collection/b",
  5679. "options": {
  5680. "hasCommittedMutations": false,
  5681. "hasLocalMutations": false
  5682. },
  5683. "value": {
  5684. "a": 2
  5685. },
  5686. "version": 1000
  5687. }
  5688. ],
  5689. "targets": [
  5690. 2
  5691. ]
  5692. }
  5693. },
  5694. {
  5695. "watchCurrent": [
  5696. [
  5697. 2
  5698. ],
  5699. "resume-token-1005"
  5700. ]
  5701. },
  5702. {
  5703. "watchSnapshot": {
  5704. "targetIds": [
  5705. ],
  5706. "version": 1005
  5707. },
  5708. "expectedState": {
  5709. "activeLimboDocs": [
  5710. "collection/a"
  5711. ],
  5712. "activeTargets": {
  5713. "1": {
  5714. "queries": [
  5715. {
  5716. "filters": [
  5717. ],
  5718. "orderBys": [
  5719. ],
  5720. "path": "collection/a"
  5721. }
  5722. ],
  5723. "resumeToken": "",
  5724. "targetPurpose": "TargetPurposeLimboResolution"
  5725. },
  5726. "2": {
  5727. "queries": [
  5728. {
  5729. "filters": [
  5730. ],
  5731. "limit": 1,
  5732. "limitType": "LimitToFirst",
  5733. "orderBys": [
  5734. [
  5735. "a",
  5736. "asc"
  5737. ]
  5738. ],
  5739. "path": "collection"
  5740. }
  5741. ],
  5742. "resumeToken": "",
  5743. "targetPurpose": "TargetPurposeExistenceFilterMismatch"
  5744. }
  5745. }
  5746. }
  5747. },
  5748. {
  5749. "watchAck": [
  5750. 1
  5751. ]
  5752. },
  5753. {
  5754. "watchCurrent": [
  5755. [
  5756. 1
  5757. ],
  5758. "resume-token-1006"
  5759. ]
  5760. },
  5761. {
  5762. "watchSnapshot": {
  5763. "targetIds": [
  5764. ],
  5765. "version": 1006
  5766. },
  5767. "expectedSnapshotEvents": [
  5768. {
  5769. "added": [
  5770. {
  5771. "createTime": 0,
  5772. "key": "collection/b",
  5773. "options": {
  5774. "hasCommittedMutations": false,
  5775. "hasLocalMutations": false
  5776. },
  5777. "value": {
  5778. "a": 2
  5779. },
  5780. "version": 1000
  5781. }
  5782. ],
  5783. "errorCode": 0,
  5784. "fromCache": false,
  5785. "hasPendingWrites": false,
  5786. "query": {
  5787. "filters": [
  5788. ],
  5789. "limit": 1,
  5790. "limitType": "LimitToFirst",
  5791. "orderBys": [
  5792. [
  5793. "a",
  5794. "asc"
  5795. ]
  5796. ],
  5797. "path": "collection"
  5798. },
  5799. "removed": [
  5800. {
  5801. "createTime": 0,
  5802. "key": "collection/a",
  5803. "options": {
  5804. "hasCommittedMutations": false,
  5805. "hasLocalMutations": false
  5806. },
  5807. "value": {
  5808. "a": 1
  5809. },
  5810. "version": 1001
  5811. }
  5812. ]
  5813. }
  5814. ],
  5815. "expectedState": {
  5816. "activeLimboDocs": [
  5817. ],
  5818. "activeTargets": {
  5819. "2": {
  5820. "queries": [
  5821. {
  5822. "filters": [
  5823. ],
  5824. "limit": 1,
  5825. "limitType": "LimitToFirst",
  5826. "orderBys": [
  5827. [
  5828. "a",
  5829. "asc"
  5830. ]
  5831. ],
  5832. "path": "collection"
  5833. }
  5834. ],
  5835. "resumeToken": "",
  5836. "targetPurpose": "TargetPurposeExistenceFilterMismatch"
  5837. }
  5838. }
  5839. }
  5840. }
  5841. ]
  5842. },
  5843. "Resumed limit queries use updated documents ": {
  5844. "describeName": "Limits:",
  5845. "itName": "Resumed limit queries use updated documents ",
  5846. "tags": [
  5847. ],
  5848. "config": {
  5849. "numClients": 1,
  5850. "useEagerGCForMemory": false
  5851. },
  5852. "steps": [
  5853. {
  5854. "userListen": {
  5855. "query": {
  5856. "filters": [
  5857. ],
  5858. "limit": 1,
  5859. "limitType": "LimitToFirst",
  5860. "orderBys": [
  5861. [
  5862. "a",
  5863. "asc"
  5864. ]
  5865. ],
  5866. "path": "collection"
  5867. },
  5868. "targetId": 2
  5869. },
  5870. "expectedState": {
  5871. "activeTargets": {
  5872. "2": {
  5873. "queries": [
  5874. {
  5875. "filters": [
  5876. ],
  5877. "limit": 1,
  5878. "limitType": "LimitToFirst",
  5879. "orderBys": [
  5880. [
  5881. "a",
  5882. "asc"
  5883. ]
  5884. ],
  5885. "path": "collection"
  5886. }
  5887. ],
  5888. "resumeToken": ""
  5889. }
  5890. }
  5891. }
  5892. },
  5893. {
  5894. "watchAck": [
  5895. 2
  5896. ]
  5897. },
  5898. {
  5899. "watchEntity": {
  5900. "docs": [
  5901. {
  5902. "createTime": 0,
  5903. "key": "collection/a",
  5904. "options": {
  5905. "hasCommittedMutations": false,
  5906. "hasLocalMutations": false
  5907. },
  5908. "value": {
  5909. "a": 1
  5910. },
  5911. "version": 2001
  5912. }
  5913. ],
  5914. "targets": [
  5915. 2
  5916. ]
  5917. }
  5918. },
  5919. {
  5920. "watchCurrent": [
  5921. [
  5922. 2
  5923. ],
  5924. "resume-token-2001"
  5925. ]
  5926. },
  5927. {
  5928. "watchSnapshot": {
  5929. "targetIds": [
  5930. ],
  5931. "version": 2001
  5932. },
  5933. "expectedSnapshotEvents": [
  5934. {
  5935. "added": [
  5936. {
  5937. "createTime": 0,
  5938. "key": "collection/a",
  5939. "options": {
  5940. "hasCommittedMutations": false,
  5941. "hasLocalMutations": false
  5942. },
  5943. "value": {
  5944. "a": 1
  5945. },
  5946. "version": 2001
  5947. }
  5948. ],
  5949. "errorCode": 0,
  5950. "fromCache": false,
  5951. "hasPendingWrites": false,
  5952. "query": {
  5953. "filters": [
  5954. ],
  5955. "limit": 1,
  5956. "limitType": "LimitToFirst",
  5957. "orderBys": [
  5958. [
  5959. "a",
  5960. "asc"
  5961. ]
  5962. ],
  5963. "path": "collection"
  5964. }
  5965. }
  5966. ]
  5967. },
  5968. {
  5969. "userUnlisten": [
  5970. 2,
  5971. {
  5972. "filters": [
  5973. ],
  5974. "limit": 1,
  5975. "limitType": "LimitToFirst",
  5976. "orderBys": [
  5977. [
  5978. "a",
  5979. "asc"
  5980. ]
  5981. ],
  5982. "path": "collection"
  5983. }
  5984. ],
  5985. "expectedState": {
  5986. "activeTargets": {
  5987. }
  5988. }
  5989. },
  5990. {
  5991. "watchRemove": {
  5992. "targetIds": [
  5993. 2
  5994. ]
  5995. }
  5996. },
  5997. {
  5998. "userListen": {
  5999. "query": {
  6000. "filters": [
  6001. ],
  6002. "orderBys": [
  6003. [
  6004. "a",
  6005. "asc"
  6006. ]
  6007. ],
  6008. "path": "collection"
  6009. },
  6010. "targetId": 4
  6011. },
  6012. "expectedSnapshotEvents": [
  6013. {
  6014. "added": [
  6015. {
  6016. "createTime": 0,
  6017. "key": "collection/a",
  6018. "options": {
  6019. "hasCommittedMutations": false,
  6020. "hasLocalMutations": false
  6021. },
  6022. "value": {
  6023. "a": 1
  6024. },
  6025. "version": 2001
  6026. }
  6027. ],
  6028. "errorCode": 0,
  6029. "fromCache": true,
  6030. "hasPendingWrites": false,
  6031. "query": {
  6032. "filters": [
  6033. ],
  6034. "orderBys": [
  6035. [
  6036. "a",
  6037. "asc"
  6038. ]
  6039. ],
  6040. "path": "collection"
  6041. }
  6042. }
  6043. ],
  6044. "expectedState": {
  6045. "activeTargets": {
  6046. "4": {
  6047. "queries": [
  6048. {
  6049. "filters": [
  6050. ],
  6051. "orderBys": [
  6052. [
  6053. "a",
  6054. "asc"
  6055. ]
  6056. ],
  6057. "path": "collection"
  6058. }
  6059. ],
  6060. "resumeToken": ""
  6061. }
  6062. }
  6063. }
  6064. },
  6065. {
  6066. "watchAck": [
  6067. 4
  6068. ]
  6069. },
  6070. {
  6071. "watchEntity": {
  6072. "docs": [
  6073. {
  6074. "createTime": 0,
  6075. "key": "collection/a",
  6076. "options": {
  6077. "hasCommittedMutations": false,
  6078. "hasLocalMutations": false
  6079. },
  6080. "value": {
  6081. "a": 3
  6082. },
  6083. "version": 2003
  6084. },
  6085. {
  6086. "createTime": 0,
  6087. "key": "collection/c",
  6088. "options": {
  6089. "hasCommittedMutations": false,
  6090. "hasLocalMutations": false
  6091. },
  6092. "value": {
  6093. "a": 2
  6094. },
  6095. "version": 1000
  6096. }
  6097. ],
  6098. "targets": [
  6099. 4
  6100. ]
  6101. }
  6102. },
  6103. {
  6104. "watchCurrent": [
  6105. [
  6106. 4
  6107. ],
  6108. "resume-token-2003"
  6109. ]
  6110. },
  6111. {
  6112. "watchSnapshot": {
  6113. "targetIds": [
  6114. ],
  6115. "version": 2003
  6116. },
  6117. "expectedSnapshotEvents": [
  6118. {
  6119. "added": [
  6120. {
  6121. "createTime": 0,
  6122. "key": "collection/c",
  6123. "options": {
  6124. "hasCommittedMutations": false,
  6125. "hasLocalMutations": false
  6126. },
  6127. "value": {
  6128. "a": 2
  6129. },
  6130. "version": 1000
  6131. }
  6132. ],
  6133. "errorCode": 0,
  6134. "fromCache": false,
  6135. "hasPendingWrites": false,
  6136. "modified": [
  6137. {
  6138. "createTime": 0,
  6139. "key": "collection/a",
  6140. "options": {
  6141. "hasCommittedMutations": false,
  6142. "hasLocalMutations": false
  6143. },
  6144. "value": {
  6145. "a": 3
  6146. },
  6147. "version": 2003
  6148. }
  6149. ],
  6150. "query": {
  6151. "filters": [
  6152. ],
  6153. "orderBys": [
  6154. [
  6155. "a",
  6156. "asc"
  6157. ]
  6158. ],
  6159. "path": "collection"
  6160. }
  6161. }
  6162. ]
  6163. },
  6164. {
  6165. "userUnlisten": [
  6166. 4,
  6167. {
  6168. "filters": [
  6169. ],
  6170. "orderBys": [
  6171. [
  6172. "a",
  6173. "asc"
  6174. ]
  6175. ],
  6176. "path": "collection"
  6177. }
  6178. ],
  6179. "expectedState": {
  6180. "activeTargets": {
  6181. }
  6182. }
  6183. },
  6184. {
  6185. "watchRemove": {
  6186. "targetIds": [
  6187. 4
  6188. ]
  6189. }
  6190. },
  6191. {
  6192. "userListen": {
  6193. "query": {
  6194. "filters": [
  6195. ],
  6196. "limit": 1,
  6197. "limitType": "LimitToFirst",
  6198. "orderBys": [
  6199. [
  6200. "a",
  6201. "asc"
  6202. ]
  6203. ],
  6204. "path": "collection"
  6205. },
  6206. "targetId": 2
  6207. },
  6208. "expectedSnapshotEvents": [
  6209. {
  6210. "added": [
  6211. {
  6212. "createTime": 0,
  6213. "key": "collection/c",
  6214. "options": {
  6215. "hasCommittedMutations": false,
  6216. "hasLocalMutations": false
  6217. },
  6218. "value": {
  6219. "a": 2
  6220. },
  6221. "version": 1000
  6222. }
  6223. ],
  6224. "errorCode": 0,
  6225. "fromCache": true,
  6226. "hasPendingWrites": false,
  6227. "query": {
  6228. "filters": [
  6229. ],
  6230. "limit": 1,
  6231. "limitType": "LimitToFirst",
  6232. "orderBys": [
  6233. [
  6234. "a",
  6235. "asc"
  6236. ]
  6237. ],
  6238. "path": "collection"
  6239. }
  6240. }
  6241. ],
  6242. "expectedState": {
  6243. "activeTargets": {
  6244. "2": {
  6245. "queries": [
  6246. {
  6247. "filters": [
  6248. ],
  6249. "limit": 1,
  6250. "limitType": "LimitToFirst",
  6251. "orderBys": [
  6252. [
  6253. "a",
  6254. "asc"
  6255. ]
  6256. ],
  6257. "path": "collection"
  6258. }
  6259. ],
  6260. "resumeToken": "resume-token-2001"
  6261. }
  6262. }
  6263. }
  6264. }
  6265. ]
  6266. }
  6267. }