limit_spec_test.json 143 KB

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