limit_spec_test.json 138 KB

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