limbo_spec_test.json 218 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928
  1. {
  2. "A limbo resolution for a document should be removed from the queue when the last query listen stops": {
  3. "describeName": "Limbo Documents:",
  4. "itName": "A limbo resolution for a document should be removed from the queue when the last query listen stops",
  5. "tags": [
  6. ],
  7. "config": {
  8. "maxConcurrentLimboResolutions": 1,
  9. "numClients": 1,
  10. "useGarbageCollection": false
  11. },
  12. "steps": [
  13. {
  14. "userListen": {
  15. "query": {
  16. "filters": [
  17. ],
  18. "orderBys": [
  19. ],
  20. "path": "collection1"
  21. },
  22. "targetId": 2
  23. },
  24. "expectedState": {
  25. "activeTargets": {
  26. "2": {
  27. "queries": [
  28. {
  29. "filters": [
  30. ],
  31. "orderBys": [
  32. ],
  33. "path": "collection1"
  34. }
  35. ],
  36. "resumeToken": ""
  37. }
  38. }
  39. }
  40. },
  41. {
  42. "watchAck": [
  43. 2
  44. ]
  45. },
  46. {
  47. "watchEntity": {
  48. "docs": [
  49. {
  50. "key": "collection1/doc",
  51. "options": {
  52. "hasCommittedMutations": false,
  53. "hasLocalMutations": false
  54. },
  55. "value": {
  56. "key": 1
  57. },
  58. "version": 1000
  59. }
  60. ],
  61. "targets": [
  62. 2
  63. ]
  64. }
  65. },
  66. {
  67. "watchCurrent": [
  68. [
  69. 2
  70. ],
  71. "resume-token-1000"
  72. ]
  73. },
  74. {
  75. "watchSnapshot": {
  76. "targetIds": [
  77. ],
  78. "version": 1000
  79. },
  80. "expectedSnapshotEvents": [
  81. {
  82. "added": [
  83. {
  84. "key": "collection1/doc",
  85. "options": {
  86. "hasCommittedMutations": false,
  87. "hasLocalMutations": false
  88. },
  89. "value": {
  90. "key": 1
  91. },
  92. "version": 1000
  93. }
  94. ],
  95. "errorCode": 0,
  96. "fromCache": false,
  97. "hasPendingWrites": false,
  98. "query": {
  99. "filters": [
  100. ],
  101. "orderBys": [
  102. ],
  103. "path": "collection1"
  104. }
  105. }
  106. ]
  107. },
  108. {
  109. "userUnlisten": [
  110. 2,
  111. {
  112. "filters": [
  113. ],
  114. "orderBys": [
  115. ],
  116. "path": "collection1"
  117. }
  118. ],
  119. "expectedState": {
  120. "activeTargets": {
  121. }
  122. }
  123. },
  124. {
  125. "userListen": {
  126. "query": {
  127. "filters": [
  128. [
  129. "key",
  130. "==",
  131. 1
  132. ]
  133. ],
  134. "orderBys": [
  135. ],
  136. "path": "collection1"
  137. },
  138. "targetId": 4
  139. },
  140. "expectedSnapshotEvents": [
  141. {
  142. "added": [
  143. {
  144. "key": "collection1/doc",
  145. "options": {
  146. "hasCommittedMutations": false,
  147. "hasLocalMutations": false
  148. },
  149. "value": {
  150. "key": 1
  151. },
  152. "version": 1000
  153. }
  154. ],
  155. "errorCode": 0,
  156. "fromCache": true,
  157. "hasPendingWrites": false,
  158. "query": {
  159. "filters": [
  160. [
  161. "key",
  162. "==",
  163. 1
  164. ]
  165. ],
  166. "orderBys": [
  167. ],
  168. "path": "collection1"
  169. }
  170. }
  171. ],
  172. "expectedState": {
  173. "activeTargets": {
  174. "4": {
  175. "queries": [
  176. {
  177. "filters": [
  178. [
  179. "key",
  180. "==",
  181. 1
  182. ]
  183. ],
  184. "orderBys": [
  185. ],
  186. "path": "collection1"
  187. }
  188. ],
  189. "resumeToken": ""
  190. }
  191. }
  192. }
  193. },
  194. {
  195. "watchAck": [
  196. 4
  197. ]
  198. },
  199. {
  200. "watchEntity": {
  201. "docs": [
  202. ],
  203. "targets": [
  204. 4
  205. ]
  206. }
  207. },
  208. {
  209. "watchCurrent": [
  210. [
  211. 4
  212. ],
  213. "resume-token-1001"
  214. ]
  215. },
  216. {
  217. "watchSnapshot": {
  218. "targetIds": [
  219. ],
  220. "version": 1001
  221. },
  222. "expectedState": {
  223. "activeLimboDocs": [
  224. "collection1/doc"
  225. ],
  226. "activeTargets": {
  227. "1": {
  228. "queries": [
  229. {
  230. "filters": [
  231. ],
  232. "orderBys": [
  233. ],
  234. "path": "collection1/doc"
  235. }
  236. ],
  237. "resumeToken": "",
  238. "targetPurpose": 2
  239. },
  240. "4": {
  241. "queries": [
  242. {
  243. "filters": [
  244. [
  245. "key",
  246. "==",
  247. 1
  248. ]
  249. ],
  250. "orderBys": [
  251. ],
  252. "path": "collection1"
  253. }
  254. ],
  255. "resumeToken": ""
  256. }
  257. }
  258. }
  259. },
  260. {
  261. "userListen": {
  262. "query": {
  263. "filters": [
  264. ],
  265. "orderBys": [
  266. ],
  267. "path": "collection2"
  268. },
  269. "targetId": 6
  270. },
  271. "expectedState": {
  272. "activeTargets": {
  273. "1": {
  274. "queries": [
  275. {
  276. "filters": [
  277. ],
  278. "orderBys": [
  279. ],
  280. "path": "collection1/doc"
  281. }
  282. ],
  283. "resumeToken": "",
  284. "targetPurpose": 2
  285. },
  286. "4": {
  287. "queries": [
  288. {
  289. "filters": [
  290. [
  291. "key",
  292. "==",
  293. 1
  294. ]
  295. ],
  296. "orderBys": [
  297. ],
  298. "path": "collection1"
  299. }
  300. ],
  301. "resumeToken": ""
  302. },
  303. "6": {
  304. "queries": [
  305. {
  306. "filters": [
  307. ],
  308. "orderBys": [
  309. ],
  310. "path": "collection2"
  311. }
  312. ],
  313. "resumeToken": ""
  314. }
  315. }
  316. }
  317. },
  318. {
  319. "watchAck": [
  320. 6
  321. ]
  322. },
  323. {
  324. "watchEntity": {
  325. "docs": [
  326. {
  327. "key": "collection2/doc",
  328. "options": {
  329. "hasCommittedMutations": false,
  330. "hasLocalMutations": false
  331. },
  332. "value": {
  333. "key": 2
  334. },
  335. "version": 1000
  336. }
  337. ],
  338. "targets": [
  339. 6
  340. ]
  341. }
  342. },
  343. {
  344. "watchCurrent": [
  345. [
  346. 6
  347. ],
  348. "resume-token-1002"
  349. ]
  350. },
  351. {
  352. "watchSnapshot": {
  353. "targetIds": [
  354. ],
  355. "version": 1002
  356. },
  357. "expectedSnapshotEvents": [
  358. {
  359. "added": [
  360. {
  361. "key": "collection2/doc",
  362. "options": {
  363. "hasCommittedMutations": false,
  364. "hasLocalMutations": false
  365. },
  366. "value": {
  367. "key": 2
  368. },
  369. "version": 1000
  370. }
  371. ],
  372. "errorCode": 0,
  373. "fromCache": false,
  374. "hasPendingWrites": false,
  375. "query": {
  376. "filters": [
  377. ],
  378. "orderBys": [
  379. ],
  380. "path": "collection2"
  381. }
  382. }
  383. ]
  384. },
  385. {
  386. "userUnlisten": [
  387. 6,
  388. {
  389. "filters": [
  390. ],
  391. "orderBys": [
  392. ],
  393. "path": "collection2"
  394. }
  395. ],
  396. "expectedState": {
  397. "activeTargets": {
  398. "1": {
  399. "queries": [
  400. {
  401. "filters": [
  402. ],
  403. "orderBys": [
  404. ],
  405. "path": "collection1/doc"
  406. }
  407. ],
  408. "resumeToken": "",
  409. "targetPurpose": 2
  410. },
  411. "4": {
  412. "queries": [
  413. {
  414. "filters": [
  415. [
  416. "key",
  417. "==",
  418. 1
  419. ]
  420. ],
  421. "orderBys": [
  422. ],
  423. "path": "collection1"
  424. }
  425. ],
  426. "resumeToken": ""
  427. }
  428. }
  429. }
  430. },
  431. {
  432. "userListen": {
  433. "query": {
  434. "filters": [
  435. [
  436. "key",
  437. "==",
  438. 2
  439. ]
  440. ],
  441. "orderBys": [
  442. ],
  443. "path": "collection2"
  444. },
  445. "targetId": 8
  446. },
  447. "expectedSnapshotEvents": [
  448. {
  449. "added": [
  450. {
  451. "key": "collection2/doc",
  452. "options": {
  453. "hasCommittedMutations": false,
  454. "hasLocalMutations": false
  455. },
  456. "value": {
  457. "key": 2
  458. },
  459. "version": 1000
  460. }
  461. ],
  462. "errorCode": 0,
  463. "fromCache": true,
  464. "hasPendingWrites": false,
  465. "query": {
  466. "filters": [
  467. [
  468. "key",
  469. "==",
  470. 2
  471. ]
  472. ],
  473. "orderBys": [
  474. ],
  475. "path": "collection2"
  476. }
  477. }
  478. ],
  479. "expectedState": {
  480. "activeTargets": {
  481. "1": {
  482. "queries": [
  483. {
  484. "filters": [
  485. ],
  486. "orderBys": [
  487. ],
  488. "path": "collection1/doc"
  489. }
  490. ],
  491. "resumeToken": "",
  492. "targetPurpose": 2
  493. },
  494. "4": {
  495. "queries": [
  496. {
  497. "filters": [
  498. [
  499. "key",
  500. "==",
  501. 1
  502. ]
  503. ],
  504. "orderBys": [
  505. ],
  506. "path": "collection1"
  507. }
  508. ],
  509. "resumeToken": ""
  510. },
  511. "8": {
  512. "queries": [
  513. {
  514. "filters": [
  515. [
  516. "key",
  517. "==",
  518. 2
  519. ]
  520. ],
  521. "orderBys": [
  522. ],
  523. "path": "collection2"
  524. }
  525. ],
  526. "resumeToken": ""
  527. }
  528. }
  529. }
  530. },
  531. {
  532. "watchAck": [
  533. 8
  534. ]
  535. },
  536. {
  537. "watchEntity": {
  538. "docs": [
  539. ],
  540. "targets": [
  541. 8
  542. ]
  543. }
  544. },
  545. {
  546. "watchCurrent": [
  547. [
  548. 8
  549. ],
  550. "resume-token-1003"
  551. ]
  552. },
  553. {
  554. "watchSnapshot": {
  555. "targetIds": [
  556. ],
  557. "version": 1003
  558. },
  559. "expectedState": {
  560. "activeLimboDocs": [
  561. "collection1/doc"
  562. ],
  563. "activeTargets": {
  564. "1": {
  565. "queries": [
  566. {
  567. "filters": [
  568. ],
  569. "orderBys": [
  570. ],
  571. "path": "collection1/doc"
  572. }
  573. ],
  574. "resumeToken": "",
  575. "targetPurpose": 2
  576. },
  577. "4": {
  578. "queries": [
  579. {
  580. "filters": [
  581. [
  582. "key",
  583. "==",
  584. 1
  585. ]
  586. ],
  587. "orderBys": [
  588. ],
  589. "path": "collection1"
  590. }
  591. ],
  592. "resumeToken": ""
  593. },
  594. "8": {
  595. "queries": [
  596. {
  597. "filters": [
  598. [
  599. "key",
  600. "==",
  601. 2
  602. ]
  603. ],
  604. "orderBys": [
  605. ],
  606. "path": "collection2"
  607. }
  608. ],
  609. "resumeToken": ""
  610. }
  611. },
  612. "enqueuedLimboDocs": [
  613. "collection2/doc"
  614. ]
  615. }
  616. },
  617. {
  618. "userListen": {
  619. "query": {
  620. "filters": [
  621. [
  622. "key",
  623. ">=",
  624. 2
  625. ]
  626. ],
  627. "orderBys": [
  628. ],
  629. "path": "collection2"
  630. },
  631. "targetId": 10
  632. },
  633. "expectedSnapshotEvents": [
  634. {
  635. "added": [
  636. {
  637. "key": "collection2/doc",
  638. "options": {
  639. "hasCommittedMutations": false,
  640. "hasLocalMutations": false
  641. },
  642. "value": {
  643. "key": 2
  644. },
  645. "version": 1000
  646. }
  647. ],
  648. "errorCode": 0,
  649. "fromCache": true,
  650. "hasPendingWrites": false,
  651. "query": {
  652. "filters": [
  653. [
  654. "key",
  655. ">=",
  656. 2
  657. ]
  658. ],
  659. "orderBys": [
  660. ],
  661. "path": "collection2"
  662. }
  663. }
  664. ],
  665. "expectedState": {
  666. "activeTargets": {
  667. "1": {
  668. "queries": [
  669. {
  670. "filters": [
  671. ],
  672. "orderBys": [
  673. ],
  674. "path": "collection1/doc"
  675. }
  676. ],
  677. "resumeToken": "",
  678. "targetPurpose": 2
  679. },
  680. "10": {
  681. "queries": [
  682. {
  683. "filters": [
  684. [
  685. "key",
  686. ">=",
  687. 2
  688. ]
  689. ],
  690. "orderBys": [
  691. ],
  692. "path": "collection2"
  693. }
  694. ],
  695. "resumeToken": ""
  696. },
  697. "4": {
  698. "queries": [
  699. {
  700. "filters": [
  701. [
  702. "key",
  703. "==",
  704. 1
  705. ]
  706. ],
  707. "orderBys": [
  708. ],
  709. "path": "collection1"
  710. }
  711. ],
  712. "resumeToken": ""
  713. },
  714. "8": {
  715. "queries": [
  716. {
  717. "filters": [
  718. [
  719. "key",
  720. "==",
  721. 2
  722. ]
  723. ],
  724. "orderBys": [
  725. ],
  726. "path": "collection2"
  727. }
  728. ],
  729. "resumeToken": ""
  730. }
  731. }
  732. }
  733. },
  734. {
  735. "watchAck": [
  736. 10
  737. ]
  738. },
  739. {
  740. "watchEntity": {
  741. "docs": [
  742. ],
  743. "targets": [
  744. 10
  745. ]
  746. }
  747. },
  748. {
  749. "watchCurrent": [
  750. [
  751. 10
  752. ],
  753. "resume-token-1004"
  754. ]
  755. },
  756. {
  757. "watchSnapshot": {
  758. "targetIds": [
  759. ],
  760. "version": 1004
  761. },
  762. "expectedState": {
  763. "activeLimboDocs": [
  764. "collection1/doc"
  765. ],
  766. "activeTargets": {
  767. "1": {
  768. "queries": [
  769. {
  770. "filters": [
  771. ],
  772. "orderBys": [
  773. ],
  774. "path": "collection1/doc"
  775. }
  776. ],
  777. "resumeToken": "",
  778. "targetPurpose": 2
  779. },
  780. "10": {
  781. "queries": [
  782. {
  783. "filters": [
  784. [
  785. "key",
  786. ">=",
  787. 2
  788. ]
  789. ],
  790. "orderBys": [
  791. ],
  792. "path": "collection2"
  793. }
  794. ],
  795. "resumeToken": ""
  796. },
  797. "4": {
  798. "queries": [
  799. {
  800. "filters": [
  801. [
  802. "key",
  803. "==",
  804. 1
  805. ]
  806. ],
  807. "orderBys": [
  808. ],
  809. "path": "collection1"
  810. }
  811. ],
  812. "resumeToken": ""
  813. },
  814. "8": {
  815. "queries": [
  816. {
  817. "filters": [
  818. [
  819. "key",
  820. "==",
  821. 2
  822. ]
  823. ],
  824. "orderBys": [
  825. ],
  826. "path": "collection2"
  827. }
  828. ],
  829. "resumeToken": ""
  830. }
  831. },
  832. "enqueuedLimboDocs": [
  833. "collection2/doc"
  834. ]
  835. }
  836. },
  837. {
  838. "userUnlisten": [
  839. 10,
  840. {
  841. "filters": [
  842. [
  843. "key",
  844. ">=",
  845. 2
  846. ]
  847. ],
  848. "orderBys": [
  849. ],
  850. "path": "collection2"
  851. }
  852. ],
  853. "expectedState": {
  854. "activeLimboDocs": [
  855. "collection1/doc"
  856. ],
  857. "activeTargets": {
  858. "1": {
  859. "queries": [
  860. {
  861. "filters": [
  862. ],
  863. "orderBys": [
  864. ],
  865. "path": "collection1/doc"
  866. }
  867. ],
  868. "resumeToken": "",
  869. "targetPurpose": 2
  870. },
  871. "4": {
  872. "queries": [
  873. {
  874. "filters": [
  875. [
  876. "key",
  877. "==",
  878. 1
  879. ]
  880. ],
  881. "orderBys": [
  882. ],
  883. "path": "collection1"
  884. }
  885. ],
  886. "resumeToken": ""
  887. },
  888. "8": {
  889. "queries": [
  890. {
  891. "filters": [
  892. [
  893. "key",
  894. "==",
  895. 2
  896. ]
  897. ],
  898. "orderBys": [
  899. ],
  900. "path": "collection2"
  901. }
  902. ],
  903. "resumeToken": ""
  904. }
  905. },
  906. "enqueuedLimboDocs": [
  907. "collection2/doc"
  908. ]
  909. }
  910. },
  911. {
  912. "userUnlisten": [
  913. 8,
  914. {
  915. "filters": [
  916. [
  917. "key",
  918. "==",
  919. 2
  920. ]
  921. ],
  922. "orderBys": [
  923. ],
  924. "path": "collection2"
  925. }
  926. ],
  927. "expectedState": {
  928. "activeLimboDocs": [
  929. "collection1/doc"
  930. ],
  931. "activeTargets": {
  932. "1": {
  933. "queries": [
  934. {
  935. "filters": [
  936. ],
  937. "orderBys": [
  938. ],
  939. "path": "collection1/doc"
  940. }
  941. ],
  942. "resumeToken": "",
  943. "targetPurpose": 2
  944. },
  945. "4": {
  946. "queries": [
  947. {
  948. "filters": [
  949. [
  950. "key",
  951. "==",
  952. 1
  953. ]
  954. ],
  955. "orderBys": [
  956. ],
  957. "path": "collection1"
  958. }
  959. ],
  960. "resumeToken": ""
  961. }
  962. },
  963. "enqueuedLimboDocs": [
  964. ]
  965. }
  966. }
  967. ]
  968. },
  969. "A limbo resolution for a document should not be enqueued if one is already enqueued": {
  970. "describeName": "Limbo Documents:",
  971. "itName": "A limbo resolution for a document should not be enqueued if one is already enqueued",
  972. "tags": [
  973. ],
  974. "config": {
  975. "maxConcurrentLimboResolutions": 1,
  976. "numClients": 1,
  977. "useGarbageCollection": false
  978. },
  979. "steps": [
  980. {
  981. "userListen": {
  982. "query": {
  983. "filters": [
  984. ],
  985. "orderBys": [
  986. ],
  987. "path": "collection1"
  988. },
  989. "targetId": 2
  990. },
  991. "expectedState": {
  992. "activeTargets": {
  993. "2": {
  994. "queries": [
  995. {
  996. "filters": [
  997. ],
  998. "orderBys": [
  999. ],
  1000. "path": "collection1"
  1001. }
  1002. ],
  1003. "resumeToken": ""
  1004. }
  1005. }
  1006. }
  1007. },
  1008. {
  1009. "watchAck": [
  1010. 2
  1011. ]
  1012. },
  1013. {
  1014. "watchEntity": {
  1015. "docs": [
  1016. {
  1017. "key": "collection1/doc1",
  1018. "options": {
  1019. "hasCommittedMutations": false,
  1020. "hasLocalMutations": false
  1021. },
  1022. "value": {
  1023. "key": 1
  1024. },
  1025. "version": 1000
  1026. }
  1027. ],
  1028. "targets": [
  1029. 2
  1030. ]
  1031. }
  1032. },
  1033. {
  1034. "watchCurrent": [
  1035. [
  1036. 2
  1037. ],
  1038. "resume-token-1000"
  1039. ]
  1040. },
  1041. {
  1042. "watchSnapshot": {
  1043. "targetIds": [
  1044. ],
  1045. "version": 1000
  1046. },
  1047. "expectedSnapshotEvents": [
  1048. {
  1049. "added": [
  1050. {
  1051. "key": "collection1/doc1",
  1052. "options": {
  1053. "hasCommittedMutations": false,
  1054. "hasLocalMutations": false
  1055. },
  1056. "value": {
  1057. "key": 1
  1058. },
  1059. "version": 1000
  1060. }
  1061. ],
  1062. "errorCode": 0,
  1063. "fromCache": false,
  1064. "hasPendingWrites": false,
  1065. "query": {
  1066. "filters": [
  1067. ],
  1068. "orderBys": [
  1069. ],
  1070. "path": "collection1"
  1071. }
  1072. }
  1073. ]
  1074. },
  1075. {
  1076. "userUnlisten": [
  1077. 2,
  1078. {
  1079. "filters": [
  1080. ],
  1081. "orderBys": [
  1082. ],
  1083. "path": "collection1"
  1084. }
  1085. ],
  1086. "expectedState": {
  1087. "activeTargets": {
  1088. }
  1089. }
  1090. },
  1091. {
  1092. "userListen": {
  1093. "query": {
  1094. "filters": [
  1095. [
  1096. "key",
  1097. "==",
  1098. 1
  1099. ]
  1100. ],
  1101. "orderBys": [
  1102. ],
  1103. "path": "collection1"
  1104. },
  1105. "targetId": 4
  1106. },
  1107. "expectedSnapshotEvents": [
  1108. {
  1109. "added": [
  1110. {
  1111. "key": "collection1/doc1",
  1112. "options": {
  1113. "hasCommittedMutations": false,
  1114. "hasLocalMutations": false
  1115. },
  1116. "value": {
  1117. "key": 1
  1118. },
  1119. "version": 1000
  1120. }
  1121. ],
  1122. "errorCode": 0,
  1123. "fromCache": true,
  1124. "hasPendingWrites": false,
  1125. "query": {
  1126. "filters": [
  1127. [
  1128. "key",
  1129. "==",
  1130. 1
  1131. ]
  1132. ],
  1133. "orderBys": [
  1134. ],
  1135. "path": "collection1"
  1136. }
  1137. }
  1138. ],
  1139. "expectedState": {
  1140. "activeTargets": {
  1141. "4": {
  1142. "queries": [
  1143. {
  1144. "filters": [
  1145. [
  1146. "key",
  1147. "==",
  1148. 1
  1149. ]
  1150. ],
  1151. "orderBys": [
  1152. ],
  1153. "path": "collection1"
  1154. }
  1155. ],
  1156. "resumeToken": ""
  1157. }
  1158. }
  1159. }
  1160. },
  1161. {
  1162. "watchAck": [
  1163. 4
  1164. ]
  1165. },
  1166. {
  1167. "watchEntity": {
  1168. "docs": [
  1169. ],
  1170. "targets": [
  1171. 4
  1172. ]
  1173. }
  1174. },
  1175. {
  1176. "watchCurrent": [
  1177. [
  1178. 4
  1179. ],
  1180. "resume-token-1001"
  1181. ]
  1182. },
  1183. {
  1184. "watchSnapshot": {
  1185. "targetIds": [
  1186. ],
  1187. "version": 1001
  1188. },
  1189. "expectedState": {
  1190. "activeLimboDocs": [
  1191. "collection1/doc1"
  1192. ],
  1193. "activeTargets": {
  1194. "1": {
  1195. "queries": [
  1196. {
  1197. "filters": [
  1198. ],
  1199. "orderBys": [
  1200. ],
  1201. "path": "collection1/doc1"
  1202. }
  1203. ],
  1204. "resumeToken": "",
  1205. "targetPurpose": 2
  1206. },
  1207. "4": {
  1208. "queries": [
  1209. {
  1210. "filters": [
  1211. [
  1212. "key",
  1213. "==",
  1214. 1
  1215. ]
  1216. ],
  1217. "orderBys": [
  1218. ],
  1219. "path": "collection1"
  1220. }
  1221. ],
  1222. "resumeToken": ""
  1223. }
  1224. }
  1225. }
  1226. },
  1227. {
  1228. "userListen": {
  1229. "query": {
  1230. "filters": [
  1231. ],
  1232. "orderBys": [
  1233. ],
  1234. "path": "collection2"
  1235. },
  1236. "targetId": 6
  1237. },
  1238. "expectedState": {
  1239. "activeTargets": {
  1240. "1": {
  1241. "queries": [
  1242. {
  1243. "filters": [
  1244. ],
  1245. "orderBys": [
  1246. ],
  1247. "path": "collection1/doc1"
  1248. }
  1249. ],
  1250. "resumeToken": "",
  1251. "targetPurpose": 2
  1252. },
  1253. "4": {
  1254. "queries": [
  1255. {
  1256. "filters": [
  1257. [
  1258. "key",
  1259. "==",
  1260. 1
  1261. ]
  1262. ],
  1263. "orderBys": [
  1264. ],
  1265. "path": "collection1"
  1266. }
  1267. ],
  1268. "resumeToken": ""
  1269. },
  1270. "6": {
  1271. "queries": [
  1272. {
  1273. "filters": [
  1274. ],
  1275. "orderBys": [
  1276. ],
  1277. "path": "collection2"
  1278. }
  1279. ],
  1280. "resumeToken": ""
  1281. }
  1282. }
  1283. }
  1284. },
  1285. {
  1286. "watchAck": [
  1287. 6
  1288. ]
  1289. },
  1290. {
  1291. "watchEntity": {
  1292. "docs": [
  1293. {
  1294. "key": "collection2/doc2",
  1295. "options": {
  1296. "hasCommittedMutations": false,
  1297. "hasLocalMutations": false
  1298. },
  1299. "value": {
  1300. "key": 2
  1301. },
  1302. "version": 1000
  1303. }
  1304. ],
  1305. "targets": [
  1306. 6
  1307. ]
  1308. }
  1309. },
  1310. {
  1311. "watchCurrent": [
  1312. [
  1313. 6
  1314. ],
  1315. "resume-token-1002"
  1316. ]
  1317. },
  1318. {
  1319. "watchSnapshot": {
  1320. "targetIds": [
  1321. ],
  1322. "version": 1002
  1323. },
  1324. "expectedSnapshotEvents": [
  1325. {
  1326. "added": [
  1327. {
  1328. "key": "collection2/doc2",
  1329. "options": {
  1330. "hasCommittedMutations": false,
  1331. "hasLocalMutations": false
  1332. },
  1333. "value": {
  1334. "key": 2
  1335. },
  1336. "version": 1000
  1337. }
  1338. ],
  1339. "errorCode": 0,
  1340. "fromCache": false,
  1341. "hasPendingWrites": false,
  1342. "query": {
  1343. "filters": [
  1344. ],
  1345. "orderBys": [
  1346. ],
  1347. "path": "collection2"
  1348. }
  1349. }
  1350. ]
  1351. },
  1352. {
  1353. "userUnlisten": [
  1354. 6,
  1355. {
  1356. "filters": [
  1357. ],
  1358. "orderBys": [
  1359. ],
  1360. "path": "collection2"
  1361. }
  1362. ],
  1363. "expectedState": {
  1364. "activeTargets": {
  1365. "1": {
  1366. "queries": [
  1367. {
  1368. "filters": [
  1369. ],
  1370. "orderBys": [
  1371. ],
  1372. "path": "collection1/doc1"
  1373. }
  1374. ],
  1375. "resumeToken": "",
  1376. "targetPurpose": 2
  1377. },
  1378. "4": {
  1379. "queries": [
  1380. {
  1381. "filters": [
  1382. [
  1383. "key",
  1384. "==",
  1385. 1
  1386. ]
  1387. ],
  1388. "orderBys": [
  1389. ],
  1390. "path": "collection1"
  1391. }
  1392. ],
  1393. "resumeToken": ""
  1394. }
  1395. }
  1396. }
  1397. },
  1398. {
  1399. "userListen": {
  1400. "query": {
  1401. "filters": [
  1402. [
  1403. "key",
  1404. "==",
  1405. 2
  1406. ]
  1407. ],
  1408. "orderBys": [
  1409. ],
  1410. "path": "collection2"
  1411. },
  1412. "targetId": 8
  1413. },
  1414. "expectedSnapshotEvents": [
  1415. {
  1416. "added": [
  1417. {
  1418. "key": "collection2/doc2",
  1419. "options": {
  1420. "hasCommittedMutations": false,
  1421. "hasLocalMutations": false
  1422. },
  1423. "value": {
  1424. "key": 2
  1425. },
  1426. "version": 1000
  1427. }
  1428. ],
  1429. "errorCode": 0,
  1430. "fromCache": true,
  1431. "hasPendingWrites": false,
  1432. "query": {
  1433. "filters": [
  1434. [
  1435. "key",
  1436. "==",
  1437. 2
  1438. ]
  1439. ],
  1440. "orderBys": [
  1441. ],
  1442. "path": "collection2"
  1443. }
  1444. }
  1445. ],
  1446. "expectedState": {
  1447. "activeTargets": {
  1448. "1": {
  1449. "queries": [
  1450. {
  1451. "filters": [
  1452. ],
  1453. "orderBys": [
  1454. ],
  1455. "path": "collection1/doc1"
  1456. }
  1457. ],
  1458. "resumeToken": "",
  1459. "targetPurpose": 2
  1460. },
  1461. "4": {
  1462. "queries": [
  1463. {
  1464. "filters": [
  1465. [
  1466. "key",
  1467. "==",
  1468. 1
  1469. ]
  1470. ],
  1471. "orderBys": [
  1472. ],
  1473. "path": "collection1"
  1474. }
  1475. ],
  1476. "resumeToken": ""
  1477. },
  1478. "8": {
  1479. "queries": [
  1480. {
  1481. "filters": [
  1482. [
  1483. "key",
  1484. "==",
  1485. 2
  1486. ]
  1487. ],
  1488. "orderBys": [
  1489. ],
  1490. "path": "collection2"
  1491. }
  1492. ],
  1493. "resumeToken": ""
  1494. }
  1495. }
  1496. }
  1497. },
  1498. {
  1499. "watchAck": [
  1500. 8
  1501. ]
  1502. },
  1503. {
  1504. "watchEntity": {
  1505. "docs": [
  1506. ],
  1507. "targets": [
  1508. 8
  1509. ]
  1510. }
  1511. },
  1512. {
  1513. "watchCurrent": [
  1514. [
  1515. 8
  1516. ],
  1517. "resume-token-1003"
  1518. ]
  1519. },
  1520. {
  1521. "watchSnapshot": {
  1522. "targetIds": [
  1523. ],
  1524. "version": 1003
  1525. },
  1526. "expectedState": {
  1527. "activeLimboDocs": [
  1528. "collection1/doc1"
  1529. ],
  1530. "activeTargets": {
  1531. "1": {
  1532. "queries": [
  1533. {
  1534. "filters": [
  1535. ],
  1536. "orderBys": [
  1537. ],
  1538. "path": "collection1/doc1"
  1539. }
  1540. ],
  1541. "resumeToken": "",
  1542. "targetPurpose": 2
  1543. },
  1544. "4": {
  1545. "queries": [
  1546. {
  1547. "filters": [
  1548. [
  1549. "key",
  1550. "==",
  1551. 1
  1552. ]
  1553. ],
  1554. "orderBys": [
  1555. ],
  1556. "path": "collection1"
  1557. }
  1558. ],
  1559. "resumeToken": ""
  1560. },
  1561. "8": {
  1562. "queries": [
  1563. {
  1564. "filters": [
  1565. [
  1566. "key",
  1567. "==",
  1568. 2
  1569. ]
  1570. ],
  1571. "orderBys": [
  1572. ],
  1573. "path": "collection2"
  1574. }
  1575. ],
  1576. "resumeToken": ""
  1577. }
  1578. },
  1579. "enqueuedLimboDocs": [
  1580. "collection2/doc2"
  1581. ]
  1582. }
  1583. },
  1584. {
  1585. "userListen": {
  1586. "query": {
  1587. "filters": [
  1588. [
  1589. "key",
  1590. ">=",
  1591. 2
  1592. ]
  1593. ],
  1594. "orderBys": [
  1595. ],
  1596. "path": "collection2"
  1597. },
  1598. "targetId": 10
  1599. },
  1600. "expectedSnapshotEvents": [
  1601. {
  1602. "added": [
  1603. {
  1604. "key": "collection2/doc2",
  1605. "options": {
  1606. "hasCommittedMutations": false,
  1607. "hasLocalMutations": false
  1608. },
  1609. "value": {
  1610. "key": 2
  1611. },
  1612. "version": 1000
  1613. }
  1614. ],
  1615. "errorCode": 0,
  1616. "fromCache": true,
  1617. "hasPendingWrites": false,
  1618. "query": {
  1619. "filters": [
  1620. [
  1621. "key",
  1622. ">=",
  1623. 2
  1624. ]
  1625. ],
  1626. "orderBys": [
  1627. ],
  1628. "path": "collection2"
  1629. }
  1630. }
  1631. ],
  1632. "expectedState": {
  1633. "activeTargets": {
  1634. "1": {
  1635. "queries": [
  1636. {
  1637. "filters": [
  1638. ],
  1639. "orderBys": [
  1640. ],
  1641. "path": "collection1/doc1"
  1642. }
  1643. ],
  1644. "resumeToken": "",
  1645. "targetPurpose": 2
  1646. },
  1647. "10": {
  1648. "queries": [
  1649. {
  1650. "filters": [
  1651. [
  1652. "key",
  1653. ">=",
  1654. 2
  1655. ]
  1656. ],
  1657. "orderBys": [
  1658. ],
  1659. "path": "collection2"
  1660. }
  1661. ],
  1662. "resumeToken": ""
  1663. },
  1664. "4": {
  1665. "queries": [
  1666. {
  1667. "filters": [
  1668. [
  1669. "key",
  1670. "==",
  1671. 1
  1672. ]
  1673. ],
  1674. "orderBys": [
  1675. ],
  1676. "path": "collection1"
  1677. }
  1678. ],
  1679. "resumeToken": ""
  1680. },
  1681. "8": {
  1682. "queries": [
  1683. {
  1684. "filters": [
  1685. [
  1686. "key",
  1687. "==",
  1688. 2
  1689. ]
  1690. ],
  1691. "orderBys": [
  1692. ],
  1693. "path": "collection2"
  1694. }
  1695. ],
  1696. "resumeToken": ""
  1697. }
  1698. }
  1699. }
  1700. },
  1701. {
  1702. "watchAck": [
  1703. 10
  1704. ]
  1705. },
  1706. {
  1707. "watchEntity": {
  1708. "docs": [
  1709. ],
  1710. "targets": [
  1711. 10
  1712. ]
  1713. }
  1714. },
  1715. {
  1716. "watchCurrent": [
  1717. [
  1718. 10
  1719. ],
  1720. "resume-token-1004"
  1721. ]
  1722. },
  1723. {
  1724. "watchSnapshot": {
  1725. "targetIds": [
  1726. ],
  1727. "version": 1004
  1728. },
  1729. "expectedState": {
  1730. "activeLimboDocs": [
  1731. "collection1/doc1"
  1732. ],
  1733. "activeTargets": {
  1734. "1": {
  1735. "queries": [
  1736. {
  1737. "filters": [
  1738. ],
  1739. "orderBys": [
  1740. ],
  1741. "path": "collection1/doc1"
  1742. }
  1743. ],
  1744. "resumeToken": "",
  1745. "targetPurpose": 2
  1746. },
  1747. "10": {
  1748. "queries": [
  1749. {
  1750. "filters": [
  1751. [
  1752. "key",
  1753. ">=",
  1754. 2
  1755. ]
  1756. ],
  1757. "orderBys": [
  1758. ],
  1759. "path": "collection2"
  1760. }
  1761. ],
  1762. "resumeToken": ""
  1763. },
  1764. "4": {
  1765. "queries": [
  1766. {
  1767. "filters": [
  1768. [
  1769. "key",
  1770. "==",
  1771. 1
  1772. ]
  1773. ],
  1774. "orderBys": [
  1775. ],
  1776. "path": "collection1"
  1777. }
  1778. ],
  1779. "resumeToken": ""
  1780. },
  1781. "8": {
  1782. "queries": [
  1783. {
  1784. "filters": [
  1785. [
  1786. "key",
  1787. "==",
  1788. 2
  1789. ]
  1790. ],
  1791. "orderBys": [
  1792. ],
  1793. "path": "collection2"
  1794. }
  1795. ],
  1796. "resumeToken": ""
  1797. }
  1798. },
  1799. "enqueuedLimboDocs": [
  1800. "collection2/doc2"
  1801. ]
  1802. }
  1803. }
  1804. ]
  1805. },
  1806. "A limbo resolution for a document should not be started if one is already active": {
  1807. "describeName": "Limbo Documents:",
  1808. "itName": "A limbo resolution for a document should not be started if one is already active",
  1809. "tags": [
  1810. ],
  1811. "config": {
  1812. "numClients": 1,
  1813. "useGarbageCollection": false
  1814. },
  1815. "steps": [
  1816. {
  1817. "userListen": {
  1818. "query": {
  1819. "filters": [
  1820. ],
  1821. "orderBys": [
  1822. ],
  1823. "path": "collection"
  1824. },
  1825. "targetId": 2
  1826. },
  1827. "expectedState": {
  1828. "activeTargets": {
  1829. "2": {
  1830. "queries": [
  1831. {
  1832. "filters": [
  1833. ],
  1834. "orderBys": [
  1835. ],
  1836. "path": "collection"
  1837. }
  1838. ],
  1839. "resumeToken": ""
  1840. }
  1841. }
  1842. }
  1843. },
  1844. {
  1845. "watchAck": [
  1846. 2
  1847. ]
  1848. },
  1849. {
  1850. "watchEntity": {
  1851. "docs": [
  1852. {
  1853. "key": "collection/doc",
  1854. "options": {
  1855. "hasCommittedMutations": false,
  1856. "hasLocalMutations": false
  1857. },
  1858. "value": {
  1859. "key": 1
  1860. },
  1861. "version": 1000
  1862. }
  1863. ],
  1864. "targets": [
  1865. 2
  1866. ]
  1867. }
  1868. },
  1869. {
  1870. "watchCurrent": [
  1871. [
  1872. 2
  1873. ],
  1874. "resume-token-1000"
  1875. ]
  1876. },
  1877. {
  1878. "watchSnapshot": {
  1879. "targetIds": [
  1880. ],
  1881. "version": 1000
  1882. },
  1883. "expectedSnapshotEvents": [
  1884. {
  1885. "added": [
  1886. {
  1887. "key": "collection/doc",
  1888. "options": {
  1889. "hasCommittedMutations": false,
  1890. "hasLocalMutations": false
  1891. },
  1892. "value": {
  1893. "key": 1
  1894. },
  1895. "version": 1000
  1896. }
  1897. ],
  1898. "errorCode": 0,
  1899. "fromCache": false,
  1900. "hasPendingWrites": false,
  1901. "query": {
  1902. "filters": [
  1903. ],
  1904. "orderBys": [
  1905. ],
  1906. "path": "collection"
  1907. }
  1908. }
  1909. ]
  1910. },
  1911. {
  1912. "userUnlisten": [
  1913. 2,
  1914. {
  1915. "filters": [
  1916. ],
  1917. "orderBys": [
  1918. ],
  1919. "path": "collection"
  1920. }
  1921. ],
  1922. "expectedState": {
  1923. "activeTargets": {
  1924. }
  1925. }
  1926. },
  1927. {
  1928. "userListen": {
  1929. "query": {
  1930. "filters": [
  1931. [
  1932. "key",
  1933. "==",
  1934. 1
  1935. ]
  1936. ],
  1937. "orderBys": [
  1938. ],
  1939. "path": "collection"
  1940. },
  1941. "targetId": 4
  1942. },
  1943. "expectedSnapshotEvents": [
  1944. {
  1945. "added": [
  1946. {
  1947. "key": "collection/doc",
  1948. "options": {
  1949. "hasCommittedMutations": false,
  1950. "hasLocalMutations": false
  1951. },
  1952. "value": {
  1953. "key": 1
  1954. },
  1955. "version": 1000
  1956. }
  1957. ],
  1958. "errorCode": 0,
  1959. "fromCache": true,
  1960. "hasPendingWrites": false,
  1961. "query": {
  1962. "filters": [
  1963. [
  1964. "key",
  1965. "==",
  1966. 1
  1967. ]
  1968. ],
  1969. "orderBys": [
  1970. ],
  1971. "path": "collection"
  1972. }
  1973. }
  1974. ],
  1975. "expectedState": {
  1976. "activeTargets": {
  1977. "4": {
  1978. "queries": [
  1979. {
  1980. "filters": [
  1981. [
  1982. "key",
  1983. "==",
  1984. 1
  1985. ]
  1986. ],
  1987. "orderBys": [
  1988. ],
  1989. "path": "collection"
  1990. }
  1991. ],
  1992. "resumeToken": ""
  1993. }
  1994. }
  1995. }
  1996. },
  1997. {
  1998. "watchAck": [
  1999. 4
  2000. ]
  2001. },
  2002. {
  2003. "watchEntity": {
  2004. "docs": [
  2005. ],
  2006. "targets": [
  2007. 4
  2008. ]
  2009. }
  2010. },
  2011. {
  2012. "watchCurrent": [
  2013. [
  2014. 4
  2015. ],
  2016. "resume-token-1001"
  2017. ]
  2018. },
  2019. {
  2020. "watchSnapshot": {
  2021. "targetIds": [
  2022. ],
  2023. "version": 1001
  2024. },
  2025. "expectedState": {
  2026. "activeLimboDocs": [
  2027. "collection/doc"
  2028. ],
  2029. "activeTargets": {
  2030. "1": {
  2031. "queries": [
  2032. {
  2033. "filters": [
  2034. ],
  2035. "orderBys": [
  2036. ],
  2037. "path": "collection/doc"
  2038. }
  2039. ],
  2040. "resumeToken": "",
  2041. "targetPurpose": 2
  2042. },
  2043. "4": {
  2044. "queries": [
  2045. {
  2046. "filters": [
  2047. [
  2048. "key",
  2049. "==",
  2050. 1
  2051. ]
  2052. ],
  2053. "orderBys": [
  2054. ],
  2055. "path": "collection"
  2056. }
  2057. ],
  2058. "resumeToken": ""
  2059. }
  2060. },
  2061. "enqueuedLimboDocs": [
  2062. ]
  2063. }
  2064. },
  2065. {
  2066. "userListen": {
  2067. "query": {
  2068. "filters": [
  2069. [
  2070. "key",
  2071. ">=",
  2072. 1
  2073. ]
  2074. ],
  2075. "orderBys": [
  2076. ],
  2077. "path": "collection"
  2078. },
  2079. "targetId": 6
  2080. },
  2081. "expectedSnapshotEvents": [
  2082. {
  2083. "added": [
  2084. {
  2085. "key": "collection/doc",
  2086. "options": {
  2087. "hasCommittedMutations": false,
  2088. "hasLocalMutations": false
  2089. },
  2090. "value": {
  2091. "key": 1
  2092. },
  2093. "version": 1000
  2094. }
  2095. ],
  2096. "errorCode": 0,
  2097. "fromCache": true,
  2098. "hasPendingWrites": false,
  2099. "query": {
  2100. "filters": [
  2101. [
  2102. "key",
  2103. ">=",
  2104. 1
  2105. ]
  2106. ],
  2107. "orderBys": [
  2108. ],
  2109. "path": "collection"
  2110. }
  2111. }
  2112. ],
  2113. "expectedState": {
  2114. "activeTargets": {
  2115. "1": {
  2116. "queries": [
  2117. {
  2118. "filters": [
  2119. ],
  2120. "orderBys": [
  2121. ],
  2122. "path": "collection/doc"
  2123. }
  2124. ],
  2125. "resumeToken": "",
  2126. "targetPurpose": 2
  2127. },
  2128. "4": {
  2129. "queries": [
  2130. {
  2131. "filters": [
  2132. [
  2133. "key",
  2134. "==",
  2135. 1
  2136. ]
  2137. ],
  2138. "orderBys": [
  2139. ],
  2140. "path": "collection"
  2141. }
  2142. ],
  2143. "resumeToken": ""
  2144. },
  2145. "6": {
  2146. "queries": [
  2147. {
  2148. "filters": [
  2149. [
  2150. "key",
  2151. ">=",
  2152. 1
  2153. ]
  2154. ],
  2155. "orderBys": [
  2156. ],
  2157. "path": "collection"
  2158. }
  2159. ],
  2160. "resumeToken": ""
  2161. }
  2162. }
  2163. }
  2164. },
  2165. {
  2166. "watchAck": [
  2167. 6
  2168. ]
  2169. },
  2170. {
  2171. "watchEntity": {
  2172. "docs": [
  2173. ],
  2174. "targets": [
  2175. 6
  2176. ]
  2177. }
  2178. },
  2179. {
  2180. "watchCurrent": [
  2181. [
  2182. 6
  2183. ],
  2184. "resume-token-1002"
  2185. ]
  2186. },
  2187. {
  2188. "watchSnapshot": {
  2189. "targetIds": [
  2190. ],
  2191. "version": 1002
  2192. },
  2193. "expectedState": {
  2194. "activeLimboDocs": [
  2195. "collection/doc"
  2196. ],
  2197. "activeTargets": {
  2198. "1": {
  2199. "queries": [
  2200. {
  2201. "filters": [
  2202. ],
  2203. "orderBys": [
  2204. ],
  2205. "path": "collection/doc"
  2206. }
  2207. ],
  2208. "resumeToken": "",
  2209. "targetPurpose": 2
  2210. },
  2211. "4": {
  2212. "queries": [
  2213. {
  2214. "filters": [
  2215. [
  2216. "key",
  2217. "==",
  2218. 1
  2219. ]
  2220. ],
  2221. "orderBys": [
  2222. ],
  2223. "path": "collection"
  2224. }
  2225. ],
  2226. "resumeToken": ""
  2227. },
  2228. "6": {
  2229. "queries": [
  2230. {
  2231. "filters": [
  2232. [
  2233. "key",
  2234. ">=",
  2235. 1
  2236. ]
  2237. ],
  2238. "orderBys": [
  2239. ],
  2240. "path": "collection"
  2241. }
  2242. ],
  2243. "resumeToken": ""
  2244. }
  2245. },
  2246. "enqueuedLimboDocs": [
  2247. ]
  2248. }
  2249. }
  2250. ]
  2251. },
  2252. "Document remove message will cause docs to go in limbo": {
  2253. "describeName": "Limbo Documents:",
  2254. "itName": "Document remove message will cause docs to go in limbo",
  2255. "tags": [
  2256. ],
  2257. "config": {
  2258. "numClients": 1,
  2259. "useGarbageCollection": true
  2260. },
  2261. "steps": [
  2262. {
  2263. "userListen": {
  2264. "query": {
  2265. "filters": [
  2266. ],
  2267. "orderBys": [
  2268. ],
  2269. "path": "collection"
  2270. },
  2271. "targetId": 2
  2272. },
  2273. "expectedState": {
  2274. "activeTargets": {
  2275. "2": {
  2276. "queries": [
  2277. {
  2278. "filters": [
  2279. ],
  2280. "orderBys": [
  2281. ],
  2282. "path": "collection"
  2283. }
  2284. ],
  2285. "resumeToken": ""
  2286. }
  2287. }
  2288. }
  2289. },
  2290. {
  2291. "watchAck": [
  2292. 2
  2293. ]
  2294. },
  2295. {
  2296. "watchEntity": {
  2297. "docs": [
  2298. {
  2299. "key": "collection/a",
  2300. "options": {
  2301. "hasCommittedMutations": false,
  2302. "hasLocalMutations": false
  2303. },
  2304. "value": {
  2305. "key": "a"
  2306. },
  2307. "version": 1000
  2308. },
  2309. {
  2310. "key": "collection/b",
  2311. "options": {
  2312. "hasCommittedMutations": false,
  2313. "hasLocalMutations": false
  2314. },
  2315. "value": {
  2316. "key": "b"
  2317. },
  2318. "version": 1001
  2319. }
  2320. ],
  2321. "targets": [
  2322. 2
  2323. ]
  2324. }
  2325. },
  2326. {
  2327. "watchCurrent": [
  2328. [
  2329. 2
  2330. ],
  2331. "resume-token-1002"
  2332. ]
  2333. },
  2334. {
  2335. "watchSnapshot": {
  2336. "targetIds": [
  2337. ],
  2338. "version": 1002
  2339. },
  2340. "expectedSnapshotEvents": [
  2341. {
  2342. "added": [
  2343. {
  2344. "key": "collection/a",
  2345. "options": {
  2346. "hasCommittedMutations": false,
  2347. "hasLocalMutations": false
  2348. },
  2349. "value": {
  2350. "key": "a"
  2351. },
  2352. "version": 1000
  2353. },
  2354. {
  2355. "key": "collection/b",
  2356. "options": {
  2357. "hasCommittedMutations": false,
  2358. "hasLocalMutations": false
  2359. },
  2360. "value": {
  2361. "key": "b"
  2362. },
  2363. "version": 1001
  2364. }
  2365. ],
  2366. "errorCode": 0,
  2367. "fromCache": false,
  2368. "hasPendingWrites": false,
  2369. "query": {
  2370. "filters": [
  2371. ],
  2372. "orderBys": [
  2373. ],
  2374. "path": "collection"
  2375. }
  2376. }
  2377. ]
  2378. },
  2379. {
  2380. "watchEntity": {
  2381. "key": "collection/b",
  2382. "removedTargets": [
  2383. 2
  2384. ]
  2385. }
  2386. },
  2387. {
  2388. "watchSnapshot": {
  2389. "targetIds": [
  2390. ],
  2391. "version": 1003
  2392. },
  2393. "expectedSnapshotEvents": [
  2394. {
  2395. "errorCode": 0,
  2396. "fromCache": true,
  2397. "hasPendingWrites": false,
  2398. "query": {
  2399. "filters": [
  2400. ],
  2401. "orderBys": [
  2402. ],
  2403. "path": "collection"
  2404. }
  2405. }
  2406. ],
  2407. "expectedState": {
  2408. "activeLimboDocs": [
  2409. "collection/b"
  2410. ],
  2411. "activeTargets": {
  2412. "1": {
  2413. "queries": [
  2414. {
  2415. "filters": [
  2416. ],
  2417. "orderBys": [
  2418. ],
  2419. "path": "collection/b"
  2420. }
  2421. ],
  2422. "resumeToken": "",
  2423. "targetPurpose": 2
  2424. },
  2425. "2": {
  2426. "queries": [
  2427. {
  2428. "filters": [
  2429. ],
  2430. "orderBys": [
  2431. ],
  2432. "path": "collection"
  2433. }
  2434. ],
  2435. "resumeToken": ""
  2436. }
  2437. }
  2438. }
  2439. },
  2440. {
  2441. "watchAck": [
  2442. 1
  2443. ]
  2444. },
  2445. {
  2446. "watchCurrent": [
  2447. [
  2448. 1
  2449. ],
  2450. "resume-token-1004"
  2451. ]
  2452. },
  2453. {
  2454. "watchSnapshot": {
  2455. "targetIds": [
  2456. ],
  2457. "version": 1004
  2458. },
  2459. "expectedSnapshotEvents": [
  2460. {
  2461. "errorCode": 0,
  2462. "fromCache": false,
  2463. "hasPendingWrites": false,
  2464. "query": {
  2465. "filters": [
  2466. ],
  2467. "orderBys": [
  2468. ],
  2469. "path": "collection"
  2470. },
  2471. "removed": [
  2472. {
  2473. "key": "collection/b",
  2474. "options": {
  2475. "hasCommittedMutations": false,
  2476. "hasLocalMutations": false
  2477. },
  2478. "value": {
  2479. "key": "b"
  2480. },
  2481. "version": 1001
  2482. }
  2483. ]
  2484. }
  2485. ],
  2486. "expectedState": {
  2487. "activeLimboDocs": [
  2488. ],
  2489. "activeTargets": {
  2490. "2": {
  2491. "queries": [
  2492. {
  2493. "filters": [
  2494. ],
  2495. "orderBys": [
  2496. ],
  2497. "path": "collection"
  2498. }
  2499. ],
  2500. "resumeToken": ""
  2501. }
  2502. }
  2503. }
  2504. }
  2505. ]
  2506. },
  2507. "Failed limbo resolution removes document from view": {
  2508. "describeName": "Limbo Documents:",
  2509. "itName": "Failed limbo resolution removes document from view",
  2510. "tags": [
  2511. ],
  2512. "config": {
  2513. "numClients": 1,
  2514. "useGarbageCollection": true
  2515. },
  2516. "steps": [
  2517. {
  2518. "userListen": {
  2519. "query": {
  2520. "filters": [
  2521. [
  2522. "matches",
  2523. "==",
  2524. true
  2525. ]
  2526. ],
  2527. "orderBys": [
  2528. ],
  2529. "path": "collection"
  2530. },
  2531. "targetId": 2
  2532. },
  2533. "expectedState": {
  2534. "activeTargets": {
  2535. "2": {
  2536. "queries": [
  2537. {
  2538. "filters": [
  2539. [
  2540. "matches",
  2541. "==",
  2542. true
  2543. ]
  2544. ],
  2545. "orderBys": [
  2546. ],
  2547. "path": "collection"
  2548. }
  2549. ],
  2550. "resumeToken": ""
  2551. }
  2552. }
  2553. }
  2554. },
  2555. {
  2556. "watchAck": [
  2557. 2
  2558. ]
  2559. },
  2560. {
  2561. "watchEntity": {
  2562. "docs": [
  2563. {
  2564. "key": "collection/a",
  2565. "options": {
  2566. "hasCommittedMutations": false,
  2567. "hasLocalMutations": false
  2568. },
  2569. "value": {
  2570. "matches": true
  2571. },
  2572. "version": 1000
  2573. }
  2574. ],
  2575. "targets": [
  2576. 2
  2577. ]
  2578. }
  2579. },
  2580. {
  2581. "watchCurrent": [
  2582. [
  2583. 2
  2584. ],
  2585. "resume-token-1000"
  2586. ]
  2587. },
  2588. {
  2589. "watchSnapshot": {
  2590. "targetIds": [
  2591. ],
  2592. "version": 1000
  2593. },
  2594. "expectedSnapshotEvents": [
  2595. {
  2596. "added": [
  2597. {
  2598. "key": "collection/a",
  2599. "options": {
  2600. "hasCommittedMutations": false,
  2601. "hasLocalMutations": false
  2602. },
  2603. "value": {
  2604. "matches": true
  2605. },
  2606. "version": 1000
  2607. }
  2608. ],
  2609. "errorCode": 0,
  2610. "fromCache": false,
  2611. "hasPendingWrites": false,
  2612. "query": {
  2613. "filters": [
  2614. [
  2615. "matches",
  2616. "==",
  2617. true
  2618. ]
  2619. ],
  2620. "orderBys": [
  2621. ],
  2622. "path": "collection"
  2623. }
  2624. }
  2625. ]
  2626. },
  2627. {
  2628. "userPatch": [
  2629. "collection/a",
  2630. {
  2631. "modified": true
  2632. }
  2633. ],
  2634. "expectedSnapshotEvents": [
  2635. {
  2636. "errorCode": 0,
  2637. "fromCache": false,
  2638. "hasPendingWrites": true,
  2639. "modified": [
  2640. {
  2641. "key": "collection/a",
  2642. "options": {
  2643. "hasCommittedMutations": false,
  2644. "hasLocalMutations": true
  2645. },
  2646. "value": {
  2647. "matches": true,
  2648. "modified": true
  2649. },
  2650. "version": 0
  2651. }
  2652. ],
  2653. "query": {
  2654. "filters": [
  2655. [
  2656. "matches",
  2657. "==",
  2658. true
  2659. ]
  2660. ],
  2661. "orderBys": [
  2662. ],
  2663. "path": "collection"
  2664. }
  2665. }
  2666. ]
  2667. },
  2668. {
  2669. "userUnlisten": [
  2670. 2,
  2671. {
  2672. "filters": [
  2673. [
  2674. "matches",
  2675. "==",
  2676. true
  2677. ]
  2678. ],
  2679. "orderBys": [
  2680. ],
  2681. "path": "collection"
  2682. }
  2683. ],
  2684. "expectedState": {
  2685. "activeTargets": {
  2686. }
  2687. }
  2688. },
  2689. {
  2690. "userListen": {
  2691. "query": {
  2692. "filters": [
  2693. ],
  2694. "orderBys": [
  2695. ],
  2696. "path": "collection"
  2697. },
  2698. "targetId": 4
  2699. },
  2700. "expectedSnapshotEvents": [
  2701. {
  2702. "added": [
  2703. {
  2704. "key": "collection/a",
  2705. "options": {
  2706. "hasCommittedMutations": false,
  2707. "hasLocalMutations": true
  2708. },
  2709. "value": {
  2710. "matches": true,
  2711. "modified": true
  2712. },
  2713. "version": 0
  2714. }
  2715. ],
  2716. "errorCode": 0,
  2717. "fromCache": true,
  2718. "hasPendingWrites": true,
  2719. "query": {
  2720. "filters": [
  2721. ],
  2722. "orderBys": [
  2723. ],
  2724. "path": "collection"
  2725. }
  2726. }
  2727. ],
  2728. "expectedState": {
  2729. "activeTargets": {
  2730. "4": {
  2731. "queries": [
  2732. {
  2733. "filters": [
  2734. ],
  2735. "orderBys": [
  2736. ],
  2737. "path": "collection"
  2738. }
  2739. ],
  2740. "resumeToken": ""
  2741. }
  2742. }
  2743. }
  2744. },
  2745. {
  2746. "watchAck": [
  2747. 4
  2748. ]
  2749. },
  2750. {
  2751. "watchEntity": {
  2752. "docs": [
  2753. ],
  2754. "targets": [
  2755. 4
  2756. ]
  2757. }
  2758. },
  2759. {
  2760. "watchCurrent": [
  2761. [
  2762. 4
  2763. ],
  2764. "resume-token-1001"
  2765. ]
  2766. },
  2767. {
  2768. "watchSnapshot": {
  2769. "targetIds": [
  2770. ],
  2771. "version": 1001
  2772. },
  2773. "expectedSnapshotEvents": [
  2774. {
  2775. "errorCode": 0,
  2776. "fromCache": false,
  2777. "hasPendingWrites": true,
  2778. "query": {
  2779. "filters": [
  2780. ],
  2781. "orderBys": [
  2782. ],
  2783. "path": "collection"
  2784. }
  2785. }
  2786. ]
  2787. },
  2788. {
  2789. "failWrite": {
  2790. "error": {
  2791. "code": 9
  2792. }
  2793. },
  2794. "expectedSnapshotEvents": [
  2795. {
  2796. "errorCode": 0,
  2797. "fromCache": true,
  2798. "hasPendingWrites": false,
  2799. "modified": [
  2800. {
  2801. "key": "collection/a",
  2802. "options": {
  2803. "hasCommittedMutations": false,
  2804. "hasLocalMutations": false
  2805. },
  2806. "value": {
  2807. "matches": true
  2808. },
  2809. "version": 1000
  2810. }
  2811. ],
  2812. "query": {
  2813. "filters": [
  2814. ],
  2815. "orderBys": [
  2816. ],
  2817. "path": "collection"
  2818. }
  2819. }
  2820. ],
  2821. "expectedState": {
  2822. "activeLimboDocs": [
  2823. "collection/a"
  2824. ],
  2825. "activeTargets": {
  2826. "1": {
  2827. "queries": [
  2828. {
  2829. "filters": [
  2830. ],
  2831. "orderBys": [
  2832. ],
  2833. "path": "collection/a"
  2834. }
  2835. ],
  2836. "resumeToken": "",
  2837. "targetPurpose": 2
  2838. },
  2839. "4": {
  2840. "queries": [
  2841. {
  2842. "filters": [
  2843. ],
  2844. "orderBys": [
  2845. ],
  2846. "path": "collection"
  2847. }
  2848. ],
  2849. "resumeToken": ""
  2850. }
  2851. },
  2852. "userCallbacks": {
  2853. "acknowledgedDocs": [
  2854. ],
  2855. "rejectedDocs": [
  2856. "collection/a"
  2857. ]
  2858. }
  2859. }
  2860. },
  2861. {
  2862. "watchRemove": {
  2863. "cause": {
  2864. "code": 7
  2865. },
  2866. "targetIds": [
  2867. 1
  2868. ]
  2869. },
  2870. "expectedSnapshotEvents": [
  2871. {
  2872. "errorCode": 0,
  2873. "fromCache": false,
  2874. "hasPendingWrites": false,
  2875. "query": {
  2876. "filters": [
  2877. ],
  2878. "orderBys": [
  2879. ],
  2880. "path": "collection"
  2881. },
  2882. "removed": [
  2883. {
  2884. "key": "collection/a",
  2885. "options": {
  2886. "hasCommittedMutations": false,
  2887. "hasLocalMutations": false
  2888. },
  2889. "value": {
  2890. "matches": true
  2891. },
  2892. "version": 1000
  2893. }
  2894. ]
  2895. }
  2896. ],
  2897. "expectedState": {
  2898. "activeLimboDocs": [
  2899. ],
  2900. "activeTargets": {
  2901. "4": {
  2902. "queries": [
  2903. {
  2904. "filters": [
  2905. ],
  2906. "orderBys": [
  2907. ],
  2908. "path": "collection"
  2909. }
  2910. ],
  2911. "resumeToken": ""
  2912. }
  2913. }
  2914. }
  2915. }
  2916. ]
  2917. },
  2918. "Limbo docs are resolved by primary client": {
  2919. "describeName": "Limbo Documents:",
  2920. "itName": "Limbo docs are resolved by primary client",
  2921. "tags": [
  2922. "multi-client"
  2923. ],
  2924. "config": {
  2925. "numClients": 2,
  2926. "useGarbageCollection": false
  2927. },
  2928. "steps": [
  2929. {
  2930. "clientIndex": 0,
  2931. "drainQueue": true,
  2932. "expectedState": {
  2933. "isPrimary": true
  2934. }
  2935. },
  2936. {
  2937. "clientIndex": 1,
  2938. "drainQueue": true
  2939. },
  2940. {
  2941. "clientIndex": 1,
  2942. "userListen": {
  2943. "query": {
  2944. "filters": [
  2945. ],
  2946. "orderBys": [
  2947. ],
  2948. "path": "collection"
  2949. },
  2950. "targetId": 2
  2951. },
  2952. "expectedState": {
  2953. "activeTargets": {
  2954. "2": {
  2955. "queries": [
  2956. {
  2957. "filters": [
  2958. ],
  2959. "orderBys": [
  2960. ],
  2961. "path": "collection"
  2962. }
  2963. ],
  2964. "resumeToken": ""
  2965. }
  2966. }
  2967. }
  2968. },
  2969. {
  2970. "clientIndex": 0,
  2971. "drainQueue": true,
  2972. "expectedState": {
  2973. "activeTargets": {
  2974. "2": {
  2975. "queries": [
  2976. {
  2977. "filters": [
  2978. ],
  2979. "orderBys": [
  2980. ],
  2981. "path": "collection"
  2982. }
  2983. ],
  2984. "resumeToken": ""
  2985. }
  2986. }
  2987. }
  2988. },
  2989. {
  2990. "clientIndex": 0,
  2991. "watchAck": [
  2992. 2
  2993. ]
  2994. },
  2995. {
  2996. "clientIndex": 0,
  2997. "watchEntity": {
  2998. "docs": [
  2999. {
  3000. "key": "collection/a",
  3001. "options": {
  3002. "hasCommittedMutations": false,
  3003. "hasLocalMutations": false
  3004. },
  3005. "value": {
  3006. "key": "a"
  3007. },
  3008. "version": 1000
  3009. },
  3010. {
  3011. "key": "collection/b",
  3012. "options": {
  3013. "hasCommittedMutations": false,
  3014. "hasLocalMutations": false
  3015. },
  3016. "value": {
  3017. "key": "b"
  3018. },
  3019. "version": 1001
  3020. }
  3021. ],
  3022. "targets": [
  3023. 2
  3024. ]
  3025. }
  3026. },
  3027. {
  3028. "clientIndex": 0,
  3029. "watchCurrent": [
  3030. [
  3031. 2
  3032. ],
  3033. "resume-token-1002"
  3034. ]
  3035. },
  3036. {
  3037. "clientIndex": 0,
  3038. "watchSnapshot": {
  3039. "targetIds": [
  3040. ],
  3041. "version": 1002
  3042. }
  3043. },
  3044. {
  3045. "clientIndex": 1,
  3046. "drainQueue": true,
  3047. "expectedSnapshotEvents": [
  3048. {
  3049. "added": [
  3050. {
  3051. "key": "collection/a",
  3052. "options": {
  3053. "hasCommittedMutations": false,
  3054. "hasLocalMutations": false
  3055. },
  3056. "value": {
  3057. "key": "a"
  3058. },
  3059. "version": 1000
  3060. },
  3061. {
  3062. "key": "collection/b",
  3063. "options": {
  3064. "hasCommittedMutations": false,
  3065. "hasLocalMutations": false
  3066. },
  3067. "value": {
  3068. "key": "b"
  3069. },
  3070. "version": 1001
  3071. }
  3072. ],
  3073. "errorCode": 0,
  3074. "fromCache": false,
  3075. "hasPendingWrites": false,
  3076. "query": {
  3077. "filters": [
  3078. ],
  3079. "orderBys": [
  3080. ],
  3081. "path": "collection"
  3082. }
  3083. }
  3084. ]
  3085. },
  3086. {
  3087. "clientIndex": 0,
  3088. "drainQueue": true
  3089. },
  3090. {
  3091. "clientIndex": 0,
  3092. "watchEntity": {
  3093. "key": "collection/b",
  3094. "removedTargets": [
  3095. 2
  3096. ]
  3097. }
  3098. },
  3099. {
  3100. "clientIndex": 0,
  3101. "watchSnapshot": {
  3102. "targetIds": [
  3103. ],
  3104. "version": 1003
  3105. },
  3106. "expectedState": {
  3107. "activeLimboDocs": [
  3108. "collection/b"
  3109. ],
  3110. "activeTargets": {
  3111. "1": {
  3112. "queries": [
  3113. {
  3114. "filters": [
  3115. ],
  3116. "orderBys": [
  3117. ],
  3118. "path": "collection/b"
  3119. }
  3120. ],
  3121. "resumeToken": "",
  3122. "targetPurpose": 2
  3123. },
  3124. "2": {
  3125. "queries": [
  3126. {
  3127. "filters": [
  3128. ],
  3129. "orderBys": [
  3130. ],
  3131. "path": "collection"
  3132. }
  3133. ],
  3134. "resumeToken": ""
  3135. }
  3136. }
  3137. }
  3138. },
  3139. {
  3140. "clientIndex": 1,
  3141. "drainQueue": true,
  3142. "expectedSnapshotEvents": [
  3143. {
  3144. "errorCode": 0,
  3145. "fromCache": true,
  3146. "hasPendingWrites": false,
  3147. "query": {
  3148. "filters": [
  3149. ],
  3150. "orderBys": [
  3151. ],
  3152. "path": "collection"
  3153. }
  3154. }
  3155. ]
  3156. },
  3157. {
  3158. "clientIndex": 0,
  3159. "drainQueue": true
  3160. },
  3161. {
  3162. "clientIndex": 0,
  3163. "watchAck": [
  3164. 1
  3165. ]
  3166. },
  3167. {
  3168. "clientIndex": 0,
  3169. "watchCurrent": [
  3170. [
  3171. 1
  3172. ],
  3173. "resume-token-1004"
  3174. ]
  3175. },
  3176. {
  3177. "clientIndex": 0,
  3178. "watchSnapshot": {
  3179. "targetIds": [
  3180. ],
  3181. "version": 1004
  3182. },
  3183. "expectedState": {
  3184. "activeLimboDocs": [
  3185. ],
  3186. "activeTargets": {
  3187. "2": {
  3188. "queries": [
  3189. {
  3190. "filters": [
  3191. ],
  3192. "orderBys": [
  3193. ],
  3194. "path": "collection"
  3195. }
  3196. ],
  3197. "resumeToken": ""
  3198. }
  3199. }
  3200. }
  3201. },
  3202. {
  3203. "clientIndex": 1,
  3204. "drainQueue": true,
  3205. "expectedSnapshotEvents": [
  3206. {
  3207. "errorCode": 0,
  3208. "fromCache": false,
  3209. "hasPendingWrites": false,
  3210. "query": {
  3211. "filters": [
  3212. ],
  3213. "orderBys": [
  3214. ],
  3215. "path": "collection"
  3216. },
  3217. "removed": [
  3218. {
  3219. "key": "collection/b",
  3220. "options": {
  3221. "hasCommittedMutations": false,
  3222. "hasLocalMutations": false
  3223. },
  3224. "value": {
  3225. "key": "b"
  3226. },
  3227. "version": 1001
  3228. }
  3229. ]
  3230. }
  3231. ]
  3232. }
  3233. ]
  3234. },
  3235. "Limbo documents are deleted with an existence filter": {
  3236. "describeName": "Limbo Documents:",
  3237. "itName": "Limbo documents are deleted with an existence filter",
  3238. "tags": [
  3239. ],
  3240. "config": {
  3241. "numClients": 1,
  3242. "useGarbageCollection": true
  3243. },
  3244. "steps": [
  3245. {
  3246. "userListen": {
  3247. "query": {
  3248. "filters": [
  3249. ],
  3250. "orderBys": [
  3251. ],
  3252. "path": "collection"
  3253. },
  3254. "targetId": 2
  3255. },
  3256. "expectedState": {
  3257. "activeTargets": {
  3258. "2": {
  3259. "queries": [
  3260. {
  3261. "filters": [
  3262. ],
  3263. "orderBys": [
  3264. ],
  3265. "path": "collection"
  3266. }
  3267. ],
  3268. "resumeToken": ""
  3269. }
  3270. }
  3271. }
  3272. },
  3273. {
  3274. "watchAck": [
  3275. 2
  3276. ]
  3277. },
  3278. {
  3279. "watchEntity": {
  3280. "docs": [
  3281. {
  3282. "key": "collection/a",
  3283. "options": {
  3284. "hasCommittedMutations": false,
  3285. "hasLocalMutations": false
  3286. },
  3287. "value": {
  3288. "key": "a"
  3289. },
  3290. "version": 1000
  3291. }
  3292. ],
  3293. "targets": [
  3294. 2
  3295. ]
  3296. }
  3297. },
  3298. {
  3299. "watchCurrent": [
  3300. [
  3301. 2
  3302. ],
  3303. "resume-token-1000"
  3304. ]
  3305. },
  3306. {
  3307. "watchSnapshot": {
  3308. "targetIds": [
  3309. ],
  3310. "version": 1000
  3311. },
  3312. "expectedSnapshotEvents": [
  3313. {
  3314. "added": [
  3315. {
  3316. "key": "collection/a",
  3317. "options": {
  3318. "hasCommittedMutations": false,
  3319. "hasLocalMutations": false
  3320. },
  3321. "value": {
  3322. "key": "a"
  3323. },
  3324. "version": 1000
  3325. }
  3326. ],
  3327. "errorCode": 0,
  3328. "fromCache": false,
  3329. "hasPendingWrites": false,
  3330. "query": {
  3331. "filters": [
  3332. ],
  3333. "orderBys": [
  3334. ],
  3335. "path": "collection"
  3336. }
  3337. }
  3338. ]
  3339. },
  3340. {
  3341. "watchReset": [
  3342. 2
  3343. ]
  3344. },
  3345. {
  3346. "watchCurrent": [
  3347. [
  3348. 2
  3349. ],
  3350. "resume-token-1001"
  3351. ]
  3352. },
  3353. {
  3354. "watchSnapshot": {
  3355. "targetIds": [
  3356. ],
  3357. "version": 1001
  3358. },
  3359. "expectedSnapshotEvents": [
  3360. {
  3361. "errorCode": 0,
  3362. "fromCache": true,
  3363. "hasPendingWrites": false,
  3364. "query": {
  3365. "filters": [
  3366. ],
  3367. "orderBys": [
  3368. ],
  3369. "path": "collection"
  3370. }
  3371. }
  3372. ],
  3373. "expectedState": {
  3374. "activeLimboDocs": [
  3375. "collection/a"
  3376. ],
  3377. "activeTargets": {
  3378. "1": {
  3379. "queries": [
  3380. {
  3381. "filters": [
  3382. ],
  3383. "orderBys": [
  3384. ],
  3385. "path": "collection/a"
  3386. }
  3387. ],
  3388. "resumeToken": "",
  3389. "targetPurpose": 2
  3390. },
  3391. "2": {
  3392. "queries": [
  3393. {
  3394. "filters": [
  3395. ],
  3396. "orderBys": [
  3397. ],
  3398. "path": "collection"
  3399. }
  3400. ],
  3401. "resumeToken": ""
  3402. }
  3403. }
  3404. }
  3405. },
  3406. {
  3407. "watchAck": [
  3408. 1
  3409. ]
  3410. },
  3411. {
  3412. "watchFilter": [
  3413. [
  3414. 1
  3415. ]
  3416. ]
  3417. },
  3418. {
  3419. "watchCurrent": [
  3420. [
  3421. 1
  3422. ],
  3423. "resume-token-1002"
  3424. ]
  3425. },
  3426. {
  3427. "watchSnapshot": {
  3428. "targetIds": [
  3429. ],
  3430. "version": 1002
  3431. },
  3432. "expectedSnapshotEvents": [
  3433. {
  3434. "errorCode": 0,
  3435. "fromCache": false,
  3436. "hasPendingWrites": false,
  3437. "query": {
  3438. "filters": [
  3439. ],
  3440. "orderBys": [
  3441. ],
  3442. "path": "collection"
  3443. },
  3444. "removed": [
  3445. {
  3446. "key": "collection/a",
  3447. "options": {
  3448. "hasCommittedMutations": false,
  3449. "hasLocalMutations": false
  3450. },
  3451. "value": {
  3452. "key": "a"
  3453. },
  3454. "version": 1000
  3455. }
  3456. ]
  3457. }
  3458. ],
  3459. "expectedState": {
  3460. "activeLimboDocs": [
  3461. ],
  3462. "activeTargets": {
  3463. "2": {
  3464. "queries": [
  3465. {
  3466. "filters": [
  3467. ],
  3468. "orderBys": [
  3469. ],
  3470. "path": "collection"
  3471. }
  3472. ],
  3473. "resumeToken": ""
  3474. }
  3475. }
  3476. }
  3477. }
  3478. ]
  3479. },
  3480. "Limbo documents are deleted without an existence filter": {
  3481. "describeName": "Limbo Documents:",
  3482. "itName": "Limbo documents are deleted without an existence filter",
  3483. "tags": [
  3484. ],
  3485. "config": {
  3486. "numClients": 1,
  3487. "useGarbageCollection": true
  3488. },
  3489. "steps": [
  3490. {
  3491. "userListen": {
  3492. "query": {
  3493. "filters": [
  3494. ],
  3495. "orderBys": [
  3496. ],
  3497. "path": "collection"
  3498. },
  3499. "targetId": 2
  3500. },
  3501. "expectedState": {
  3502. "activeTargets": {
  3503. "2": {
  3504. "queries": [
  3505. {
  3506. "filters": [
  3507. ],
  3508. "orderBys": [
  3509. ],
  3510. "path": "collection"
  3511. }
  3512. ],
  3513. "resumeToken": ""
  3514. }
  3515. }
  3516. }
  3517. },
  3518. {
  3519. "watchAck": [
  3520. 2
  3521. ]
  3522. },
  3523. {
  3524. "watchEntity": {
  3525. "docs": [
  3526. {
  3527. "key": "collection/a",
  3528. "options": {
  3529. "hasCommittedMutations": false,
  3530. "hasLocalMutations": false
  3531. },
  3532. "value": {
  3533. "key": "a"
  3534. },
  3535. "version": 1000
  3536. }
  3537. ],
  3538. "targets": [
  3539. 2
  3540. ]
  3541. }
  3542. },
  3543. {
  3544. "watchCurrent": [
  3545. [
  3546. 2
  3547. ],
  3548. "resume-token-1000"
  3549. ]
  3550. },
  3551. {
  3552. "watchSnapshot": {
  3553. "targetIds": [
  3554. ],
  3555. "version": 1000
  3556. },
  3557. "expectedSnapshotEvents": [
  3558. {
  3559. "added": [
  3560. {
  3561. "key": "collection/a",
  3562. "options": {
  3563. "hasCommittedMutations": false,
  3564. "hasLocalMutations": false
  3565. },
  3566. "value": {
  3567. "key": "a"
  3568. },
  3569. "version": 1000
  3570. }
  3571. ],
  3572. "errorCode": 0,
  3573. "fromCache": false,
  3574. "hasPendingWrites": false,
  3575. "query": {
  3576. "filters": [
  3577. ],
  3578. "orderBys": [
  3579. ],
  3580. "path": "collection"
  3581. }
  3582. }
  3583. ]
  3584. },
  3585. {
  3586. "watchReset": [
  3587. 2
  3588. ]
  3589. },
  3590. {
  3591. "watchCurrent": [
  3592. [
  3593. 2
  3594. ],
  3595. "resume-token-1001"
  3596. ]
  3597. },
  3598. {
  3599. "watchSnapshot": {
  3600. "targetIds": [
  3601. ],
  3602. "version": 1001
  3603. },
  3604. "expectedSnapshotEvents": [
  3605. {
  3606. "errorCode": 0,
  3607. "fromCache": true,
  3608. "hasPendingWrites": false,
  3609. "query": {
  3610. "filters": [
  3611. ],
  3612. "orderBys": [
  3613. ],
  3614. "path": "collection"
  3615. }
  3616. }
  3617. ],
  3618. "expectedState": {
  3619. "activeLimboDocs": [
  3620. "collection/a"
  3621. ],
  3622. "activeTargets": {
  3623. "1": {
  3624. "queries": [
  3625. {
  3626. "filters": [
  3627. ],
  3628. "orderBys": [
  3629. ],
  3630. "path": "collection/a"
  3631. }
  3632. ],
  3633. "resumeToken": "",
  3634. "targetPurpose": 2
  3635. },
  3636. "2": {
  3637. "queries": [
  3638. {
  3639. "filters": [
  3640. ],
  3641. "orderBys": [
  3642. ],
  3643. "path": "collection"
  3644. }
  3645. ],
  3646. "resumeToken": ""
  3647. }
  3648. }
  3649. }
  3650. },
  3651. {
  3652. "watchAck": [
  3653. 1
  3654. ]
  3655. },
  3656. {
  3657. "watchCurrent": [
  3658. [
  3659. 1
  3660. ],
  3661. "resume-token-2"
  3662. ]
  3663. },
  3664. {
  3665. "watchSnapshot": {
  3666. "targetIds": [
  3667. ],
  3668. "version": 1002
  3669. },
  3670. "expectedSnapshotEvents": [
  3671. {
  3672. "errorCode": 0,
  3673. "fromCache": false,
  3674. "hasPendingWrites": false,
  3675. "query": {
  3676. "filters": [
  3677. ],
  3678. "orderBys": [
  3679. ],
  3680. "path": "collection"
  3681. },
  3682. "removed": [
  3683. {
  3684. "key": "collection/a",
  3685. "options": {
  3686. "hasCommittedMutations": false,
  3687. "hasLocalMutations": false
  3688. },
  3689. "value": {
  3690. "key": "a"
  3691. },
  3692. "version": 1000
  3693. }
  3694. ]
  3695. }
  3696. ],
  3697. "expectedState": {
  3698. "activeLimboDocs": [
  3699. ],
  3700. "activeTargets": {
  3701. "2": {
  3702. "queries": [
  3703. {
  3704. "filters": [
  3705. ],
  3706. "orderBys": [
  3707. ],
  3708. "path": "collection"
  3709. }
  3710. ],
  3711. "resumeToken": ""
  3712. }
  3713. }
  3714. }
  3715. }
  3716. ]
  3717. },
  3718. "Limbo documents are resolved after primary tab failover": {
  3719. "describeName": "Limbo Documents:",
  3720. "itName": "Limbo documents are resolved after primary tab failover",
  3721. "tags": [
  3722. "multi-client"
  3723. ],
  3724. "config": {
  3725. "numClients": 2,
  3726. "useGarbageCollection": false
  3727. },
  3728. "steps": [
  3729. {
  3730. "clientIndex": 0,
  3731. "drainQueue": true,
  3732. "expectedState": {
  3733. "isPrimary": true
  3734. }
  3735. },
  3736. {
  3737. "clientIndex": 1,
  3738. "drainQueue": true
  3739. },
  3740. {
  3741. "clientIndex": 1,
  3742. "userListen": {
  3743. "query": {
  3744. "filters": [
  3745. ],
  3746. "orderBys": [
  3747. ],
  3748. "path": "collection"
  3749. },
  3750. "targetId": 2
  3751. },
  3752. "expectedState": {
  3753. "activeTargets": {
  3754. "2": {
  3755. "queries": [
  3756. {
  3757. "filters": [
  3758. ],
  3759. "orderBys": [
  3760. ],
  3761. "path": "collection"
  3762. }
  3763. ],
  3764. "resumeToken": ""
  3765. }
  3766. }
  3767. }
  3768. },
  3769. {
  3770. "clientIndex": 0,
  3771. "drainQueue": true,
  3772. "expectedState": {
  3773. "activeTargets": {
  3774. "2": {
  3775. "queries": [
  3776. {
  3777. "filters": [
  3778. ],
  3779. "orderBys": [
  3780. ],
  3781. "path": "collection"
  3782. }
  3783. ],
  3784. "resumeToken": ""
  3785. }
  3786. }
  3787. }
  3788. },
  3789. {
  3790. "clientIndex": 0,
  3791. "watchAck": [
  3792. 2
  3793. ]
  3794. },
  3795. {
  3796. "clientIndex": 0,
  3797. "watchEntity": {
  3798. "docs": [
  3799. {
  3800. "key": "collection/a",
  3801. "options": {
  3802. "hasCommittedMutations": false,
  3803. "hasLocalMutations": false
  3804. },
  3805. "value": {
  3806. "key": "a"
  3807. },
  3808. "version": 1000
  3809. },
  3810. {
  3811. "key": "collection/b",
  3812. "options": {
  3813. "hasCommittedMutations": false,
  3814. "hasLocalMutations": false
  3815. },
  3816. "value": {
  3817. "key": "b"
  3818. },
  3819. "version": 1001
  3820. }
  3821. ],
  3822. "targets": [
  3823. 2
  3824. ]
  3825. }
  3826. },
  3827. {
  3828. "clientIndex": 0,
  3829. "watchCurrent": [
  3830. [
  3831. 2
  3832. ],
  3833. "resume-token-1000000"
  3834. ]
  3835. },
  3836. {
  3837. "clientIndex": 0,
  3838. "watchSnapshot": {
  3839. "targetIds": [
  3840. ],
  3841. "version": 1000000
  3842. }
  3843. },
  3844. {
  3845. "clientIndex": 1,
  3846. "drainQueue": true,
  3847. "expectedSnapshotEvents": [
  3848. {
  3849. "added": [
  3850. {
  3851. "key": "collection/a",
  3852. "options": {
  3853. "hasCommittedMutations": false,
  3854. "hasLocalMutations": false
  3855. },
  3856. "value": {
  3857. "key": "a"
  3858. },
  3859. "version": 1000
  3860. },
  3861. {
  3862. "key": "collection/b",
  3863. "options": {
  3864. "hasCommittedMutations": false,
  3865. "hasLocalMutations": false
  3866. },
  3867. "value": {
  3868. "key": "b"
  3869. },
  3870. "version": 1001
  3871. }
  3872. ],
  3873. "errorCode": 0,
  3874. "fromCache": false,
  3875. "hasPendingWrites": false,
  3876. "query": {
  3877. "filters": [
  3878. ],
  3879. "orderBys": [
  3880. ],
  3881. "path": "collection"
  3882. }
  3883. }
  3884. ]
  3885. },
  3886. {
  3887. "clientIndex": 0,
  3888. "drainQueue": true
  3889. },
  3890. {
  3891. "clientIndex": 0,
  3892. "watchEntity": {
  3893. "key": "collection/b",
  3894. "removedTargets": [
  3895. 2
  3896. ]
  3897. }
  3898. },
  3899. {
  3900. "clientIndex": 0,
  3901. "watchSnapshot": {
  3902. "targetIds": [
  3903. ],
  3904. "version": 2000000
  3905. },
  3906. "expectedState": {
  3907. "activeLimboDocs": [
  3908. "collection/b"
  3909. ],
  3910. "activeTargets": {
  3911. "1": {
  3912. "queries": [
  3913. {
  3914. "filters": [
  3915. ],
  3916. "orderBys": [
  3917. ],
  3918. "path": "collection/b"
  3919. }
  3920. ],
  3921. "resumeToken": "",
  3922. "targetPurpose": 2
  3923. },
  3924. "2": {
  3925. "queries": [
  3926. {
  3927. "filters": [
  3928. ],
  3929. "orderBys": [
  3930. ],
  3931. "path": "collection"
  3932. }
  3933. ],
  3934. "resumeToken": ""
  3935. }
  3936. }
  3937. }
  3938. },
  3939. {
  3940. "clientIndex": 0,
  3941. "shutdown": true,
  3942. "expectedState": {
  3943. "activeLimboDocs": [
  3944. ],
  3945. "activeTargets": {
  3946. },
  3947. "enqueuedLimboDocs": [
  3948. ]
  3949. }
  3950. },
  3951. {
  3952. "clientIndex": 1,
  3953. "drainQueue": true,
  3954. "expectedSnapshotEvents": [
  3955. {
  3956. "errorCode": 0,
  3957. "fromCache": true,
  3958. "hasPendingWrites": false,
  3959. "query": {
  3960. "filters": [
  3961. ],
  3962. "orderBys": [
  3963. ],
  3964. "path": "collection"
  3965. }
  3966. }
  3967. ]
  3968. },
  3969. {
  3970. "clientIndex": 1,
  3971. "runTimer": "client_metadata_refresh",
  3972. "expectedState": {
  3973. "activeTargets": {
  3974. "2": {
  3975. "queries": [
  3976. {
  3977. "filters": [
  3978. ],
  3979. "orderBys": [
  3980. ],
  3981. "path": "collection"
  3982. }
  3983. ],
  3984. "resumeToken": "resume-token-1000000"
  3985. }
  3986. },
  3987. "isPrimary": true
  3988. }
  3989. },
  3990. {
  3991. "clientIndex": 1,
  3992. "watchAck": [
  3993. 2
  3994. ]
  3995. },
  3996. {
  3997. "clientIndex": 1,
  3998. "watchEntity": {
  3999. "docs": [
  4000. ],
  4001. "targets": [
  4002. 2
  4003. ]
  4004. }
  4005. },
  4006. {
  4007. "clientIndex": 1,
  4008. "watchCurrent": [
  4009. [
  4010. 2
  4011. ],
  4012. "resume-token-3000000"
  4013. ]
  4014. },
  4015. {
  4016. "clientIndex": 1,
  4017. "watchSnapshot": {
  4018. "targetIds": [
  4019. ],
  4020. "version": 3000000
  4021. },
  4022. "expectedState": {
  4023. "activeLimboDocs": [
  4024. "collection/b"
  4025. ],
  4026. "activeTargets": {
  4027. "1": {
  4028. "queries": [
  4029. {
  4030. "filters": [
  4031. ],
  4032. "orderBys": [
  4033. ],
  4034. "path": "collection/b"
  4035. }
  4036. ],
  4037. "resumeToken": "",
  4038. "targetPurpose": 2
  4039. },
  4040. "2": {
  4041. "queries": [
  4042. {
  4043. "filters": [
  4044. ],
  4045. "orderBys": [
  4046. ],
  4047. "path": "collection"
  4048. }
  4049. ],
  4050. "resumeToken": "resume-token-1000000"
  4051. }
  4052. }
  4053. }
  4054. },
  4055. {
  4056. "clientIndex": 1,
  4057. "watchAck": [
  4058. 1
  4059. ]
  4060. },
  4061. {
  4062. "clientIndex": 1,
  4063. "watchCurrent": [
  4064. [
  4065. 1
  4066. ],
  4067. "resume-token-4000000"
  4068. ]
  4069. },
  4070. {
  4071. "clientIndex": 1,
  4072. "watchSnapshot": {
  4073. "targetIds": [
  4074. ],
  4075. "version": 4000000
  4076. },
  4077. "expectedSnapshotEvents": [
  4078. {
  4079. "errorCode": 0,
  4080. "fromCache": false,
  4081. "hasPendingWrites": false,
  4082. "query": {
  4083. "filters": [
  4084. ],
  4085. "orderBys": [
  4086. ],
  4087. "path": "collection"
  4088. },
  4089. "removed": [
  4090. {
  4091. "key": "collection/b",
  4092. "options": {
  4093. "hasCommittedMutations": false,
  4094. "hasLocalMutations": false
  4095. },
  4096. "value": {
  4097. "key": "b"
  4098. },
  4099. "version": 1001
  4100. }
  4101. ]
  4102. }
  4103. ],
  4104. "expectedState": {
  4105. "activeLimboDocs": [
  4106. ],
  4107. "activeTargets": {
  4108. "2": {
  4109. "queries": [
  4110. {
  4111. "filters": [
  4112. ],
  4113. "orderBys": [
  4114. ],
  4115. "path": "collection"
  4116. }
  4117. ],
  4118. "resumeToken": "resume-token-1000000"
  4119. }
  4120. }
  4121. }
  4122. }
  4123. ]
  4124. },
  4125. "Limbo documents are resolved with updates": {
  4126. "describeName": "Limbo Documents:",
  4127. "itName": "Limbo documents are resolved with updates",
  4128. "tags": [
  4129. ],
  4130. "config": {
  4131. "numClients": 1,
  4132. "useGarbageCollection": true
  4133. },
  4134. "steps": [
  4135. {
  4136. "userListen": {
  4137. "query": {
  4138. "filters": [
  4139. [
  4140. "key",
  4141. "==",
  4142. "a"
  4143. ]
  4144. ],
  4145. "orderBys": [
  4146. ],
  4147. "path": "collection"
  4148. },
  4149. "targetId": 2
  4150. },
  4151. "expectedState": {
  4152. "activeTargets": {
  4153. "2": {
  4154. "queries": [
  4155. {
  4156. "filters": [
  4157. [
  4158. "key",
  4159. "==",
  4160. "a"
  4161. ]
  4162. ],
  4163. "orderBys": [
  4164. ],
  4165. "path": "collection"
  4166. }
  4167. ],
  4168. "resumeToken": ""
  4169. }
  4170. }
  4171. }
  4172. },
  4173. {
  4174. "watchAck": [
  4175. 2
  4176. ]
  4177. },
  4178. {
  4179. "watchEntity": {
  4180. "docs": [
  4181. {
  4182. "key": "collection/a",
  4183. "options": {
  4184. "hasCommittedMutations": false,
  4185. "hasLocalMutations": false
  4186. },
  4187. "value": {
  4188. "key": "a"
  4189. },
  4190. "version": 1000
  4191. }
  4192. ],
  4193. "targets": [
  4194. 2
  4195. ]
  4196. }
  4197. },
  4198. {
  4199. "watchCurrent": [
  4200. [
  4201. 2
  4202. ],
  4203. "resume-token-1000"
  4204. ]
  4205. },
  4206. {
  4207. "watchSnapshot": {
  4208. "targetIds": [
  4209. ],
  4210. "version": 1000
  4211. },
  4212. "expectedSnapshotEvents": [
  4213. {
  4214. "added": [
  4215. {
  4216. "key": "collection/a",
  4217. "options": {
  4218. "hasCommittedMutations": false,
  4219. "hasLocalMutations": false
  4220. },
  4221. "value": {
  4222. "key": "a"
  4223. },
  4224. "version": 1000
  4225. }
  4226. ],
  4227. "errorCode": 0,
  4228. "fromCache": false,
  4229. "hasPendingWrites": false,
  4230. "query": {
  4231. "filters": [
  4232. [
  4233. "key",
  4234. "==",
  4235. "a"
  4236. ]
  4237. ],
  4238. "orderBys": [
  4239. ],
  4240. "path": "collection"
  4241. }
  4242. }
  4243. ]
  4244. },
  4245. {
  4246. "watchReset": [
  4247. 2
  4248. ]
  4249. },
  4250. {
  4251. "watchCurrent": [
  4252. [
  4253. 2
  4254. ],
  4255. "resume-token-1001"
  4256. ]
  4257. },
  4258. {
  4259. "watchSnapshot": {
  4260. "targetIds": [
  4261. ],
  4262. "version": 1001
  4263. },
  4264. "expectedSnapshotEvents": [
  4265. {
  4266. "errorCode": 0,
  4267. "fromCache": true,
  4268. "hasPendingWrites": false,
  4269. "query": {
  4270. "filters": [
  4271. [
  4272. "key",
  4273. "==",
  4274. "a"
  4275. ]
  4276. ],
  4277. "orderBys": [
  4278. ],
  4279. "path": "collection"
  4280. }
  4281. }
  4282. ],
  4283. "expectedState": {
  4284. "activeLimboDocs": [
  4285. "collection/a"
  4286. ],
  4287. "activeTargets": {
  4288. "1": {
  4289. "queries": [
  4290. {
  4291. "filters": [
  4292. ],
  4293. "orderBys": [
  4294. ],
  4295. "path": "collection/a"
  4296. }
  4297. ],
  4298. "resumeToken": "",
  4299. "targetPurpose": 2
  4300. },
  4301. "2": {
  4302. "queries": [
  4303. {
  4304. "filters": [
  4305. [
  4306. "key",
  4307. "==",
  4308. "a"
  4309. ]
  4310. ],
  4311. "orderBys": [
  4312. ],
  4313. "path": "collection"
  4314. }
  4315. ],
  4316. "resumeToken": ""
  4317. }
  4318. }
  4319. }
  4320. },
  4321. {
  4322. "watchAck": [
  4323. 1
  4324. ]
  4325. },
  4326. {
  4327. "watchEntity": {
  4328. "docs": [
  4329. {
  4330. "key": "collection/a",
  4331. "options": {
  4332. "hasCommittedMutations": false,
  4333. "hasLocalMutations": false
  4334. },
  4335. "value": {
  4336. "key": "b"
  4337. },
  4338. "version": 1002
  4339. }
  4340. ],
  4341. "targets": [
  4342. 1
  4343. ]
  4344. }
  4345. },
  4346. {
  4347. "watchCurrent": [
  4348. [
  4349. 1
  4350. ],
  4351. "resume-token-1002"
  4352. ]
  4353. },
  4354. {
  4355. "watchSnapshot": {
  4356. "targetIds": [
  4357. ],
  4358. "version": 1002
  4359. },
  4360. "expectedSnapshotEvents": [
  4361. {
  4362. "errorCode": 0,
  4363. "fromCache": false,
  4364. "hasPendingWrites": false,
  4365. "query": {
  4366. "filters": [
  4367. [
  4368. "key",
  4369. "==",
  4370. "a"
  4371. ]
  4372. ],
  4373. "orderBys": [
  4374. ],
  4375. "path": "collection"
  4376. },
  4377. "removed": [
  4378. {
  4379. "key": "collection/a",
  4380. "options": {
  4381. "hasCommittedMutations": false,
  4382. "hasLocalMutations": false
  4383. },
  4384. "value": {
  4385. "key": "a"
  4386. },
  4387. "version": 1000
  4388. }
  4389. ]
  4390. }
  4391. ],
  4392. "expectedState": {
  4393. "activeLimboDocs": [
  4394. ],
  4395. "activeTargets": {
  4396. "2": {
  4397. "queries": [
  4398. {
  4399. "filters": [
  4400. [
  4401. "key",
  4402. "==",
  4403. "a"
  4404. ]
  4405. ],
  4406. "orderBys": [
  4407. ],
  4408. "path": "collection"
  4409. }
  4410. ],
  4411. "resumeToken": ""
  4412. }
  4413. }
  4414. }
  4415. }
  4416. ]
  4417. },
  4418. "Limbo documents are resolved with updates in different snapshot than \"current\"": {
  4419. "describeName": "Limbo Documents:",
  4420. "itName": "Limbo documents are resolved with updates in different snapshot than \"current\"",
  4421. "tags": [
  4422. ],
  4423. "config": {
  4424. "numClients": 1,
  4425. "useGarbageCollection": true
  4426. },
  4427. "steps": [
  4428. {
  4429. "userListen": {
  4430. "query": {
  4431. "filters": [
  4432. [
  4433. "key",
  4434. "==",
  4435. "a"
  4436. ]
  4437. ],
  4438. "orderBys": [
  4439. ],
  4440. "path": "collection"
  4441. },
  4442. "targetId": 2
  4443. },
  4444. "expectedState": {
  4445. "activeTargets": {
  4446. "2": {
  4447. "queries": [
  4448. {
  4449. "filters": [
  4450. [
  4451. "key",
  4452. "==",
  4453. "a"
  4454. ]
  4455. ],
  4456. "orderBys": [
  4457. ],
  4458. "path": "collection"
  4459. }
  4460. ],
  4461. "resumeToken": ""
  4462. }
  4463. }
  4464. }
  4465. },
  4466. {
  4467. "watchAck": [
  4468. 2
  4469. ]
  4470. },
  4471. {
  4472. "watchEntity": {
  4473. "docs": [
  4474. {
  4475. "key": "collection/a",
  4476. "options": {
  4477. "hasCommittedMutations": false,
  4478. "hasLocalMutations": false
  4479. },
  4480. "value": {
  4481. "key": "a"
  4482. },
  4483. "version": 1000
  4484. }
  4485. ],
  4486. "targets": [
  4487. 2
  4488. ]
  4489. }
  4490. },
  4491. {
  4492. "watchCurrent": [
  4493. [
  4494. 2
  4495. ],
  4496. "resume-token-1000"
  4497. ]
  4498. },
  4499. {
  4500. "watchSnapshot": {
  4501. "targetIds": [
  4502. ],
  4503. "version": 1000
  4504. },
  4505. "expectedSnapshotEvents": [
  4506. {
  4507. "added": [
  4508. {
  4509. "key": "collection/a",
  4510. "options": {
  4511. "hasCommittedMutations": false,
  4512. "hasLocalMutations": false
  4513. },
  4514. "value": {
  4515. "key": "a"
  4516. },
  4517. "version": 1000
  4518. }
  4519. ],
  4520. "errorCode": 0,
  4521. "fromCache": false,
  4522. "hasPendingWrites": false,
  4523. "query": {
  4524. "filters": [
  4525. [
  4526. "key",
  4527. "==",
  4528. "a"
  4529. ]
  4530. ],
  4531. "orderBys": [
  4532. ],
  4533. "path": "collection"
  4534. }
  4535. }
  4536. ]
  4537. },
  4538. {
  4539. "userListen": {
  4540. "query": {
  4541. "filters": [
  4542. [
  4543. "key",
  4544. "==",
  4545. "b"
  4546. ]
  4547. ],
  4548. "orderBys": [
  4549. ],
  4550. "path": "collection"
  4551. },
  4552. "targetId": 4
  4553. },
  4554. "expectedState": {
  4555. "activeTargets": {
  4556. "2": {
  4557. "queries": [
  4558. {
  4559. "filters": [
  4560. [
  4561. "key",
  4562. "==",
  4563. "a"
  4564. ]
  4565. ],
  4566. "orderBys": [
  4567. ],
  4568. "path": "collection"
  4569. }
  4570. ],
  4571. "resumeToken": ""
  4572. },
  4573. "4": {
  4574. "queries": [
  4575. {
  4576. "filters": [
  4577. [
  4578. "key",
  4579. "==",
  4580. "b"
  4581. ]
  4582. ],
  4583. "orderBys": [
  4584. ],
  4585. "path": "collection"
  4586. }
  4587. ],
  4588. "resumeToken": ""
  4589. }
  4590. }
  4591. }
  4592. },
  4593. {
  4594. "watchReset": [
  4595. 2
  4596. ]
  4597. },
  4598. {
  4599. "watchCurrent": [
  4600. [
  4601. 2
  4602. ],
  4603. "resume-token-1001"
  4604. ]
  4605. },
  4606. {
  4607. "watchSnapshot": {
  4608. "targetIds": [
  4609. ],
  4610. "version": 1001
  4611. },
  4612. "expectedSnapshotEvents": [
  4613. {
  4614. "errorCode": 0,
  4615. "fromCache": true,
  4616. "hasPendingWrites": false,
  4617. "query": {
  4618. "filters": [
  4619. [
  4620. "key",
  4621. "==",
  4622. "a"
  4623. ]
  4624. ],
  4625. "orderBys": [
  4626. ],
  4627. "path": "collection"
  4628. }
  4629. }
  4630. ],
  4631. "expectedState": {
  4632. "activeLimboDocs": [
  4633. "collection/a"
  4634. ],
  4635. "activeTargets": {
  4636. "1": {
  4637. "queries": [
  4638. {
  4639. "filters": [
  4640. ],
  4641. "orderBys": [
  4642. ],
  4643. "path": "collection/a"
  4644. }
  4645. ],
  4646. "resumeToken": "",
  4647. "targetPurpose": 2
  4648. },
  4649. "2": {
  4650. "queries": [
  4651. {
  4652. "filters": [
  4653. [
  4654. "key",
  4655. "==",
  4656. "a"
  4657. ]
  4658. ],
  4659. "orderBys": [
  4660. ],
  4661. "path": "collection"
  4662. }
  4663. ],
  4664. "resumeToken": ""
  4665. },
  4666. "4": {
  4667. "queries": [
  4668. {
  4669. "filters": [
  4670. [
  4671. "key",
  4672. "==",
  4673. "b"
  4674. ]
  4675. ],
  4676. "orderBys": [
  4677. ],
  4678. "path": "collection"
  4679. }
  4680. ],
  4681. "resumeToken": ""
  4682. }
  4683. }
  4684. }
  4685. },
  4686. {
  4687. "watchAck": [
  4688. 4
  4689. ]
  4690. },
  4691. {
  4692. "watchAck": [
  4693. 1
  4694. ]
  4695. },
  4696. {
  4697. "watchEntity": {
  4698. "docs": [
  4699. {
  4700. "key": "collection/a",
  4701. "options": {
  4702. "hasCommittedMutations": false,
  4703. "hasLocalMutations": false
  4704. },
  4705. "value": {
  4706. "key": "b"
  4707. },
  4708. "version": 1002
  4709. }
  4710. ],
  4711. "targets": [
  4712. 1,
  4713. 4
  4714. ]
  4715. }
  4716. },
  4717. {
  4718. "watchCurrent": [
  4719. [
  4720. 4
  4721. ],
  4722. "resume-token-1002"
  4723. ]
  4724. },
  4725. {
  4726. "watchSnapshot": {
  4727. "targetIds": [
  4728. ],
  4729. "version": 1002
  4730. },
  4731. "expectedSnapshotEvents": [
  4732. {
  4733. "errorCode": 0,
  4734. "fromCache": false,
  4735. "hasPendingWrites": false,
  4736. "query": {
  4737. "filters": [
  4738. [
  4739. "key",
  4740. "==",
  4741. "a"
  4742. ]
  4743. ],
  4744. "orderBys": [
  4745. ],
  4746. "path": "collection"
  4747. },
  4748. "removed": [
  4749. {
  4750. "key": "collection/a",
  4751. "options": {
  4752. "hasCommittedMutations": false,
  4753. "hasLocalMutations": false
  4754. },
  4755. "value": {
  4756. "key": "a"
  4757. },
  4758. "version": 1000
  4759. }
  4760. ]
  4761. },
  4762. {
  4763. "added": [
  4764. {
  4765. "key": "collection/a",
  4766. "options": {
  4767. "hasCommittedMutations": false,
  4768. "hasLocalMutations": false
  4769. },
  4770. "value": {
  4771. "key": "b"
  4772. },
  4773. "version": 1002
  4774. }
  4775. ],
  4776. "errorCode": 0,
  4777. "fromCache": false,
  4778. "hasPendingWrites": false,
  4779. "query": {
  4780. "filters": [
  4781. [
  4782. "key",
  4783. "==",
  4784. "b"
  4785. ]
  4786. ],
  4787. "orderBys": [
  4788. ],
  4789. "path": "collection"
  4790. }
  4791. }
  4792. ],
  4793. "expectedState": {
  4794. "activeLimboDocs": [
  4795. ],
  4796. "activeTargets": {
  4797. "2": {
  4798. "queries": [
  4799. {
  4800. "filters": [
  4801. [
  4802. "key",
  4803. "==",
  4804. "a"
  4805. ]
  4806. ],
  4807. "orderBys": [
  4808. ],
  4809. "path": "collection"
  4810. }
  4811. ],
  4812. "resumeToken": ""
  4813. },
  4814. "4": {
  4815. "queries": [
  4816. {
  4817. "filters": [
  4818. [
  4819. "key",
  4820. "==",
  4821. "b"
  4822. ]
  4823. ],
  4824. "orderBys": [
  4825. ],
  4826. "path": "collection"
  4827. }
  4828. ],
  4829. "resumeToken": ""
  4830. }
  4831. }
  4832. }
  4833. },
  4834. {
  4835. "watchCurrent": [
  4836. [
  4837. 1
  4838. ],
  4839. "resume-token-1003"
  4840. ]
  4841. },
  4842. {
  4843. "watchSnapshot": {
  4844. "targetIds": [
  4845. ],
  4846. "version": 1003
  4847. }
  4848. }
  4849. ]
  4850. },
  4851. "Limbo documents stay consistent between views": {
  4852. "describeName": "Limbo Documents:",
  4853. "itName": "Limbo documents stay consistent between views",
  4854. "tags": [
  4855. ],
  4856. "config": {
  4857. "numClients": 1,
  4858. "useGarbageCollection": false
  4859. },
  4860. "steps": [
  4861. {
  4862. "userSet": [
  4863. "collection/a",
  4864. {
  4865. "matches": true
  4866. }
  4867. ]
  4868. },
  4869. {
  4870. "userSet": [
  4871. "collection/b",
  4872. {
  4873. "matches": true
  4874. }
  4875. ]
  4876. },
  4877. {
  4878. "writeAck": {
  4879. "version": 1000
  4880. },
  4881. "expectedState": {
  4882. "userCallbacks": {
  4883. "acknowledgedDocs": [
  4884. "collection/a"
  4885. ],
  4886. "rejectedDocs": [
  4887. ]
  4888. }
  4889. }
  4890. },
  4891. {
  4892. "writeAck": {
  4893. "version": 1001
  4894. },
  4895. "expectedState": {
  4896. "userCallbacks": {
  4897. "acknowledgedDocs": [
  4898. "collection/b"
  4899. ],
  4900. "rejectedDocs": [
  4901. ]
  4902. }
  4903. }
  4904. },
  4905. {
  4906. "userListen": {
  4907. "query": {
  4908. "filters": [
  4909. ],
  4910. "orderBys": [
  4911. ],
  4912. "path": "collection"
  4913. },
  4914. "targetId": 2
  4915. },
  4916. "expectedSnapshotEvents": [
  4917. {
  4918. "added": [
  4919. {
  4920. "key": "collection/a",
  4921. "options": {
  4922. "hasCommittedMutations": true,
  4923. "hasLocalMutations": false
  4924. },
  4925. "value": {
  4926. "matches": true
  4927. },
  4928. "version": 1000
  4929. },
  4930. {
  4931. "key": "collection/b",
  4932. "options": {
  4933. "hasCommittedMutations": true,
  4934. "hasLocalMutations": false
  4935. },
  4936. "value": {
  4937. "matches": true
  4938. },
  4939. "version": 1001
  4940. }
  4941. ],
  4942. "errorCode": 0,
  4943. "fromCache": true,
  4944. "hasPendingWrites": false,
  4945. "query": {
  4946. "filters": [
  4947. ],
  4948. "orderBys": [
  4949. ],
  4950. "path": "collection"
  4951. }
  4952. }
  4953. ],
  4954. "expectedState": {
  4955. "activeTargets": {
  4956. "2": {
  4957. "queries": [
  4958. {
  4959. "filters": [
  4960. ],
  4961. "orderBys": [
  4962. ],
  4963. "path": "collection"
  4964. }
  4965. ],
  4966. "resumeToken": ""
  4967. }
  4968. }
  4969. }
  4970. },
  4971. {
  4972. "watchAck": [
  4973. 2
  4974. ]
  4975. },
  4976. {
  4977. "watchEntity": {
  4978. "docs": [
  4979. {
  4980. "key": "collection/a",
  4981. "options": {
  4982. "hasCommittedMutations": false,
  4983. "hasLocalMutations": false
  4984. },
  4985. "value": {
  4986. "matches": true
  4987. },
  4988. "version": 1000
  4989. }
  4990. ],
  4991. "targets": [
  4992. 2
  4993. ]
  4994. }
  4995. },
  4996. {
  4997. "watchCurrent": [
  4998. [
  4999. 2
  5000. ],
  5001. "resume-token-2000"
  5002. ]
  5003. },
  5004. {
  5005. "watchSnapshot": {
  5006. "targetIds": [
  5007. ],
  5008. "version": 2000
  5009. },
  5010. "expectedState": {
  5011. "activeLimboDocs": [
  5012. "collection/b"
  5013. ],
  5014. "activeTargets": {
  5015. "1": {
  5016. "queries": [
  5017. {
  5018. "filters": [
  5019. ],
  5020. "orderBys": [
  5021. ],
  5022. "path": "collection/b"
  5023. }
  5024. ],
  5025. "resumeToken": "",
  5026. "targetPurpose": 2
  5027. },
  5028. "2": {
  5029. "queries": [
  5030. {
  5031. "filters": [
  5032. ],
  5033. "orderBys": [
  5034. ],
  5035. "path": "collection"
  5036. }
  5037. ],
  5038. "resumeToken": ""
  5039. }
  5040. }
  5041. }
  5042. },
  5043. {
  5044. "userListen": {
  5045. "query": {
  5046. "filters": [
  5047. [
  5048. "matches",
  5049. "==",
  5050. true
  5051. ]
  5052. ],
  5053. "orderBys": [
  5054. ],
  5055. "path": "collection"
  5056. },
  5057. "targetId": 4
  5058. },
  5059. "expectedSnapshotEvents": [
  5060. {
  5061. "added": [
  5062. {
  5063. "key": "collection/a",
  5064. "options": {
  5065. "hasCommittedMutations": false,
  5066. "hasLocalMutations": false
  5067. },
  5068. "value": {
  5069. "matches": true
  5070. },
  5071. "version": 1000
  5072. },
  5073. {
  5074. "key": "collection/b",
  5075. "options": {
  5076. "hasCommittedMutations": true,
  5077. "hasLocalMutations": false
  5078. },
  5079. "value": {
  5080. "matches": true
  5081. },
  5082. "version": 1001
  5083. }
  5084. ],
  5085. "errorCode": 0,
  5086. "fromCache": true,
  5087. "hasPendingWrites": false,
  5088. "query": {
  5089. "filters": [
  5090. [
  5091. "matches",
  5092. "==",
  5093. true
  5094. ]
  5095. ],
  5096. "orderBys": [
  5097. ],
  5098. "path": "collection"
  5099. }
  5100. }
  5101. ],
  5102. "expectedState": {
  5103. "activeTargets": {
  5104. "1": {
  5105. "queries": [
  5106. {
  5107. "filters": [
  5108. ],
  5109. "orderBys": [
  5110. ],
  5111. "path": "collection/b"
  5112. }
  5113. ],
  5114. "resumeToken": "",
  5115. "targetPurpose": 2
  5116. },
  5117. "2": {
  5118. "queries": [
  5119. {
  5120. "filters": [
  5121. ],
  5122. "orderBys": [
  5123. ],
  5124. "path": "collection"
  5125. }
  5126. ],
  5127. "resumeToken": ""
  5128. },
  5129. "4": {
  5130. "queries": [
  5131. {
  5132. "filters": [
  5133. [
  5134. "matches",
  5135. "==",
  5136. true
  5137. ]
  5138. ],
  5139. "orderBys": [
  5140. ],
  5141. "path": "collection"
  5142. }
  5143. ],
  5144. "resumeToken": ""
  5145. }
  5146. }
  5147. }
  5148. },
  5149. {
  5150. "userUnlisten": [
  5151. 2,
  5152. {
  5153. "filters": [
  5154. ],
  5155. "orderBys": [
  5156. ],
  5157. "path": "collection"
  5158. }
  5159. ],
  5160. "expectedState": {
  5161. "activeLimboDocs": [
  5162. ],
  5163. "activeTargets": {
  5164. "4": {
  5165. "queries": [
  5166. {
  5167. "filters": [
  5168. [
  5169. "matches",
  5170. "==",
  5171. true
  5172. ]
  5173. ],
  5174. "orderBys": [
  5175. ],
  5176. "path": "collection"
  5177. }
  5178. ],
  5179. "resumeToken": ""
  5180. }
  5181. }
  5182. }
  5183. },
  5184. {
  5185. "userListen": {
  5186. "query": {
  5187. "filters": [
  5188. ],
  5189. "orderBys": [
  5190. ],
  5191. "path": "collection"
  5192. },
  5193. "targetId": 2
  5194. },
  5195. "expectedSnapshotEvents": [
  5196. {
  5197. "added": [
  5198. {
  5199. "key": "collection/a",
  5200. "options": {
  5201. "hasCommittedMutations": false,
  5202. "hasLocalMutations": false
  5203. },
  5204. "value": {
  5205. "matches": true
  5206. },
  5207. "version": 1000
  5208. },
  5209. {
  5210. "key": "collection/b",
  5211. "options": {
  5212. "hasCommittedMutations": true,
  5213. "hasLocalMutations": false
  5214. },
  5215. "value": {
  5216. "matches": true
  5217. },
  5218. "version": 1001
  5219. }
  5220. ],
  5221. "errorCode": 0,
  5222. "fromCache": true,
  5223. "hasPendingWrites": false,
  5224. "query": {
  5225. "filters": [
  5226. ],
  5227. "orderBys": [
  5228. ],
  5229. "path": "collection"
  5230. }
  5231. }
  5232. ],
  5233. "expectedState": {
  5234. "activeTargets": {
  5235. "2": {
  5236. "queries": [
  5237. {
  5238. "filters": [
  5239. ],
  5240. "orderBys": [
  5241. ],
  5242. "path": "collection"
  5243. }
  5244. ],
  5245. "resumeToken": "resume-token-2000"
  5246. },
  5247. "4": {
  5248. "queries": [
  5249. {
  5250. "filters": [
  5251. [
  5252. "matches",
  5253. "==",
  5254. true
  5255. ]
  5256. ],
  5257. "orderBys": [
  5258. ],
  5259. "path": "collection"
  5260. }
  5261. ],
  5262. "resumeToken": ""
  5263. }
  5264. }
  5265. }
  5266. }
  5267. ]
  5268. },
  5269. "Limbo documents survive primary state transitions": {
  5270. "describeName": "Limbo Documents:",
  5271. "itName": "Limbo documents survive primary state transitions",
  5272. "tags": [
  5273. "multi-client"
  5274. ],
  5275. "config": {
  5276. "numClients": 2,
  5277. "useGarbageCollection": false
  5278. },
  5279. "steps": [
  5280. {
  5281. "clientIndex": 0,
  5282. "drainQueue": true,
  5283. "expectedState": {
  5284. "isPrimary": true
  5285. }
  5286. },
  5287. {
  5288. "clientIndex": 0,
  5289. "userListen": {
  5290. "query": {
  5291. "filters": [
  5292. ],
  5293. "orderBys": [
  5294. ],
  5295. "path": "collection"
  5296. },
  5297. "targetId": 2
  5298. },
  5299. "expectedState": {
  5300. "activeTargets": {
  5301. "2": {
  5302. "queries": [
  5303. {
  5304. "filters": [
  5305. ],
  5306. "orderBys": [
  5307. ],
  5308. "path": "collection"
  5309. }
  5310. ],
  5311. "resumeToken": ""
  5312. }
  5313. }
  5314. }
  5315. },
  5316. {
  5317. "clientIndex": 0,
  5318. "watchAck": [
  5319. 2
  5320. ]
  5321. },
  5322. {
  5323. "clientIndex": 0,
  5324. "watchEntity": {
  5325. "docs": [
  5326. {
  5327. "key": "collection/a",
  5328. "options": {
  5329. "hasCommittedMutations": false,
  5330. "hasLocalMutations": false
  5331. },
  5332. "value": {
  5333. "key": "a"
  5334. },
  5335. "version": 1000
  5336. },
  5337. {
  5338. "key": "collection/b",
  5339. "options": {
  5340. "hasCommittedMutations": false,
  5341. "hasLocalMutations": false
  5342. },
  5343. "value": {
  5344. "key": "b"
  5345. },
  5346. "version": 1001
  5347. },
  5348. {
  5349. "key": "collection/c",
  5350. "options": {
  5351. "hasCommittedMutations": false,
  5352. "hasLocalMutations": false
  5353. },
  5354. "value": {
  5355. "key": "c"
  5356. },
  5357. "version": 1002
  5358. }
  5359. ],
  5360. "targets": [
  5361. 2
  5362. ]
  5363. }
  5364. },
  5365. {
  5366. "clientIndex": 0,
  5367. "watchCurrent": [
  5368. [
  5369. 2
  5370. ],
  5371. "resume-token-1000000"
  5372. ]
  5373. },
  5374. {
  5375. "clientIndex": 0,
  5376. "watchSnapshot": {
  5377. "targetIds": [
  5378. ],
  5379. "version": 1000000
  5380. },
  5381. "expectedSnapshotEvents": [
  5382. {
  5383. "added": [
  5384. {
  5385. "key": "collection/a",
  5386. "options": {
  5387. "hasCommittedMutations": false,
  5388. "hasLocalMutations": false
  5389. },
  5390. "value": {
  5391. "key": "a"
  5392. },
  5393. "version": 1000
  5394. },
  5395. {
  5396. "key": "collection/b",
  5397. "options": {
  5398. "hasCommittedMutations": false,
  5399. "hasLocalMutations": false
  5400. },
  5401. "value": {
  5402. "key": "b"
  5403. },
  5404. "version": 1001
  5405. },
  5406. {
  5407. "key": "collection/c",
  5408. "options": {
  5409. "hasCommittedMutations": false,
  5410. "hasLocalMutations": false
  5411. },
  5412. "value": {
  5413. "key": "c"
  5414. },
  5415. "version": 1002
  5416. }
  5417. ],
  5418. "errorCode": 0,
  5419. "fromCache": false,
  5420. "hasPendingWrites": false,
  5421. "query": {
  5422. "filters": [
  5423. ],
  5424. "orderBys": [
  5425. ],
  5426. "path": "collection"
  5427. }
  5428. }
  5429. ]
  5430. },
  5431. {
  5432. "clientIndex": 0,
  5433. "watchEntity": {
  5434. "key": "collection/b",
  5435. "removedTargets": [
  5436. 2
  5437. ]
  5438. }
  5439. },
  5440. {
  5441. "clientIndex": 0,
  5442. "watchEntity": {
  5443. "key": "collection/c",
  5444. "removedTargets": [
  5445. 2
  5446. ]
  5447. }
  5448. },
  5449. {
  5450. "clientIndex": 0,
  5451. "watchSnapshot": {
  5452. "targetIds": [
  5453. ],
  5454. "version": 2000000
  5455. },
  5456. "expectedSnapshotEvents": [
  5457. {
  5458. "errorCode": 0,
  5459. "fromCache": true,
  5460. "hasPendingWrites": false,
  5461. "query": {
  5462. "filters": [
  5463. ],
  5464. "orderBys": [
  5465. ],
  5466. "path": "collection"
  5467. }
  5468. }
  5469. ],
  5470. "expectedState": {
  5471. "activeLimboDocs": [
  5472. "collection/b",
  5473. "collection/c"
  5474. ],
  5475. "activeTargets": {
  5476. "1": {
  5477. "queries": [
  5478. {
  5479. "filters": [
  5480. ],
  5481. "orderBys": [
  5482. ],
  5483. "path": "collection/b"
  5484. }
  5485. ],
  5486. "resumeToken": "",
  5487. "targetPurpose": 2
  5488. },
  5489. "2": {
  5490. "queries": [
  5491. {
  5492. "filters": [
  5493. ],
  5494. "orderBys": [
  5495. ],
  5496. "path": "collection"
  5497. }
  5498. ],
  5499. "resumeToken": ""
  5500. },
  5501. "3": {
  5502. "queries": [
  5503. {
  5504. "filters": [
  5505. ],
  5506. "orderBys": [
  5507. ],
  5508. "path": "collection/c"
  5509. }
  5510. ],
  5511. "resumeToken": "",
  5512. "targetPurpose": 2
  5513. }
  5514. }
  5515. }
  5516. },
  5517. {
  5518. "clientIndex": 1,
  5519. "drainQueue": true
  5520. },
  5521. {
  5522. "applyClientState": {
  5523. "primary": true
  5524. },
  5525. "clientIndex": 1,
  5526. "expectedState": {
  5527. "activeTargets": {
  5528. "2": {
  5529. "queries": [
  5530. {
  5531. "filters": [
  5532. ],
  5533. "orderBys": [
  5534. ],
  5535. "path": "collection"
  5536. }
  5537. ],
  5538. "resumeToken": "resume-token-1000000"
  5539. }
  5540. },
  5541. "isPrimary": true
  5542. }
  5543. },
  5544. {
  5545. "clientIndex": 0,
  5546. "drainQueue": true
  5547. },
  5548. {
  5549. "clientIndex": 0,
  5550. "runTimer": "client_metadata_refresh",
  5551. "expectedState": {
  5552. "activeLimboDocs": [
  5553. ],
  5554. "activeTargets": {
  5555. "2": {
  5556. "queries": [
  5557. {
  5558. "filters": [
  5559. ],
  5560. "orderBys": [
  5561. ],
  5562. "path": "collection"
  5563. }
  5564. ],
  5565. "resumeToken": ""
  5566. }
  5567. },
  5568. "isPrimary": false
  5569. }
  5570. },
  5571. {
  5572. "clientIndex": 1,
  5573. "drainQueue": true
  5574. },
  5575. {
  5576. "clientIndex": 1,
  5577. "watchAck": [
  5578. 2
  5579. ]
  5580. },
  5581. {
  5582. "clientIndex": 1,
  5583. "watchEntity": {
  5584. "docs": [
  5585. ],
  5586. "targets": [
  5587. 2
  5588. ]
  5589. }
  5590. },
  5591. {
  5592. "clientIndex": 1,
  5593. "watchCurrent": [
  5594. [
  5595. 2
  5596. ],
  5597. "resume-token-3000000"
  5598. ]
  5599. },
  5600. {
  5601. "clientIndex": 1,
  5602. "watchSnapshot": {
  5603. "targetIds": [
  5604. ],
  5605. "version": 3000000
  5606. },
  5607. "expectedState": {
  5608. "activeLimboDocs": [
  5609. "collection/b",
  5610. "collection/c"
  5611. ],
  5612. "activeTargets": {
  5613. "1": {
  5614. "queries": [
  5615. {
  5616. "filters": [
  5617. ],
  5618. "orderBys": [
  5619. ],
  5620. "path": "collection/b"
  5621. }
  5622. ],
  5623. "resumeToken": "",
  5624. "targetPurpose": 2
  5625. },
  5626. "2": {
  5627. "queries": [
  5628. {
  5629. "filters": [
  5630. ],
  5631. "orderBys": [
  5632. ],
  5633. "path": "collection"
  5634. }
  5635. ],
  5636. "resumeToken": "resume-token-1000000"
  5637. },
  5638. "3": {
  5639. "queries": [
  5640. {
  5641. "filters": [
  5642. ],
  5643. "orderBys": [
  5644. ],
  5645. "path": "collection/c"
  5646. }
  5647. ],
  5648. "resumeToken": "",
  5649. "targetPurpose": 2
  5650. }
  5651. }
  5652. }
  5653. },
  5654. {
  5655. "clientIndex": 1,
  5656. "watchAck": [
  5657. 1
  5658. ]
  5659. },
  5660. {
  5661. "clientIndex": 1,
  5662. "watchCurrent": [
  5663. [
  5664. 1
  5665. ],
  5666. "resume-token-3000000"
  5667. ]
  5668. },
  5669. {
  5670. "clientIndex": 1,
  5671. "watchSnapshot": {
  5672. "targetIds": [
  5673. ],
  5674. "version": 3000000
  5675. },
  5676. "expectedState": {
  5677. "activeLimboDocs": [
  5678. "collection/c"
  5679. ],
  5680. "activeTargets": {
  5681. "2": {
  5682. "queries": [
  5683. {
  5684. "filters": [
  5685. ],
  5686. "orderBys": [
  5687. ],
  5688. "path": "collection"
  5689. }
  5690. ],
  5691. "resumeToken": "resume-token-1000000"
  5692. },
  5693. "3": {
  5694. "queries": [
  5695. {
  5696. "filters": [
  5697. ],
  5698. "orderBys": [
  5699. ],
  5700. "path": "collection/c"
  5701. }
  5702. ],
  5703. "resumeToken": "",
  5704. "targetPurpose": 2
  5705. }
  5706. }
  5707. }
  5708. },
  5709. {
  5710. "clientIndex": 0,
  5711. "drainQueue": true,
  5712. "expectedSnapshotEvents": [
  5713. {
  5714. "errorCode": 0,
  5715. "fromCache": true,
  5716. "hasPendingWrites": false,
  5717. "query": {
  5718. "filters": [
  5719. ],
  5720. "orderBys": [
  5721. ],
  5722. "path": "collection"
  5723. },
  5724. "removed": [
  5725. {
  5726. "key": "collection/b",
  5727. "options": {
  5728. "hasCommittedMutations": false,
  5729. "hasLocalMutations": false
  5730. },
  5731. "value": {
  5732. "key": "b"
  5733. },
  5734. "version": 1001
  5735. }
  5736. ]
  5737. }
  5738. ]
  5739. },
  5740. {
  5741. "applyClientState": {
  5742. "primary": true
  5743. },
  5744. "clientIndex": 0,
  5745. "expectedState": {
  5746. "activeTargets": {
  5747. "2": {
  5748. "queries": [
  5749. {
  5750. "filters": [
  5751. ],
  5752. "orderBys": [
  5753. ],
  5754. "path": "collection"
  5755. }
  5756. ],
  5757. "resumeToken": "resume-token-1000000"
  5758. }
  5759. },
  5760. "isPrimary": true
  5761. }
  5762. },
  5763. {
  5764. "clientIndex": 0,
  5765. "watchAck": [
  5766. 2
  5767. ]
  5768. },
  5769. {
  5770. "clientIndex": 0,
  5771. "watchEntity": {
  5772. "docs": [
  5773. ],
  5774. "targets": [
  5775. 2
  5776. ]
  5777. }
  5778. },
  5779. {
  5780. "clientIndex": 0,
  5781. "watchCurrent": [
  5782. [
  5783. 2
  5784. ],
  5785. "resume-token-5000000"
  5786. ]
  5787. },
  5788. {
  5789. "clientIndex": 0,
  5790. "watchSnapshot": {
  5791. "targetIds": [
  5792. ],
  5793. "version": 5000000
  5794. },
  5795. "expectedState": {
  5796. "activeLimboDocs": [
  5797. "collection/c"
  5798. ],
  5799. "activeTargets": {
  5800. "2": {
  5801. "queries": [
  5802. {
  5803. "filters": [
  5804. ],
  5805. "orderBys": [
  5806. ],
  5807. "path": "collection"
  5808. }
  5809. ],
  5810. "resumeToken": "resume-token-1000000"
  5811. },
  5812. "5": {
  5813. "queries": [
  5814. {
  5815. "filters": [
  5816. ],
  5817. "orderBys": [
  5818. ],
  5819. "path": "collection/c"
  5820. }
  5821. ],
  5822. "resumeToken": "",
  5823. "targetPurpose": 2
  5824. }
  5825. }
  5826. }
  5827. },
  5828. {
  5829. "clientIndex": 0,
  5830. "watchAck": [
  5831. 5
  5832. ]
  5833. },
  5834. {
  5835. "clientIndex": 0,
  5836. "watchCurrent": [
  5837. [
  5838. 5
  5839. ],
  5840. "resume-token-6000000"
  5841. ]
  5842. },
  5843. {
  5844. "clientIndex": 0,
  5845. "watchSnapshot": {
  5846. "targetIds": [
  5847. ],
  5848. "version": 6000000
  5849. },
  5850. "expectedSnapshotEvents": [
  5851. {
  5852. "errorCode": 0,
  5853. "fromCache": false,
  5854. "hasPendingWrites": false,
  5855. "query": {
  5856. "filters": [
  5857. ],
  5858. "orderBys": [
  5859. ],
  5860. "path": "collection"
  5861. },
  5862. "removed": [
  5863. {
  5864. "key": "collection/c",
  5865. "options": {
  5866. "hasCommittedMutations": false,
  5867. "hasLocalMutations": false
  5868. },
  5869. "value": {
  5870. "key": "c"
  5871. },
  5872. "version": 1002
  5873. }
  5874. ]
  5875. }
  5876. ],
  5877. "expectedState": {
  5878. "activeLimboDocs": [
  5879. ],
  5880. "activeTargets": {
  5881. "2": {
  5882. "queries": [
  5883. {
  5884. "filters": [
  5885. ],
  5886. "orderBys": [
  5887. ],
  5888. "path": "collection"
  5889. }
  5890. ],
  5891. "resumeToken": "resume-token-1000000"
  5892. }
  5893. }
  5894. }
  5895. }
  5896. ]
  5897. },
  5898. "Limbo resolution handles snapshot before CURRENT": {
  5899. "describeName": "Limbo Documents:",
  5900. "itName": "Limbo resolution handles snapshot before CURRENT",
  5901. "tags": [
  5902. ],
  5903. "config": {
  5904. "numClients": 1,
  5905. "useGarbageCollection": false
  5906. },
  5907. "steps": [
  5908. {
  5909. "userListen": {
  5910. "query": {
  5911. "filters": [
  5912. ],
  5913. "orderBys": [
  5914. ],
  5915. "path": "collection"
  5916. },
  5917. "targetId": 2
  5918. },
  5919. "expectedState": {
  5920. "activeTargets": {
  5921. "2": {
  5922. "queries": [
  5923. {
  5924. "filters": [
  5925. ],
  5926. "orderBys": [
  5927. ],
  5928. "path": "collection"
  5929. }
  5930. ],
  5931. "resumeToken": ""
  5932. }
  5933. }
  5934. }
  5935. },
  5936. {
  5937. "watchAck": [
  5938. 2
  5939. ]
  5940. },
  5941. {
  5942. "watchEntity": {
  5943. "docs": [
  5944. {
  5945. "key": "collection/a",
  5946. "options": {
  5947. "hasCommittedMutations": false,
  5948. "hasLocalMutations": false
  5949. },
  5950. "value": {
  5951. "include": true,
  5952. "key": "a"
  5953. },
  5954. "version": 1000
  5955. },
  5956. {
  5957. "key": "collection/b",
  5958. "options": {
  5959. "hasCommittedMutations": false,
  5960. "hasLocalMutations": false
  5961. },
  5962. "value": {
  5963. "include": true,
  5964. "key": "b"
  5965. },
  5966. "version": 1000
  5967. }
  5968. ],
  5969. "targets": [
  5970. 2
  5971. ]
  5972. }
  5973. },
  5974. {
  5975. "watchCurrent": [
  5976. [
  5977. 2
  5978. ],
  5979. "resume-token-1000"
  5980. ]
  5981. },
  5982. {
  5983. "watchSnapshot": {
  5984. "targetIds": [
  5985. ],
  5986. "version": 1000
  5987. },
  5988. "expectedSnapshotEvents": [
  5989. {
  5990. "added": [
  5991. {
  5992. "key": "collection/a",
  5993. "options": {
  5994. "hasCommittedMutations": false,
  5995. "hasLocalMutations": false
  5996. },
  5997. "value": {
  5998. "include": true,
  5999. "key": "a"
  6000. },
  6001. "version": 1000
  6002. },
  6003. {
  6004. "key": "collection/b",
  6005. "options": {
  6006. "hasCommittedMutations": false,
  6007. "hasLocalMutations": false
  6008. },
  6009. "value": {
  6010. "include": true,
  6011. "key": "b"
  6012. },
  6013. "version": 1000
  6014. }
  6015. ],
  6016. "errorCode": 0,
  6017. "fromCache": false,
  6018. "hasPendingWrites": false,
  6019. "query": {
  6020. "filters": [
  6021. ],
  6022. "orderBys": [
  6023. ],
  6024. "path": "collection"
  6025. }
  6026. }
  6027. ]
  6028. },
  6029. {
  6030. "userUnlisten": [
  6031. 2,
  6032. {
  6033. "filters": [
  6034. ],
  6035. "orderBys": [
  6036. ],
  6037. "path": "collection"
  6038. }
  6039. ],
  6040. "expectedState": {
  6041. "activeTargets": {
  6042. }
  6043. }
  6044. },
  6045. {
  6046. "userListen": {
  6047. "query": {
  6048. "filters": [
  6049. [
  6050. "include",
  6051. "==",
  6052. true
  6053. ]
  6054. ],
  6055. "limit": 1,
  6056. "limitType": "LimitToFirst",
  6057. "orderBys": [
  6058. ],
  6059. "path": "collection"
  6060. },
  6061. "targetId": 4
  6062. },
  6063. "expectedSnapshotEvents": [
  6064. {
  6065. "added": [
  6066. {
  6067. "key": "collection/a",
  6068. "options": {
  6069. "hasCommittedMutations": false,
  6070. "hasLocalMutations": false
  6071. },
  6072. "value": {
  6073. "include": true,
  6074. "key": "a"
  6075. },
  6076. "version": 1000
  6077. }
  6078. ],
  6079. "errorCode": 0,
  6080. "fromCache": true,
  6081. "hasPendingWrites": false,
  6082. "query": {
  6083. "filters": [
  6084. [
  6085. "include",
  6086. "==",
  6087. true
  6088. ]
  6089. ],
  6090. "limit": 1,
  6091. "limitType": "LimitToFirst",
  6092. "orderBys": [
  6093. ],
  6094. "path": "collection"
  6095. }
  6096. }
  6097. ],
  6098. "expectedState": {
  6099. "activeTargets": {
  6100. "4": {
  6101. "queries": [
  6102. {
  6103. "filters": [
  6104. [
  6105. "include",
  6106. "==",
  6107. true
  6108. ]
  6109. ],
  6110. "limit": 1,
  6111. "limitType": "LimitToFirst",
  6112. "orderBys": [
  6113. ],
  6114. "path": "collection"
  6115. }
  6116. ],
  6117. "resumeToken": ""
  6118. }
  6119. }
  6120. }
  6121. },
  6122. {
  6123. "watchAck": [
  6124. 4
  6125. ]
  6126. },
  6127. {
  6128. "watchEntity": {
  6129. "docs": [
  6130. {
  6131. "key": "collection/a",
  6132. "options": {
  6133. "hasCommittedMutations": false,
  6134. "hasLocalMutations": false
  6135. },
  6136. "value": {
  6137. "include": true,
  6138. "key": "a"
  6139. },
  6140. "version": 1000
  6141. }
  6142. ],
  6143. "targets": [
  6144. 4
  6145. ]
  6146. }
  6147. },
  6148. {
  6149. "watchCurrent": [
  6150. [
  6151. 4
  6152. ],
  6153. "resume-token-2000"
  6154. ]
  6155. },
  6156. {
  6157. "watchSnapshot": {
  6158. "targetIds": [
  6159. ],
  6160. "version": 2000
  6161. },
  6162. "expectedSnapshotEvents": [
  6163. {
  6164. "errorCode": 0,
  6165. "fromCache": false,
  6166. "hasPendingWrites": false,
  6167. "query": {
  6168. "filters": [
  6169. [
  6170. "include",
  6171. "==",
  6172. true
  6173. ]
  6174. ],
  6175. "limit": 1,
  6176. "limitType": "LimitToFirst",
  6177. "orderBys": [
  6178. ],
  6179. "path": "collection"
  6180. }
  6181. }
  6182. ]
  6183. },
  6184. {
  6185. "userPatch": [
  6186. "collection/a",
  6187. {
  6188. "include": false
  6189. }
  6190. ],
  6191. "expectedSnapshotEvents": [
  6192. {
  6193. "added": [
  6194. {
  6195. "key": "collection/b",
  6196. "options": {
  6197. "hasCommittedMutations": false,
  6198. "hasLocalMutations": false
  6199. },
  6200. "value": {
  6201. "include": true,
  6202. "key": "b"
  6203. },
  6204. "version": 1000
  6205. }
  6206. ],
  6207. "errorCode": 0,
  6208. "fromCache": true,
  6209. "hasPendingWrites": false,
  6210. "query": {
  6211. "filters": [
  6212. [
  6213. "include",
  6214. "==",
  6215. true
  6216. ]
  6217. ],
  6218. "limit": 1,
  6219. "limitType": "LimitToFirst",
  6220. "orderBys": [
  6221. ],
  6222. "path": "collection"
  6223. },
  6224. "removed": [
  6225. {
  6226. "key": "collection/a",
  6227. "options": {
  6228. "hasCommittedMutations": false,
  6229. "hasLocalMutations": false
  6230. },
  6231. "value": {
  6232. "include": true,
  6233. "key": "a"
  6234. },
  6235. "version": 1000
  6236. }
  6237. ]
  6238. }
  6239. ],
  6240. "expectedState": {
  6241. "activeLimboDocs": [
  6242. "collection/b"
  6243. ],
  6244. "activeTargets": {
  6245. "1": {
  6246. "queries": [
  6247. {
  6248. "filters": [
  6249. ],
  6250. "orderBys": [
  6251. ],
  6252. "path": "collection/b"
  6253. }
  6254. ],
  6255. "resumeToken": "",
  6256. "targetPurpose": 2
  6257. },
  6258. "4": {
  6259. "queries": [
  6260. {
  6261. "filters": [
  6262. [
  6263. "include",
  6264. "==",
  6265. true
  6266. ]
  6267. ],
  6268. "limit": 1,
  6269. "limitType": "LimitToFirst",
  6270. "orderBys": [
  6271. ],
  6272. "path": "collection"
  6273. }
  6274. ],
  6275. "resumeToken": ""
  6276. }
  6277. }
  6278. }
  6279. },
  6280. {
  6281. "watchAck": [
  6282. 1
  6283. ]
  6284. },
  6285. {
  6286. "watchEntity": {
  6287. "docs": [
  6288. {
  6289. "key": "collection/b",
  6290. "options": {
  6291. "hasCommittedMutations": false,
  6292. "hasLocalMutations": false
  6293. },
  6294. "value": {
  6295. "include": true,
  6296. "key": "b"
  6297. },
  6298. "version": 1000
  6299. }
  6300. ],
  6301. "targets": [
  6302. 1
  6303. ]
  6304. }
  6305. },
  6306. {
  6307. "watchSnapshot": {
  6308. "targetIds": [
  6309. ],
  6310. "version": 2000
  6311. }
  6312. },
  6313. {
  6314. "watchCurrent": [
  6315. [
  6316. 1
  6317. ],
  6318. "resume-token-3000"
  6319. ]
  6320. },
  6321. {
  6322. "watchSnapshot": {
  6323. "targetIds": [
  6324. ],
  6325. "version": 3000
  6326. }
  6327. },
  6328. {
  6329. "watchEntity": {
  6330. "docs": [
  6331. {
  6332. "key": "collection/a",
  6333. "options": {
  6334. "hasCommittedMutations": false,
  6335. "hasLocalMutations": false
  6336. },
  6337. "value": {
  6338. "include": true,
  6339. "key": "a"
  6340. },
  6341. "version": 1000
  6342. }
  6343. ],
  6344. "removedTargets": [
  6345. 4
  6346. ]
  6347. }
  6348. },
  6349. {
  6350. "watchEntity": {
  6351. "docs": [
  6352. {
  6353. "key": "collection/b",
  6354. "options": {
  6355. "hasCommittedMutations": false,
  6356. "hasLocalMutations": false
  6357. },
  6358. "value": {
  6359. "include": true,
  6360. "key": "b"
  6361. },
  6362. "version": 1000
  6363. }
  6364. ],
  6365. "targets": [
  6366. 4
  6367. ]
  6368. }
  6369. },
  6370. {
  6371. "watchSnapshot": {
  6372. "targetIds": [
  6373. ],
  6374. "version": 4000
  6375. },
  6376. "expectedSnapshotEvents": [
  6377. {
  6378. "errorCode": 0,
  6379. "fromCache": false,
  6380. "hasPendingWrites": false,
  6381. "query": {
  6382. "filters": [
  6383. [
  6384. "include",
  6385. "==",
  6386. true
  6387. ]
  6388. ],
  6389. "limit": 1,
  6390. "limitType": "LimitToFirst",
  6391. "orderBys": [
  6392. ],
  6393. "path": "collection"
  6394. }
  6395. }
  6396. ],
  6397. "expectedState": {
  6398. "activeLimboDocs": [
  6399. ],
  6400. "activeTargets": {
  6401. "4": {
  6402. "queries": [
  6403. {
  6404. "filters": [
  6405. [
  6406. "include",
  6407. "==",
  6408. true
  6409. ]
  6410. ],
  6411. "limit": 1,
  6412. "limitType": "LimitToFirst",
  6413. "orderBys": [
  6414. ],
  6415. "path": "collection"
  6416. }
  6417. ],
  6418. "resumeToken": ""
  6419. }
  6420. }
  6421. }
  6422. }
  6423. ]
  6424. },
  6425. "Limbo resolution handles snapshot before CURRENT [no document update]": {
  6426. "describeName": "Limbo Documents:",
  6427. "itName": "Limbo resolution handles snapshot before CURRENT [no document update]",
  6428. "tags": [
  6429. ],
  6430. "config": {
  6431. "numClients": 1,
  6432. "useGarbageCollection": false
  6433. },
  6434. "steps": [
  6435. {
  6436. "userListen": {
  6437. "query": {
  6438. "filters": [
  6439. ],
  6440. "orderBys": [
  6441. ],
  6442. "path": "collection"
  6443. },
  6444. "targetId": 2
  6445. },
  6446. "expectedState": {
  6447. "activeTargets": {
  6448. "2": {
  6449. "queries": [
  6450. {
  6451. "filters": [
  6452. ],
  6453. "orderBys": [
  6454. ],
  6455. "path": "collection"
  6456. }
  6457. ],
  6458. "resumeToken": ""
  6459. }
  6460. }
  6461. }
  6462. },
  6463. {
  6464. "watchAck": [
  6465. 2
  6466. ]
  6467. },
  6468. {
  6469. "watchEntity": {
  6470. "docs": [
  6471. {
  6472. "key": "collection/a",
  6473. "options": {
  6474. "hasCommittedMutations": false,
  6475. "hasLocalMutations": false
  6476. },
  6477. "value": {
  6478. "include": true,
  6479. "key": "a"
  6480. },
  6481. "version": 1000
  6482. },
  6483. {
  6484. "key": "collection/b",
  6485. "options": {
  6486. "hasCommittedMutations": false,
  6487. "hasLocalMutations": false
  6488. },
  6489. "value": {
  6490. "include": true,
  6491. "key": "b"
  6492. },
  6493. "version": 1000
  6494. }
  6495. ],
  6496. "targets": [
  6497. 2
  6498. ]
  6499. }
  6500. },
  6501. {
  6502. "watchCurrent": [
  6503. [
  6504. 2
  6505. ],
  6506. "resume-token-1000"
  6507. ]
  6508. },
  6509. {
  6510. "watchSnapshot": {
  6511. "targetIds": [
  6512. ],
  6513. "version": 1000
  6514. },
  6515. "expectedSnapshotEvents": [
  6516. {
  6517. "added": [
  6518. {
  6519. "key": "collection/a",
  6520. "options": {
  6521. "hasCommittedMutations": false,
  6522. "hasLocalMutations": false
  6523. },
  6524. "value": {
  6525. "include": true,
  6526. "key": "a"
  6527. },
  6528. "version": 1000
  6529. },
  6530. {
  6531. "key": "collection/b",
  6532. "options": {
  6533. "hasCommittedMutations": false,
  6534. "hasLocalMutations": false
  6535. },
  6536. "value": {
  6537. "include": true,
  6538. "key": "b"
  6539. },
  6540. "version": 1000
  6541. }
  6542. ],
  6543. "errorCode": 0,
  6544. "fromCache": false,
  6545. "hasPendingWrites": false,
  6546. "query": {
  6547. "filters": [
  6548. ],
  6549. "orderBys": [
  6550. ],
  6551. "path": "collection"
  6552. }
  6553. }
  6554. ]
  6555. },
  6556. {
  6557. "userUnlisten": [
  6558. 2,
  6559. {
  6560. "filters": [
  6561. ],
  6562. "orderBys": [
  6563. ],
  6564. "path": "collection"
  6565. }
  6566. ],
  6567. "expectedState": {
  6568. "activeTargets": {
  6569. }
  6570. }
  6571. },
  6572. {
  6573. "userListen": {
  6574. "query": {
  6575. "filters": [
  6576. [
  6577. "include",
  6578. "==",
  6579. true
  6580. ]
  6581. ],
  6582. "limit": 1,
  6583. "limitType": "LimitToFirst",
  6584. "orderBys": [
  6585. ],
  6586. "path": "collection"
  6587. },
  6588. "targetId": 4
  6589. },
  6590. "expectedSnapshotEvents": [
  6591. {
  6592. "added": [
  6593. {
  6594. "key": "collection/a",
  6595. "options": {
  6596. "hasCommittedMutations": false,
  6597. "hasLocalMutations": false
  6598. },
  6599. "value": {
  6600. "include": true,
  6601. "key": "a"
  6602. },
  6603. "version": 1000
  6604. }
  6605. ],
  6606. "errorCode": 0,
  6607. "fromCache": true,
  6608. "hasPendingWrites": false,
  6609. "query": {
  6610. "filters": [
  6611. [
  6612. "include",
  6613. "==",
  6614. true
  6615. ]
  6616. ],
  6617. "limit": 1,
  6618. "limitType": "LimitToFirst",
  6619. "orderBys": [
  6620. ],
  6621. "path": "collection"
  6622. }
  6623. }
  6624. ],
  6625. "expectedState": {
  6626. "activeTargets": {
  6627. "4": {
  6628. "queries": [
  6629. {
  6630. "filters": [
  6631. [
  6632. "include",
  6633. "==",
  6634. true
  6635. ]
  6636. ],
  6637. "limit": 1,
  6638. "limitType": "LimitToFirst",
  6639. "orderBys": [
  6640. ],
  6641. "path": "collection"
  6642. }
  6643. ],
  6644. "resumeToken": ""
  6645. }
  6646. }
  6647. }
  6648. },
  6649. {
  6650. "watchAck": [
  6651. 4
  6652. ]
  6653. },
  6654. {
  6655. "watchEntity": {
  6656. "docs": [
  6657. {
  6658. "key": "collection/a",
  6659. "options": {
  6660. "hasCommittedMutations": false,
  6661. "hasLocalMutations": false
  6662. },
  6663. "value": {
  6664. "include": true,
  6665. "key": "a"
  6666. },
  6667. "version": 1000
  6668. }
  6669. ],
  6670. "targets": [
  6671. 4
  6672. ]
  6673. }
  6674. },
  6675. {
  6676. "watchCurrent": [
  6677. [
  6678. 4
  6679. ],
  6680. "resume-token-2000"
  6681. ]
  6682. },
  6683. {
  6684. "watchSnapshot": {
  6685. "targetIds": [
  6686. ],
  6687. "version": 2000
  6688. },
  6689. "expectedSnapshotEvents": [
  6690. {
  6691. "errorCode": 0,
  6692. "fromCache": false,
  6693. "hasPendingWrites": false,
  6694. "query": {
  6695. "filters": [
  6696. [
  6697. "include",
  6698. "==",
  6699. true
  6700. ]
  6701. ],
  6702. "limit": 1,
  6703. "limitType": "LimitToFirst",
  6704. "orderBys": [
  6705. ],
  6706. "path": "collection"
  6707. }
  6708. }
  6709. ]
  6710. },
  6711. {
  6712. "userPatch": [
  6713. "collection/a",
  6714. {
  6715. "include": false
  6716. }
  6717. ],
  6718. "expectedSnapshotEvents": [
  6719. {
  6720. "added": [
  6721. {
  6722. "key": "collection/b",
  6723. "options": {
  6724. "hasCommittedMutations": false,
  6725. "hasLocalMutations": false
  6726. },
  6727. "value": {
  6728. "include": true,
  6729. "key": "b"
  6730. },
  6731. "version": 1000
  6732. }
  6733. ],
  6734. "errorCode": 0,
  6735. "fromCache": true,
  6736. "hasPendingWrites": false,
  6737. "query": {
  6738. "filters": [
  6739. [
  6740. "include",
  6741. "==",
  6742. true
  6743. ]
  6744. ],
  6745. "limit": 1,
  6746. "limitType": "LimitToFirst",
  6747. "orderBys": [
  6748. ],
  6749. "path": "collection"
  6750. },
  6751. "removed": [
  6752. {
  6753. "key": "collection/a",
  6754. "options": {
  6755. "hasCommittedMutations": false,
  6756. "hasLocalMutations": false
  6757. },
  6758. "value": {
  6759. "include": true,
  6760. "key": "a"
  6761. },
  6762. "version": 1000
  6763. }
  6764. ]
  6765. }
  6766. ],
  6767. "expectedState": {
  6768. "activeLimboDocs": [
  6769. "collection/b"
  6770. ],
  6771. "activeTargets": {
  6772. "1": {
  6773. "queries": [
  6774. {
  6775. "filters": [
  6776. ],
  6777. "orderBys": [
  6778. ],
  6779. "path": "collection/b"
  6780. }
  6781. ],
  6782. "resumeToken": "",
  6783. "targetPurpose": 2
  6784. },
  6785. "4": {
  6786. "queries": [
  6787. {
  6788. "filters": [
  6789. [
  6790. "include",
  6791. "==",
  6792. true
  6793. ]
  6794. ],
  6795. "limit": 1,
  6796. "limitType": "LimitToFirst",
  6797. "orderBys": [
  6798. ],
  6799. "path": "collection"
  6800. }
  6801. ],
  6802. "resumeToken": ""
  6803. }
  6804. }
  6805. }
  6806. },
  6807. {
  6808. "watchAck": [
  6809. 1
  6810. ]
  6811. },
  6812. {
  6813. "watchSnapshot": {
  6814. "targetIds": [
  6815. ],
  6816. "version": 2000
  6817. }
  6818. },
  6819. {
  6820. "watchCurrent": [
  6821. [
  6822. 1
  6823. ],
  6824. "resume-token-3000"
  6825. ]
  6826. },
  6827. {
  6828. "watchSnapshot": {
  6829. "targetIds": [
  6830. ],
  6831. "version": 3000
  6832. },
  6833. "expectedSnapshotEvents": [
  6834. {
  6835. "errorCode": 0,
  6836. "fromCache": false,
  6837. "hasPendingWrites": false,
  6838. "query": {
  6839. "filters": [
  6840. [
  6841. "include",
  6842. "==",
  6843. true
  6844. ]
  6845. ],
  6846. "limit": 1,
  6847. "limitType": "LimitToFirst",
  6848. "orderBys": [
  6849. ],
  6850. "path": "collection"
  6851. },
  6852. "removed": [
  6853. {
  6854. "key": "collection/b",
  6855. "options": {
  6856. "hasCommittedMutations": false,
  6857. "hasLocalMutations": false
  6858. },
  6859. "value": {
  6860. "include": true,
  6861. "key": "b"
  6862. },
  6863. "version": 1000
  6864. }
  6865. ]
  6866. }
  6867. ],
  6868. "expectedState": {
  6869. "activeLimboDocs": [
  6870. ],
  6871. "activeTargets": {
  6872. "4": {
  6873. "queries": [
  6874. {
  6875. "filters": [
  6876. [
  6877. "include",
  6878. "==",
  6879. true
  6880. ]
  6881. ],
  6882. "limit": 1,
  6883. "limitType": "LimitToFirst",
  6884. "orderBys": [
  6885. ],
  6886. "path": "collection"
  6887. }
  6888. ],
  6889. "resumeToken": ""
  6890. }
  6891. }
  6892. }
  6893. },
  6894. {
  6895. "watchEntity": {
  6896. "docs": [
  6897. {
  6898. "key": "collection/a",
  6899. "options": {
  6900. "hasCommittedMutations": false,
  6901. "hasLocalMutations": false
  6902. },
  6903. "value": {
  6904. "include": true,
  6905. "key": "a"
  6906. },
  6907. "version": 1000
  6908. }
  6909. ],
  6910. "removedTargets": [
  6911. 4
  6912. ]
  6913. }
  6914. },
  6915. {
  6916. "watchSnapshot": {
  6917. "targetIds": [
  6918. ],
  6919. "version": 4000
  6920. }
  6921. }
  6922. ]
  6923. },
  6924. "Limbo resolution throttling when a limbo listen is rejected.": {
  6925. "describeName": "Limbo Documents:",
  6926. "itName": "Limbo resolution throttling when a limbo listen is rejected.",
  6927. "tags": [
  6928. ],
  6929. "config": {
  6930. "maxConcurrentLimboResolutions": 1,
  6931. "numClients": 1,
  6932. "useGarbageCollection": true
  6933. },
  6934. "steps": [
  6935. {
  6936. "userListen": {
  6937. "query": {
  6938. "filters": [
  6939. ],
  6940. "orderBys": [
  6941. ],
  6942. "path": "collection"
  6943. },
  6944. "targetId": 2
  6945. },
  6946. "expectedState": {
  6947. "activeTargets": {
  6948. "2": {
  6949. "queries": [
  6950. {
  6951. "filters": [
  6952. ],
  6953. "orderBys": [
  6954. ],
  6955. "path": "collection"
  6956. }
  6957. ],
  6958. "resumeToken": ""
  6959. }
  6960. }
  6961. }
  6962. },
  6963. {
  6964. "watchAck": [
  6965. 2
  6966. ]
  6967. },
  6968. {
  6969. "watchEntity": {
  6970. "docs": [
  6971. {
  6972. "key": "collection/a",
  6973. "options": {
  6974. "hasCommittedMutations": false,
  6975. "hasLocalMutations": false
  6976. },
  6977. "value": {
  6978. "key": "a"
  6979. },
  6980. "version": 1000
  6981. },
  6982. {
  6983. "key": "collection/b",
  6984. "options": {
  6985. "hasCommittedMutations": false,
  6986. "hasLocalMutations": false
  6987. },
  6988. "value": {
  6989. "key": "b"
  6990. },
  6991. "version": 1000
  6992. }
  6993. ],
  6994. "targets": [
  6995. 2
  6996. ]
  6997. }
  6998. },
  6999. {
  7000. "watchCurrent": [
  7001. [
  7002. 2
  7003. ],
  7004. "resume-token-1000"
  7005. ]
  7006. },
  7007. {
  7008. "watchSnapshot": {
  7009. "targetIds": [
  7010. ],
  7011. "version": 1000
  7012. },
  7013. "expectedSnapshotEvents": [
  7014. {
  7015. "added": [
  7016. {
  7017. "key": "collection/a",
  7018. "options": {
  7019. "hasCommittedMutations": false,
  7020. "hasLocalMutations": false
  7021. },
  7022. "value": {
  7023. "key": "a"
  7024. },
  7025. "version": 1000
  7026. },
  7027. {
  7028. "key": "collection/b",
  7029. "options": {
  7030. "hasCommittedMutations": false,
  7031. "hasLocalMutations": false
  7032. },
  7033. "value": {
  7034. "key": "b"
  7035. },
  7036. "version": 1000
  7037. }
  7038. ],
  7039. "errorCode": 0,
  7040. "fromCache": false,
  7041. "hasPendingWrites": false,
  7042. "query": {
  7043. "filters": [
  7044. ],
  7045. "orderBys": [
  7046. ],
  7047. "path": "collection"
  7048. }
  7049. }
  7050. ]
  7051. },
  7052. {
  7053. "watchReset": [
  7054. 2
  7055. ]
  7056. },
  7057. {
  7058. "watchEntity": {
  7059. "docs": [
  7060. ],
  7061. "targets": [
  7062. 2
  7063. ]
  7064. }
  7065. },
  7066. {
  7067. "watchCurrent": [
  7068. [
  7069. 2
  7070. ],
  7071. "resume-token-1001"
  7072. ]
  7073. },
  7074. {
  7075. "watchSnapshot": {
  7076. "targetIds": [
  7077. ],
  7078. "version": 2000
  7079. },
  7080. "expectedSnapshotEvents": [
  7081. {
  7082. "errorCode": 0,
  7083. "fromCache": true,
  7084. "hasPendingWrites": false,
  7085. "query": {
  7086. "filters": [
  7087. ],
  7088. "orderBys": [
  7089. ],
  7090. "path": "collection"
  7091. }
  7092. }
  7093. ],
  7094. "expectedState": {
  7095. "activeLimboDocs": [
  7096. "collection/a"
  7097. ],
  7098. "activeTargets": {
  7099. "1": {
  7100. "queries": [
  7101. {
  7102. "filters": [
  7103. ],
  7104. "orderBys": [
  7105. ],
  7106. "path": "collection/a"
  7107. }
  7108. ],
  7109. "resumeToken": "",
  7110. "targetPurpose": 2
  7111. },
  7112. "2": {
  7113. "queries": [
  7114. {
  7115. "filters": [
  7116. ],
  7117. "orderBys": [
  7118. ],
  7119. "path": "collection"
  7120. }
  7121. ],
  7122. "resumeToken": ""
  7123. }
  7124. },
  7125. "enqueuedLimboDocs": [
  7126. "collection/b"
  7127. ]
  7128. }
  7129. },
  7130. {
  7131. "watchRemove": {
  7132. "cause": {
  7133. "code": 8
  7134. },
  7135. "targetIds": [
  7136. 1
  7137. ]
  7138. },
  7139. "expectedSnapshotEvents": [
  7140. {
  7141. "errorCode": 0,
  7142. "fromCache": true,
  7143. "hasPendingWrites": false,
  7144. "query": {
  7145. "filters": [
  7146. ],
  7147. "orderBys": [
  7148. ],
  7149. "path": "collection"
  7150. },
  7151. "removed": [
  7152. {
  7153. "key": "collection/a",
  7154. "options": {
  7155. "hasCommittedMutations": false,
  7156. "hasLocalMutations": false
  7157. },
  7158. "value": {
  7159. "key": "a"
  7160. },
  7161. "version": 1000
  7162. }
  7163. ]
  7164. }
  7165. ],
  7166. "expectedState": {
  7167. "activeLimboDocs": [
  7168. "collection/b"
  7169. ],
  7170. "activeTargets": {
  7171. "2": {
  7172. "queries": [
  7173. {
  7174. "filters": [
  7175. ],
  7176. "orderBys": [
  7177. ],
  7178. "path": "collection"
  7179. }
  7180. ],
  7181. "resumeToken": ""
  7182. },
  7183. "3": {
  7184. "queries": [
  7185. {
  7186. "filters": [
  7187. ],
  7188. "orderBys": [
  7189. ],
  7190. "path": "collection/b"
  7191. }
  7192. ],
  7193. "resumeToken": "",
  7194. "targetPurpose": 2
  7195. }
  7196. },
  7197. "enqueuedLimboDocs": [
  7198. ]
  7199. }
  7200. },
  7201. {
  7202. "watchRemove": {
  7203. "cause": {
  7204. "code": 8
  7205. },
  7206. "targetIds": [
  7207. 3
  7208. ]
  7209. },
  7210. "expectedSnapshotEvents": [
  7211. {
  7212. "errorCode": 0,
  7213. "fromCache": false,
  7214. "hasPendingWrites": false,
  7215. "query": {
  7216. "filters": [
  7217. ],
  7218. "orderBys": [
  7219. ],
  7220. "path": "collection"
  7221. },
  7222. "removed": [
  7223. {
  7224. "key": "collection/b",
  7225. "options": {
  7226. "hasCommittedMutations": false,
  7227. "hasLocalMutations": false
  7228. },
  7229. "value": {
  7230. "key": "b"
  7231. },
  7232. "version": 1000
  7233. }
  7234. ]
  7235. }
  7236. ],
  7237. "expectedState": {
  7238. "activeLimboDocs": [
  7239. ],
  7240. "activeTargets": {
  7241. "2": {
  7242. "queries": [
  7243. {
  7244. "filters": [
  7245. ],
  7246. "orderBys": [
  7247. ],
  7248. "path": "collection"
  7249. }
  7250. ],
  7251. "resumeToken": ""
  7252. }
  7253. },
  7254. "enqueuedLimboDocs": [
  7255. ]
  7256. }
  7257. }
  7258. ]
  7259. },
  7260. "Limbo resolution throttling with all results at once from watch": {
  7261. "describeName": "Limbo Documents:",
  7262. "itName": "Limbo resolution throttling with all results at once from watch",
  7263. "tags": [
  7264. ],
  7265. "config": {
  7266. "maxConcurrentLimboResolutions": 2,
  7267. "numClients": 1,
  7268. "useGarbageCollection": true
  7269. },
  7270. "steps": [
  7271. {
  7272. "userListen": {
  7273. "query": {
  7274. "filters": [
  7275. ],
  7276. "orderBys": [
  7277. ],
  7278. "path": "collection"
  7279. },
  7280. "targetId": 2
  7281. },
  7282. "expectedState": {
  7283. "activeTargets": {
  7284. "2": {
  7285. "queries": [
  7286. {
  7287. "filters": [
  7288. ],
  7289. "orderBys": [
  7290. ],
  7291. "path": "collection"
  7292. }
  7293. ],
  7294. "resumeToken": ""
  7295. }
  7296. }
  7297. }
  7298. },
  7299. {
  7300. "watchAck": [
  7301. 2
  7302. ]
  7303. },
  7304. {
  7305. "watchEntity": {
  7306. "docs": [
  7307. {
  7308. "key": "collection/a",
  7309. "options": {
  7310. "hasCommittedMutations": false,
  7311. "hasLocalMutations": false
  7312. },
  7313. "value": {
  7314. "key": "a"
  7315. },
  7316. "version": 1000
  7317. },
  7318. {
  7319. "key": "collection/b",
  7320. "options": {
  7321. "hasCommittedMutations": false,
  7322. "hasLocalMutations": false
  7323. },
  7324. "value": {
  7325. "key": "b"
  7326. },
  7327. "version": 1000
  7328. },
  7329. {
  7330. "key": "collection/c",
  7331. "options": {
  7332. "hasCommittedMutations": false,
  7333. "hasLocalMutations": false
  7334. },
  7335. "value": {
  7336. "key": "c"
  7337. },
  7338. "version": 1000
  7339. },
  7340. {
  7341. "key": "collection/d",
  7342. "options": {
  7343. "hasCommittedMutations": false,
  7344. "hasLocalMutations": false
  7345. },
  7346. "value": {
  7347. "key": "d"
  7348. },
  7349. "version": 1000
  7350. },
  7351. {
  7352. "key": "collection/e",
  7353. "options": {
  7354. "hasCommittedMutations": false,
  7355. "hasLocalMutations": false
  7356. },
  7357. "value": {
  7358. "key": "e"
  7359. },
  7360. "version": 1000
  7361. }
  7362. ],
  7363. "targets": [
  7364. 2
  7365. ]
  7366. }
  7367. },
  7368. {
  7369. "watchCurrent": [
  7370. [
  7371. 2
  7372. ],
  7373. "resume-token-1000"
  7374. ]
  7375. },
  7376. {
  7377. "watchSnapshot": {
  7378. "targetIds": [
  7379. ],
  7380. "version": 1000
  7381. },
  7382. "expectedSnapshotEvents": [
  7383. {
  7384. "added": [
  7385. {
  7386. "key": "collection/a",
  7387. "options": {
  7388. "hasCommittedMutations": false,
  7389. "hasLocalMutations": false
  7390. },
  7391. "value": {
  7392. "key": "a"
  7393. },
  7394. "version": 1000
  7395. },
  7396. {
  7397. "key": "collection/b",
  7398. "options": {
  7399. "hasCommittedMutations": false,
  7400. "hasLocalMutations": false
  7401. },
  7402. "value": {
  7403. "key": "b"
  7404. },
  7405. "version": 1000
  7406. },
  7407. {
  7408. "key": "collection/c",
  7409. "options": {
  7410. "hasCommittedMutations": false,
  7411. "hasLocalMutations": false
  7412. },
  7413. "value": {
  7414. "key": "c"
  7415. },
  7416. "version": 1000
  7417. },
  7418. {
  7419. "key": "collection/d",
  7420. "options": {
  7421. "hasCommittedMutations": false,
  7422. "hasLocalMutations": false
  7423. },
  7424. "value": {
  7425. "key": "d"
  7426. },
  7427. "version": 1000
  7428. },
  7429. {
  7430. "key": "collection/e",
  7431. "options": {
  7432. "hasCommittedMutations": false,
  7433. "hasLocalMutations": false
  7434. },
  7435. "value": {
  7436. "key": "e"
  7437. },
  7438. "version": 1000
  7439. }
  7440. ],
  7441. "errorCode": 0,
  7442. "fromCache": false,
  7443. "hasPendingWrites": false,
  7444. "query": {
  7445. "filters": [
  7446. ],
  7447. "orderBys": [
  7448. ],
  7449. "path": "collection"
  7450. }
  7451. }
  7452. ]
  7453. },
  7454. {
  7455. "watchReset": [
  7456. 2
  7457. ]
  7458. },
  7459. {
  7460. "watchEntity": {
  7461. "docs": [
  7462. ],
  7463. "targets": [
  7464. 2
  7465. ]
  7466. }
  7467. },
  7468. {
  7469. "watchCurrent": [
  7470. [
  7471. 2
  7472. ],
  7473. "resume-token-2000"
  7474. ]
  7475. },
  7476. {
  7477. "watchSnapshot": {
  7478. "targetIds": [
  7479. ],
  7480. "version": 2000
  7481. },
  7482. "expectedSnapshotEvents": [
  7483. {
  7484. "errorCode": 0,
  7485. "fromCache": true,
  7486. "hasPendingWrites": false,
  7487. "query": {
  7488. "filters": [
  7489. ],
  7490. "orderBys": [
  7491. ],
  7492. "path": "collection"
  7493. }
  7494. }
  7495. ],
  7496. "expectedState": {
  7497. "activeLimboDocs": [
  7498. "collection/a",
  7499. "collection/b"
  7500. ],
  7501. "activeTargets": {
  7502. "1": {
  7503. "queries": [
  7504. {
  7505. "filters": [
  7506. ],
  7507. "orderBys": [
  7508. ],
  7509. "path": "collection/a"
  7510. }
  7511. ],
  7512. "resumeToken": "",
  7513. "targetPurpose": 2
  7514. },
  7515. "2": {
  7516. "queries": [
  7517. {
  7518. "filters": [
  7519. ],
  7520. "orderBys": [
  7521. ],
  7522. "path": "collection"
  7523. }
  7524. ],
  7525. "resumeToken": ""
  7526. },
  7527. "3": {
  7528. "queries": [
  7529. {
  7530. "filters": [
  7531. ],
  7532. "orderBys": [
  7533. ],
  7534. "path": "collection/b"
  7535. }
  7536. ],
  7537. "resumeToken": "",
  7538. "targetPurpose": 2
  7539. }
  7540. },
  7541. "enqueuedLimboDocs": [
  7542. "collection/c",
  7543. "collection/d",
  7544. "collection/e"
  7545. ]
  7546. }
  7547. },
  7548. {
  7549. "watchAck": [
  7550. 1
  7551. ]
  7552. },
  7553. {
  7554. "watchAck": [
  7555. 3
  7556. ]
  7557. },
  7558. {
  7559. "watchCurrent": [
  7560. [
  7561. 1
  7562. ],
  7563. "resume-token-2001"
  7564. ]
  7565. },
  7566. {
  7567. "watchCurrent": [
  7568. [
  7569. 3
  7570. ],
  7571. "resume-token-2001"
  7572. ]
  7573. },
  7574. {
  7575. "watchSnapshot": {
  7576. "targetIds": [
  7577. ],
  7578. "version": 2001
  7579. },
  7580. "expectedSnapshotEvents": [
  7581. {
  7582. "errorCode": 0,
  7583. "fromCache": true,
  7584. "hasPendingWrites": false,
  7585. "query": {
  7586. "filters": [
  7587. ],
  7588. "orderBys": [
  7589. ],
  7590. "path": "collection"
  7591. },
  7592. "removed": [
  7593. {
  7594. "key": "collection/a",
  7595. "options": {
  7596. "hasCommittedMutations": false,
  7597. "hasLocalMutations": false
  7598. },
  7599. "value": {
  7600. "key": "a"
  7601. },
  7602. "version": 1000
  7603. },
  7604. {
  7605. "key": "collection/b",
  7606. "options": {
  7607. "hasCommittedMutations": false,
  7608. "hasLocalMutations": false
  7609. },
  7610. "value": {
  7611. "key": "b"
  7612. },
  7613. "version": 1000
  7614. }
  7615. ]
  7616. }
  7617. ],
  7618. "expectedState": {
  7619. "activeLimboDocs": [
  7620. "collection/c",
  7621. "collection/d"
  7622. ],
  7623. "activeTargets": {
  7624. "2": {
  7625. "queries": [
  7626. {
  7627. "filters": [
  7628. ],
  7629. "orderBys": [
  7630. ],
  7631. "path": "collection"
  7632. }
  7633. ],
  7634. "resumeToken": ""
  7635. },
  7636. "5": {
  7637. "queries": [
  7638. {
  7639. "filters": [
  7640. ],
  7641. "orderBys": [
  7642. ],
  7643. "path": "collection/c"
  7644. }
  7645. ],
  7646. "resumeToken": "",
  7647. "targetPurpose": 2
  7648. },
  7649. "7": {
  7650. "queries": [
  7651. {
  7652. "filters": [
  7653. ],
  7654. "orderBys": [
  7655. ],
  7656. "path": "collection/d"
  7657. }
  7658. ],
  7659. "resumeToken": "",
  7660. "targetPurpose": 2
  7661. }
  7662. },
  7663. "enqueuedLimboDocs": [
  7664. "collection/e"
  7665. ]
  7666. }
  7667. },
  7668. {
  7669. "watchAck": [
  7670. 5
  7671. ]
  7672. },
  7673. {
  7674. "watchAck": [
  7675. 7
  7676. ]
  7677. },
  7678. {
  7679. "watchCurrent": [
  7680. [
  7681. 5
  7682. ],
  7683. "resume-token-2002"
  7684. ]
  7685. },
  7686. {
  7687. "watchCurrent": [
  7688. [
  7689. 7
  7690. ],
  7691. "resume-token-2002"
  7692. ]
  7693. },
  7694. {
  7695. "watchSnapshot": {
  7696. "targetIds": [
  7697. ],
  7698. "version": 2002
  7699. },
  7700. "expectedSnapshotEvents": [
  7701. {
  7702. "errorCode": 0,
  7703. "fromCache": true,
  7704. "hasPendingWrites": false,
  7705. "query": {
  7706. "filters": [
  7707. ],
  7708. "orderBys": [
  7709. ],
  7710. "path": "collection"
  7711. },
  7712. "removed": [
  7713. {
  7714. "key": "collection/c",
  7715. "options": {
  7716. "hasCommittedMutations": false,
  7717. "hasLocalMutations": false
  7718. },
  7719. "value": {
  7720. "key": "c"
  7721. },
  7722. "version": 1000
  7723. },
  7724. {
  7725. "key": "collection/d",
  7726. "options": {
  7727. "hasCommittedMutations": false,
  7728. "hasLocalMutations": false
  7729. },
  7730. "value": {
  7731. "key": "d"
  7732. },
  7733. "version": 1000
  7734. }
  7735. ]
  7736. }
  7737. ],
  7738. "expectedState": {
  7739. "activeLimboDocs": [
  7740. "collection/e"
  7741. ],
  7742. "activeTargets": {
  7743. "2": {
  7744. "queries": [
  7745. {
  7746. "filters": [
  7747. ],
  7748. "orderBys": [
  7749. ],
  7750. "path": "collection"
  7751. }
  7752. ],
  7753. "resumeToken": ""
  7754. },
  7755. "9": {
  7756. "queries": [
  7757. {
  7758. "filters": [
  7759. ],
  7760. "orderBys": [
  7761. ],
  7762. "path": "collection/e"
  7763. }
  7764. ],
  7765. "resumeToken": "",
  7766. "targetPurpose": 2
  7767. }
  7768. },
  7769. "enqueuedLimboDocs": [
  7770. ]
  7771. }
  7772. },
  7773. {
  7774. "watchAck": [
  7775. 9
  7776. ]
  7777. },
  7778. {
  7779. "watchCurrent": [
  7780. [
  7781. 9
  7782. ],
  7783. "resume-token-2003"
  7784. ]
  7785. },
  7786. {
  7787. "watchSnapshot": {
  7788. "targetIds": [
  7789. ],
  7790. "version": 2003
  7791. },
  7792. "expectedSnapshotEvents": [
  7793. {
  7794. "errorCode": 0,
  7795. "fromCache": false,
  7796. "hasPendingWrites": false,
  7797. "query": {
  7798. "filters": [
  7799. ],
  7800. "orderBys": [
  7801. ],
  7802. "path": "collection"
  7803. },
  7804. "removed": [
  7805. {
  7806. "key": "collection/e",
  7807. "options": {
  7808. "hasCommittedMutations": false,
  7809. "hasLocalMutations": false
  7810. },
  7811. "value": {
  7812. "key": "e"
  7813. },
  7814. "version": 1000
  7815. }
  7816. ]
  7817. }
  7818. ],
  7819. "expectedState": {
  7820. "activeLimboDocs": [
  7821. ],
  7822. "activeTargets": {
  7823. "2": {
  7824. "queries": [
  7825. {
  7826. "filters": [
  7827. ],
  7828. "orderBys": [
  7829. ],
  7830. "path": "collection"
  7831. }
  7832. ],
  7833. "resumeToken": ""
  7834. }
  7835. },
  7836. "enqueuedLimboDocs": [
  7837. ]
  7838. }
  7839. }
  7840. ]
  7841. },
  7842. "Limbo resolution throttling with existence filter mismatch": {
  7843. "describeName": "Limbo Documents:",
  7844. "itName": "Limbo resolution throttling with existence filter mismatch",
  7845. "tags": [
  7846. ],
  7847. "config": {
  7848. "maxConcurrentLimboResolutions": 2,
  7849. "numClients": 1,
  7850. "useGarbageCollection": true
  7851. },
  7852. "steps": [
  7853. {
  7854. "userListen": {
  7855. "query": {
  7856. "filters": [
  7857. ],
  7858. "orderBys": [
  7859. ],
  7860. "path": "collection"
  7861. },
  7862. "targetId": 2
  7863. },
  7864. "expectedState": {
  7865. "activeTargets": {
  7866. "2": {
  7867. "queries": [
  7868. {
  7869. "filters": [
  7870. ],
  7871. "orderBys": [
  7872. ],
  7873. "path": "collection"
  7874. }
  7875. ],
  7876. "resumeToken": ""
  7877. }
  7878. }
  7879. }
  7880. },
  7881. {
  7882. "watchAck": [
  7883. 2
  7884. ]
  7885. },
  7886. {
  7887. "watchEntity": {
  7888. "docs": [
  7889. {
  7890. "key": "collection/a1",
  7891. "options": {
  7892. "hasCommittedMutations": false,
  7893. "hasLocalMutations": false
  7894. },
  7895. "value": {
  7896. "key": "a1"
  7897. },
  7898. "version": 1000
  7899. },
  7900. {
  7901. "key": "collection/a2",
  7902. "options": {
  7903. "hasCommittedMutations": false,
  7904. "hasLocalMutations": false
  7905. },
  7906. "value": {
  7907. "key": "a2"
  7908. },
  7909. "version": 1000
  7910. },
  7911. {
  7912. "key": "collection/a3",
  7913. "options": {
  7914. "hasCommittedMutations": false,
  7915. "hasLocalMutations": false
  7916. },
  7917. "value": {
  7918. "key": "a3"
  7919. },
  7920. "version": 1000
  7921. }
  7922. ],
  7923. "targets": [
  7924. 2
  7925. ]
  7926. }
  7927. },
  7928. {
  7929. "watchCurrent": [
  7930. [
  7931. 2
  7932. ],
  7933. "resume-token-1000"
  7934. ]
  7935. },
  7936. {
  7937. "watchSnapshot": {
  7938. "targetIds": [
  7939. ],
  7940. "version": 1000
  7941. },
  7942. "expectedSnapshotEvents": [
  7943. {
  7944. "added": [
  7945. {
  7946. "key": "collection/a1",
  7947. "options": {
  7948. "hasCommittedMutations": false,
  7949. "hasLocalMutations": false
  7950. },
  7951. "value": {
  7952. "key": "a1"
  7953. },
  7954. "version": 1000
  7955. },
  7956. {
  7957. "key": "collection/a2",
  7958. "options": {
  7959. "hasCommittedMutations": false,
  7960. "hasLocalMutations": false
  7961. },
  7962. "value": {
  7963. "key": "a2"
  7964. },
  7965. "version": 1000
  7966. },
  7967. {
  7968. "key": "collection/a3",
  7969. "options": {
  7970. "hasCommittedMutations": false,
  7971. "hasLocalMutations": false
  7972. },
  7973. "value": {
  7974. "key": "a3"
  7975. },
  7976. "version": 1000
  7977. }
  7978. ],
  7979. "errorCode": 0,
  7980. "fromCache": false,
  7981. "hasPendingWrites": false,
  7982. "query": {
  7983. "filters": [
  7984. ],
  7985. "orderBys": [
  7986. ],
  7987. "path": "collection"
  7988. }
  7989. }
  7990. ]
  7991. },
  7992. {
  7993. "enableNetwork": false,
  7994. "expectedSnapshotEvents": [
  7995. {
  7996. "errorCode": 0,
  7997. "fromCache": true,
  7998. "hasPendingWrites": false,
  7999. "query": {
  8000. "filters": [
  8001. ],
  8002. "orderBys": [
  8003. ],
  8004. "path": "collection"
  8005. }
  8006. }
  8007. ],
  8008. "expectedState": {
  8009. "activeLimboDocs": [
  8010. ],
  8011. "activeTargets": {
  8012. },
  8013. "enqueuedLimboDocs": [
  8014. ]
  8015. }
  8016. },
  8017. {
  8018. "enableNetwork": true,
  8019. "expectedState": {
  8020. "activeTargets": {
  8021. "2": {
  8022. "queries": [
  8023. {
  8024. "filters": [
  8025. ],
  8026. "orderBys": [
  8027. ],
  8028. "path": "collection"
  8029. }
  8030. ],
  8031. "resumeToken": "resume-token-1000"
  8032. }
  8033. }
  8034. }
  8035. },
  8036. {
  8037. "watchAck": [
  8038. 2
  8039. ]
  8040. },
  8041. {
  8042. "watchEntity": {
  8043. "docs": [
  8044. {
  8045. "key": "collection/b1",
  8046. "options": {
  8047. "hasCommittedMutations": false,
  8048. "hasLocalMutations": false
  8049. },
  8050. "value": {
  8051. "key": "b1"
  8052. },
  8053. "version": 1000
  8054. },
  8055. {
  8056. "key": "collection/b2",
  8057. "options": {
  8058. "hasCommittedMutations": false,
  8059. "hasLocalMutations": false
  8060. },
  8061. "value": {
  8062. "key": "b2"
  8063. },
  8064. "version": 1000
  8065. },
  8066. {
  8067. "key": "collection/b3",
  8068. "options": {
  8069. "hasCommittedMutations": false,
  8070. "hasLocalMutations": false
  8071. },
  8072. "value": {
  8073. "key": "b3"
  8074. },
  8075. "version": 1000
  8076. }
  8077. ],
  8078. "targets": [
  8079. 2
  8080. ]
  8081. }
  8082. },
  8083. {
  8084. "watchFilter": [
  8085. [
  8086. 2
  8087. ],
  8088. "collection/b1",
  8089. "collection/b2",
  8090. "collection/b3"
  8091. ]
  8092. },
  8093. {
  8094. "watchSnapshot": {
  8095. "targetIds": [
  8096. ],
  8097. "version": 1001
  8098. },
  8099. "expectedSnapshotEvents": [
  8100. {
  8101. "added": [
  8102. {
  8103. "key": "collection/b1",
  8104. "options": {
  8105. "hasCommittedMutations": false,
  8106. "hasLocalMutations": false
  8107. },
  8108. "value": {
  8109. "key": "b1"
  8110. },
  8111. "version": 1000
  8112. },
  8113. {
  8114. "key": "collection/b2",
  8115. "options": {
  8116. "hasCommittedMutations": false,
  8117. "hasLocalMutations": false
  8118. },
  8119. "value": {
  8120. "key": "b2"
  8121. },
  8122. "version": 1000
  8123. },
  8124. {
  8125. "key": "collection/b3",
  8126. "options": {
  8127. "hasCommittedMutations": false,
  8128. "hasLocalMutations": false
  8129. },
  8130. "value": {
  8131. "key": "b3"
  8132. },
  8133. "version": 1000
  8134. }
  8135. ],
  8136. "errorCode": 0,
  8137. "fromCache": true,
  8138. "hasPendingWrites": false,
  8139. "query": {
  8140. "filters": [
  8141. ],
  8142. "orderBys": [
  8143. ],
  8144. "path": "collection"
  8145. }
  8146. }
  8147. ],
  8148. "expectedState": {
  8149. "activeTargets": {
  8150. "2": {
  8151. "queries": [
  8152. {
  8153. "filters": [
  8154. ],
  8155. "orderBys": [
  8156. ],
  8157. "path": "collection"
  8158. }
  8159. ],
  8160. "resumeToken": "",
  8161. "targetPurpose": 1
  8162. }
  8163. }
  8164. }
  8165. },
  8166. {
  8167. "watchRemove": {
  8168. "targetIds": [
  8169. 2
  8170. ]
  8171. }
  8172. },
  8173. {
  8174. "watchAck": [
  8175. 2
  8176. ]
  8177. },
  8178. {
  8179. "watchEntity": {
  8180. "docs": [
  8181. {
  8182. "key": "collection/b1",
  8183. "options": {
  8184. "hasCommittedMutations": false,
  8185. "hasLocalMutations": false
  8186. },
  8187. "value": {
  8188. "key": "b1"
  8189. },
  8190. "version": 1000
  8191. },
  8192. {
  8193. "key": "collection/b2",
  8194. "options": {
  8195. "hasCommittedMutations": false,
  8196. "hasLocalMutations": false
  8197. },
  8198. "value": {
  8199. "key": "b2"
  8200. },
  8201. "version": 1000
  8202. },
  8203. {
  8204. "key": "collection/b3",
  8205. "options": {
  8206. "hasCommittedMutations": false,
  8207. "hasLocalMutations": false
  8208. },
  8209. "value": {
  8210. "key": "b3"
  8211. },
  8212. "version": 1000
  8213. }
  8214. ],
  8215. "targets": [
  8216. 2
  8217. ]
  8218. }
  8219. },
  8220. {
  8221. "watchCurrent": [
  8222. [
  8223. 2
  8224. ],
  8225. "resume-token-1002"
  8226. ]
  8227. },
  8228. {
  8229. "watchSnapshot": {
  8230. "targetIds": [
  8231. ],
  8232. "version": 1002
  8233. },
  8234. "expectedState": {
  8235. "activeLimboDocs": [
  8236. "collection/a1",
  8237. "collection/a2"
  8238. ],
  8239. "activeTargets": {
  8240. "1": {
  8241. "queries": [
  8242. {
  8243. "filters": [
  8244. ],
  8245. "orderBys": [
  8246. ],
  8247. "path": "collection/a1"
  8248. }
  8249. ],
  8250. "resumeToken": "",
  8251. "targetPurpose": 2
  8252. },
  8253. "2": {
  8254. "queries": [
  8255. {
  8256. "filters": [
  8257. ],
  8258. "orderBys": [
  8259. ],
  8260. "path": "collection"
  8261. }
  8262. ],
  8263. "resumeToken": "",
  8264. "targetPurpose": 1
  8265. },
  8266. "3": {
  8267. "queries": [
  8268. {
  8269. "filters": [
  8270. ],
  8271. "orderBys": [
  8272. ],
  8273. "path": "collection/a2"
  8274. }
  8275. ],
  8276. "resumeToken": "",
  8277. "targetPurpose": 2
  8278. }
  8279. },
  8280. "enqueuedLimboDocs": [
  8281. "collection/a3"
  8282. ]
  8283. }
  8284. },
  8285. {
  8286. "watchAck": [
  8287. 1
  8288. ]
  8289. },
  8290. {
  8291. "watchAck": [
  8292. 3
  8293. ]
  8294. },
  8295. {
  8296. "watchCurrent": [
  8297. [
  8298. 1
  8299. ],
  8300. "resume-token-1003"
  8301. ]
  8302. },
  8303. {
  8304. "watchCurrent": [
  8305. [
  8306. 3
  8307. ],
  8308. "resume-token-1003"
  8309. ]
  8310. },
  8311. {
  8312. "watchSnapshot": {
  8313. "targetIds": [
  8314. ],
  8315. "version": 1003
  8316. },
  8317. "expectedSnapshotEvents": [
  8318. {
  8319. "errorCode": 0,
  8320. "fromCache": true,
  8321. "hasPendingWrites": false,
  8322. "query": {
  8323. "filters": [
  8324. ],
  8325. "orderBys": [
  8326. ],
  8327. "path": "collection"
  8328. },
  8329. "removed": [
  8330. {
  8331. "key": "collection/a1",
  8332. "options": {
  8333. "hasCommittedMutations": false,
  8334. "hasLocalMutations": false
  8335. },
  8336. "value": {
  8337. "key": "a1"
  8338. },
  8339. "version": 1000
  8340. },
  8341. {
  8342. "key": "collection/a2",
  8343. "options": {
  8344. "hasCommittedMutations": false,
  8345. "hasLocalMutations": false
  8346. },
  8347. "value": {
  8348. "key": "a2"
  8349. },
  8350. "version": 1000
  8351. }
  8352. ]
  8353. }
  8354. ],
  8355. "expectedState": {
  8356. "activeLimboDocs": [
  8357. "collection/a3"
  8358. ],
  8359. "activeTargets": {
  8360. "2": {
  8361. "queries": [
  8362. {
  8363. "filters": [
  8364. ],
  8365. "orderBys": [
  8366. ],
  8367. "path": "collection"
  8368. }
  8369. ],
  8370. "resumeToken": "",
  8371. "targetPurpose": 1
  8372. },
  8373. "5": {
  8374. "queries": [
  8375. {
  8376. "filters": [
  8377. ],
  8378. "orderBys": [
  8379. ],
  8380. "path": "collection/a3"
  8381. }
  8382. ],
  8383. "resumeToken": "",
  8384. "targetPurpose": 2
  8385. }
  8386. },
  8387. "enqueuedLimboDocs": [
  8388. ]
  8389. }
  8390. },
  8391. {
  8392. "watchAck": [
  8393. 5
  8394. ]
  8395. },
  8396. {
  8397. "watchCurrent": [
  8398. [
  8399. 5
  8400. ],
  8401. "resume-token-1004"
  8402. ]
  8403. },
  8404. {
  8405. "watchSnapshot": {
  8406. "targetIds": [
  8407. ],
  8408. "version": 1004
  8409. },
  8410. "expectedSnapshotEvents": [
  8411. {
  8412. "errorCode": 0,
  8413. "fromCache": false,
  8414. "hasPendingWrites": false,
  8415. "query": {
  8416. "filters": [
  8417. ],
  8418. "orderBys": [
  8419. ],
  8420. "path": "collection"
  8421. },
  8422. "removed": [
  8423. {
  8424. "key": "collection/a3",
  8425. "options": {
  8426. "hasCommittedMutations": false,
  8427. "hasLocalMutations": false
  8428. },
  8429. "value": {
  8430. "key": "a3"
  8431. },
  8432. "version": 1000
  8433. }
  8434. ]
  8435. }
  8436. ],
  8437. "expectedState": {
  8438. "activeLimboDocs": [
  8439. ],
  8440. "activeTargets": {
  8441. "2": {
  8442. "queries": [
  8443. {
  8444. "filters": [
  8445. ],
  8446. "orderBys": [
  8447. ],
  8448. "path": "collection"
  8449. }
  8450. ],
  8451. "resumeToken": "",
  8452. "targetPurpose": 1
  8453. }
  8454. },
  8455. "enqueuedLimboDocs": [
  8456. ]
  8457. }
  8458. }
  8459. ]
  8460. },
  8461. "Limbo resolution throttling with results one at a time from watch": {
  8462. "describeName": "Limbo Documents:",
  8463. "itName": "Limbo resolution throttling with results one at a time from watch",
  8464. "tags": [
  8465. ],
  8466. "config": {
  8467. "maxConcurrentLimboResolutions": 2,
  8468. "numClients": 1,
  8469. "useGarbageCollection": true
  8470. },
  8471. "steps": [
  8472. {
  8473. "userListen": {
  8474. "query": {
  8475. "filters": [
  8476. ],
  8477. "orderBys": [
  8478. ],
  8479. "path": "collection"
  8480. },
  8481. "targetId": 2
  8482. },
  8483. "expectedState": {
  8484. "activeTargets": {
  8485. "2": {
  8486. "queries": [
  8487. {
  8488. "filters": [
  8489. ],
  8490. "orderBys": [
  8491. ],
  8492. "path": "collection"
  8493. }
  8494. ],
  8495. "resumeToken": ""
  8496. }
  8497. }
  8498. }
  8499. },
  8500. {
  8501. "watchAck": [
  8502. 2
  8503. ]
  8504. },
  8505. {
  8506. "watchEntity": {
  8507. "docs": [
  8508. {
  8509. "key": "collection/a",
  8510. "options": {
  8511. "hasCommittedMutations": false,
  8512. "hasLocalMutations": false
  8513. },
  8514. "value": {
  8515. "key": "a"
  8516. },
  8517. "version": 1000
  8518. },
  8519. {
  8520. "key": "collection/b",
  8521. "options": {
  8522. "hasCommittedMutations": false,
  8523. "hasLocalMutations": false
  8524. },
  8525. "value": {
  8526. "key": "b"
  8527. },
  8528. "version": 1000
  8529. },
  8530. {
  8531. "key": "collection/c",
  8532. "options": {
  8533. "hasCommittedMutations": false,
  8534. "hasLocalMutations": false
  8535. },
  8536. "value": {
  8537. "key": "c"
  8538. },
  8539. "version": 1000
  8540. },
  8541. {
  8542. "key": "collection/d",
  8543. "options": {
  8544. "hasCommittedMutations": false,
  8545. "hasLocalMutations": false
  8546. },
  8547. "value": {
  8548. "key": "d"
  8549. },
  8550. "version": 1000
  8551. },
  8552. {
  8553. "key": "collection/e",
  8554. "options": {
  8555. "hasCommittedMutations": false,
  8556. "hasLocalMutations": false
  8557. },
  8558. "value": {
  8559. "key": "e"
  8560. },
  8561. "version": 1000
  8562. }
  8563. ],
  8564. "targets": [
  8565. 2
  8566. ]
  8567. }
  8568. },
  8569. {
  8570. "watchCurrent": [
  8571. [
  8572. 2
  8573. ],
  8574. "resume-token-1000"
  8575. ]
  8576. },
  8577. {
  8578. "watchSnapshot": {
  8579. "targetIds": [
  8580. ],
  8581. "version": 1000
  8582. },
  8583. "expectedSnapshotEvents": [
  8584. {
  8585. "added": [
  8586. {
  8587. "key": "collection/a",
  8588. "options": {
  8589. "hasCommittedMutations": false,
  8590. "hasLocalMutations": false
  8591. },
  8592. "value": {
  8593. "key": "a"
  8594. },
  8595. "version": 1000
  8596. },
  8597. {
  8598. "key": "collection/b",
  8599. "options": {
  8600. "hasCommittedMutations": false,
  8601. "hasLocalMutations": false
  8602. },
  8603. "value": {
  8604. "key": "b"
  8605. },
  8606. "version": 1000
  8607. },
  8608. {
  8609. "key": "collection/c",
  8610. "options": {
  8611. "hasCommittedMutations": false,
  8612. "hasLocalMutations": false
  8613. },
  8614. "value": {
  8615. "key": "c"
  8616. },
  8617. "version": 1000
  8618. },
  8619. {
  8620. "key": "collection/d",
  8621. "options": {
  8622. "hasCommittedMutations": false,
  8623. "hasLocalMutations": false
  8624. },
  8625. "value": {
  8626. "key": "d"
  8627. },
  8628. "version": 1000
  8629. },
  8630. {
  8631. "key": "collection/e",
  8632. "options": {
  8633. "hasCommittedMutations": false,
  8634. "hasLocalMutations": false
  8635. },
  8636. "value": {
  8637. "key": "e"
  8638. },
  8639. "version": 1000
  8640. }
  8641. ],
  8642. "errorCode": 0,
  8643. "fromCache": false,
  8644. "hasPendingWrites": false,
  8645. "query": {
  8646. "filters": [
  8647. ],
  8648. "orderBys": [
  8649. ],
  8650. "path": "collection"
  8651. }
  8652. }
  8653. ]
  8654. },
  8655. {
  8656. "watchReset": [
  8657. 2
  8658. ]
  8659. },
  8660. {
  8661. "watchEntity": {
  8662. "docs": [
  8663. ],
  8664. "targets": [
  8665. 2
  8666. ]
  8667. }
  8668. },
  8669. {
  8670. "watchCurrent": [
  8671. [
  8672. 2
  8673. ],
  8674. "resume-token-2000"
  8675. ]
  8676. },
  8677. {
  8678. "watchSnapshot": {
  8679. "targetIds": [
  8680. ],
  8681. "version": 2000
  8682. },
  8683. "expectedSnapshotEvents": [
  8684. {
  8685. "errorCode": 0,
  8686. "fromCache": true,
  8687. "hasPendingWrites": false,
  8688. "query": {
  8689. "filters": [
  8690. ],
  8691. "orderBys": [
  8692. ],
  8693. "path": "collection"
  8694. }
  8695. }
  8696. ],
  8697. "expectedState": {
  8698. "activeLimboDocs": [
  8699. "collection/a",
  8700. "collection/b"
  8701. ],
  8702. "activeTargets": {
  8703. "1": {
  8704. "queries": [
  8705. {
  8706. "filters": [
  8707. ],
  8708. "orderBys": [
  8709. ],
  8710. "path": "collection/a"
  8711. }
  8712. ],
  8713. "resumeToken": "",
  8714. "targetPurpose": 2
  8715. },
  8716. "2": {
  8717. "queries": [
  8718. {
  8719. "filters": [
  8720. ],
  8721. "orderBys": [
  8722. ],
  8723. "path": "collection"
  8724. }
  8725. ],
  8726. "resumeToken": ""
  8727. },
  8728. "3": {
  8729. "queries": [
  8730. {
  8731. "filters": [
  8732. ],
  8733. "orderBys": [
  8734. ],
  8735. "path": "collection/b"
  8736. }
  8737. ],
  8738. "resumeToken": "",
  8739. "targetPurpose": 2
  8740. }
  8741. },
  8742. "enqueuedLimboDocs": [
  8743. "collection/c",
  8744. "collection/d",
  8745. "collection/e"
  8746. ]
  8747. }
  8748. },
  8749. {
  8750. "watchAck": [
  8751. 1
  8752. ]
  8753. },
  8754. {
  8755. "watchAck": [
  8756. 3
  8757. ]
  8758. },
  8759. {
  8760. "watchCurrent": [
  8761. [
  8762. 1
  8763. ],
  8764. "resume-token-2001"
  8765. ]
  8766. },
  8767. {
  8768. "watchSnapshot": {
  8769. "targetIds": [
  8770. ],
  8771. "version": 2001
  8772. },
  8773. "expectedSnapshotEvents": [
  8774. {
  8775. "errorCode": 0,
  8776. "fromCache": true,
  8777. "hasPendingWrites": false,
  8778. "query": {
  8779. "filters": [
  8780. ],
  8781. "orderBys": [
  8782. ],
  8783. "path": "collection"
  8784. },
  8785. "removed": [
  8786. {
  8787. "key": "collection/a",
  8788. "options": {
  8789. "hasCommittedMutations": false,
  8790. "hasLocalMutations": false
  8791. },
  8792. "value": {
  8793. "key": "a"
  8794. },
  8795. "version": 1000
  8796. }
  8797. ]
  8798. }
  8799. ],
  8800. "expectedState": {
  8801. "activeLimboDocs": [
  8802. "collection/b",
  8803. "collection/c"
  8804. ],
  8805. "activeTargets": {
  8806. "2": {
  8807. "queries": [
  8808. {
  8809. "filters": [
  8810. ],
  8811. "orderBys": [
  8812. ],
  8813. "path": "collection"
  8814. }
  8815. ],
  8816. "resumeToken": ""
  8817. },
  8818. "3": {
  8819. "queries": [
  8820. {
  8821. "filters": [
  8822. ],
  8823. "orderBys": [
  8824. ],
  8825. "path": "collection/b"
  8826. }
  8827. ],
  8828. "resumeToken": "",
  8829. "targetPurpose": 2
  8830. },
  8831. "5": {
  8832. "queries": [
  8833. {
  8834. "filters": [
  8835. ],
  8836. "orderBys": [
  8837. ],
  8838. "path": "collection/c"
  8839. }
  8840. ],
  8841. "resumeToken": "",
  8842. "targetPurpose": 2
  8843. }
  8844. },
  8845. "enqueuedLimboDocs": [
  8846. "collection/d",
  8847. "collection/e"
  8848. ]
  8849. }
  8850. },
  8851. {
  8852. "watchAck": [
  8853. 5
  8854. ]
  8855. },
  8856. {
  8857. "watchCurrent": [
  8858. [
  8859. 3
  8860. ],
  8861. "resume-token-2002"
  8862. ]
  8863. },
  8864. {
  8865. "watchSnapshot": {
  8866. "targetIds": [
  8867. ],
  8868. "version": 2002
  8869. },
  8870. "expectedSnapshotEvents": [
  8871. {
  8872. "errorCode": 0,
  8873. "fromCache": true,
  8874. "hasPendingWrites": false,
  8875. "query": {
  8876. "filters": [
  8877. ],
  8878. "orderBys": [
  8879. ],
  8880. "path": "collection"
  8881. },
  8882. "removed": [
  8883. {
  8884. "key": "collection/b",
  8885. "options": {
  8886. "hasCommittedMutations": false,
  8887. "hasLocalMutations": false
  8888. },
  8889. "value": {
  8890. "key": "b"
  8891. },
  8892. "version": 1000
  8893. }
  8894. ]
  8895. }
  8896. ],
  8897. "expectedState": {
  8898. "activeLimboDocs": [
  8899. "collection/c",
  8900. "collection/d"
  8901. ],
  8902. "activeTargets": {
  8903. "2": {
  8904. "queries": [
  8905. {
  8906. "filters": [
  8907. ],
  8908. "orderBys": [
  8909. ],
  8910. "path": "collection"
  8911. }
  8912. ],
  8913. "resumeToken": ""
  8914. },
  8915. "5": {
  8916. "queries": [
  8917. {
  8918. "filters": [
  8919. ],
  8920. "orderBys": [
  8921. ],
  8922. "path": "collection/c"
  8923. }
  8924. ],
  8925. "resumeToken": "",
  8926. "targetPurpose": 2
  8927. },
  8928. "7": {
  8929. "queries": [
  8930. {
  8931. "filters": [
  8932. ],
  8933. "orderBys": [
  8934. ],
  8935. "path": "collection/d"
  8936. }
  8937. ],
  8938. "resumeToken": "",
  8939. "targetPurpose": 2
  8940. }
  8941. },
  8942. "enqueuedLimboDocs": [
  8943. "collection/e"
  8944. ]
  8945. }
  8946. },
  8947. {
  8948. "watchAck": [
  8949. 7
  8950. ]
  8951. },
  8952. {
  8953. "watchCurrent": [
  8954. [
  8955. 5
  8956. ],
  8957. "resume-token-2003"
  8958. ]
  8959. },
  8960. {
  8961. "watchSnapshot": {
  8962. "targetIds": [
  8963. ],
  8964. "version": 2003
  8965. },
  8966. "expectedSnapshotEvents": [
  8967. {
  8968. "errorCode": 0,
  8969. "fromCache": true,
  8970. "hasPendingWrites": false,
  8971. "query": {
  8972. "filters": [
  8973. ],
  8974. "orderBys": [
  8975. ],
  8976. "path": "collection"
  8977. },
  8978. "removed": [
  8979. {
  8980. "key": "collection/c",
  8981. "options": {
  8982. "hasCommittedMutations": false,
  8983. "hasLocalMutations": false
  8984. },
  8985. "value": {
  8986. "key": "c"
  8987. },
  8988. "version": 1000
  8989. }
  8990. ]
  8991. }
  8992. ],
  8993. "expectedState": {
  8994. "activeLimboDocs": [
  8995. "collection/d",
  8996. "collection/e"
  8997. ],
  8998. "activeTargets": {
  8999. "2": {
  9000. "queries": [
  9001. {
  9002. "filters": [
  9003. ],
  9004. "orderBys": [
  9005. ],
  9006. "path": "collection"
  9007. }
  9008. ],
  9009. "resumeToken": ""
  9010. },
  9011. "7": {
  9012. "queries": [
  9013. {
  9014. "filters": [
  9015. ],
  9016. "orderBys": [
  9017. ],
  9018. "path": "collection/d"
  9019. }
  9020. ],
  9021. "resumeToken": "",
  9022. "targetPurpose": 2
  9023. },
  9024. "9": {
  9025. "queries": [
  9026. {
  9027. "filters": [
  9028. ],
  9029. "orderBys": [
  9030. ],
  9031. "path": "collection/e"
  9032. }
  9033. ],
  9034. "resumeToken": "",
  9035. "targetPurpose": 2
  9036. }
  9037. },
  9038. "enqueuedLimboDocs": [
  9039. ]
  9040. }
  9041. },
  9042. {
  9043. "watchAck": [
  9044. 9
  9045. ]
  9046. },
  9047. {
  9048. "watchCurrent": [
  9049. [
  9050. 7
  9051. ],
  9052. "resume-token-2004"
  9053. ]
  9054. },
  9055. {
  9056. "watchSnapshot": {
  9057. "targetIds": [
  9058. ],
  9059. "version": 2004
  9060. },
  9061. "expectedSnapshotEvents": [
  9062. {
  9063. "errorCode": 0,
  9064. "fromCache": true,
  9065. "hasPendingWrites": false,
  9066. "query": {
  9067. "filters": [
  9068. ],
  9069. "orderBys": [
  9070. ],
  9071. "path": "collection"
  9072. },
  9073. "removed": [
  9074. {
  9075. "key": "collection/d",
  9076. "options": {
  9077. "hasCommittedMutations": false,
  9078. "hasLocalMutations": false
  9079. },
  9080. "value": {
  9081. "key": "d"
  9082. },
  9083. "version": 1000
  9084. }
  9085. ]
  9086. }
  9087. ],
  9088. "expectedState": {
  9089. "activeLimboDocs": [
  9090. "collection/e"
  9091. ],
  9092. "activeTargets": {
  9093. "2": {
  9094. "queries": [
  9095. {
  9096. "filters": [
  9097. ],
  9098. "orderBys": [
  9099. ],
  9100. "path": "collection"
  9101. }
  9102. ],
  9103. "resumeToken": ""
  9104. },
  9105. "9": {
  9106. "queries": [
  9107. {
  9108. "filters": [
  9109. ],
  9110. "orderBys": [
  9111. ],
  9112. "path": "collection/e"
  9113. }
  9114. ],
  9115. "resumeToken": "",
  9116. "targetPurpose": 2
  9117. }
  9118. },
  9119. "enqueuedLimboDocs": [
  9120. ]
  9121. }
  9122. },
  9123. {
  9124. "watchCurrent": [
  9125. [
  9126. 9
  9127. ],
  9128. "resume-token-2005"
  9129. ]
  9130. },
  9131. {
  9132. "watchSnapshot": {
  9133. "targetIds": [
  9134. ],
  9135. "version": 2005
  9136. },
  9137. "expectedSnapshotEvents": [
  9138. {
  9139. "errorCode": 0,
  9140. "fromCache": false,
  9141. "hasPendingWrites": false,
  9142. "query": {
  9143. "filters": [
  9144. ],
  9145. "orderBys": [
  9146. ],
  9147. "path": "collection"
  9148. },
  9149. "removed": [
  9150. {
  9151. "key": "collection/e",
  9152. "options": {
  9153. "hasCommittedMutations": false,
  9154. "hasLocalMutations": false
  9155. },
  9156. "value": {
  9157. "key": "e"
  9158. },
  9159. "version": 1000
  9160. }
  9161. ]
  9162. }
  9163. ],
  9164. "expectedState": {
  9165. "activeLimboDocs": [
  9166. ],
  9167. "activeTargets": {
  9168. "2": {
  9169. "queries": [
  9170. {
  9171. "filters": [
  9172. ],
  9173. "orderBys": [
  9174. ],
  9175. "path": "collection"
  9176. }
  9177. ],
  9178. "resumeToken": ""
  9179. }
  9180. },
  9181. "enqueuedLimboDocs": [
  9182. ]
  9183. }
  9184. }
  9185. ]
  9186. },
  9187. "LimitToLast query from secondary results in expected limbo doc": {
  9188. "describeName": "Limbo Documents:",
  9189. "itName": "LimitToLast query from secondary results in expected limbo doc",
  9190. "tags": [
  9191. "multi-client"
  9192. ],
  9193. "config": {
  9194. "numClients": 2,
  9195. "useGarbageCollection": false
  9196. },
  9197. "steps": [
  9198. {
  9199. "clientIndex": 0,
  9200. "drainQueue": true
  9201. },
  9202. {
  9203. "applyClientState": {
  9204. "visibility": "visible"
  9205. },
  9206. "clientIndex": 0
  9207. },
  9208. {
  9209. "clientIndex": 1,
  9210. "drainQueue": true
  9211. },
  9212. {
  9213. "clientIndex": 1,
  9214. "userListen": {
  9215. "query": {
  9216. "filters": [
  9217. ],
  9218. "limit": 3,
  9219. "limitType": "LimitToLast",
  9220. "orderBys": [
  9221. [
  9222. "val",
  9223. "desc"
  9224. ]
  9225. ],
  9226. "path": "collection"
  9227. },
  9228. "targetId": 2
  9229. },
  9230. "expectedState": {
  9231. "activeTargets": {
  9232. "2": {
  9233. "queries": [
  9234. {
  9235. "filters": [
  9236. ],
  9237. "limit": 3,
  9238. "limitType": "LimitToLast",
  9239. "orderBys": [
  9240. [
  9241. "val",
  9242. "desc"
  9243. ]
  9244. ],
  9245. "path": "collection"
  9246. }
  9247. ],
  9248. "resumeToken": ""
  9249. }
  9250. }
  9251. }
  9252. },
  9253. {
  9254. "clientIndex": 0,
  9255. "drainQueue": true,
  9256. "expectedState": {
  9257. "activeTargets": {
  9258. "2": {
  9259. "queries": [
  9260. {
  9261. "filters": [
  9262. ],
  9263. "limit": 3,
  9264. "limitType": "LimitToLast",
  9265. "orderBys": [
  9266. [
  9267. "val",
  9268. "desc"
  9269. ]
  9270. ],
  9271. "path": "collection"
  9272. }
  9273. ],
  9274. "resumeToken": ""
  9275. }
  9276. }
  9277. }
  9278. },
  9279. {
  9280. "clientIndex": 0,
  9281. "watchAck": [
  9282. 2
  9283. ]
  9284. },
  9285. {
  9286. "clientIndex": 0,
  9287. "watchEntity": {
  9288. "docs": [
  9289. {
  9290. "key": "collection/a",
  9291. "options": {
  9292. "hasCommittedMutations": false,
  9293. "hasLocalMutations": false
  9294. },
  9295. "value": {
  9296. "val": 11
  9297. },
  9298. "version": 1000
  9299. },
  9300. {
  9301. "key": "collection/b",
  9302. "options": {
  9303. "hasCommittedMutations": false,
  9304. "hasLocalMutations": false
  9305. },
  9306. "value": {
  9307. "val": 12
  9308. },
  9309. "version": 1000
  9310. },
  9311. {
  9312. "key": "collection/c",
  9313. "options": {
  9314. "hasCommittedMutations": false,
  9315. "hasLocalMutations": false
  9316. },
  9317. "value": {
  9318. "val": 13
  9319. },
  9320. "version": 1000
  9321. }
  9322. ],
  9323. "targets": [
  9324. 2
  9325. ]
  9326. }
  9327. },
  9328. {
  9329. "clientIndex": 0,
  9330. "watchCurrent": [
  9331. [
  9332. 2
  9333. ],
  9334. "resume-token-1000"
  9335. ]
  9336. },
  9337. {
  9338. "clientIndex": 0,
  9339. "watchSnapshot": {
  9340. "targetIds": [
  9341. ],
  9342. "version": 1000
  9343. }
  9344. },
  9345. {
  9346. "clientIndex": 1,
  9347. "drainQueue": true,
  9348. "expectedSnapshotEvents": [
  9349. {
  9350. "added": [
  9351. {
  9352. "key": "collection/c",
  9353. "options": {
  9354. "hasCommittedMutations": false,
  9355. "hasLocalMutations": false
  9356. },
  9357. "value": {
  9358. "val": 13
  9359. },
  9360. "version": 1000
  9361. },
  9362. {
  9363. "key": "collection/b",
  9364. "options": {
  9365. "hasCommittedMutations": false,
  9366. "hasLocalMutations": false
  9367. },
  9368. "value": {
  9369. "val": 12
  9370. },
  9371. "version": 1000
  9372. },
  9373. {
  9374. "key": "collection/a",
  9375. "options": {
  9376. "hasCommittedMutations": false,
  9377. "hasLocalMutations": false
  9378. },
  9379. "value": {
  9380. "val": 11
  9381. },
  9382. "version": 1000
  9383. }
  9384. ],
  9385. "errorCode": 0,
  9386. "fromCache": false,
  9387. "hasPendingWrites": false,
  9388. "query": {
  9389. "filters": [
  9390. ],
  9391. "limit": 3,
  9392. "limitType": "LimitToLast",
  9393. "orderBys": [
  9394. [
  9395. "val",
  9396. "desc"
  9397. ]
  9398. ],
  9399. "path": "collection"
  9400. }
  9401. }
  9402. ]
  9403. },
  9404. {
  9405. "clientIndex": 0,
  9406. "drainQueue": true
  9407. },
  9408. {
  9409. "clientIndex": 0,
  9410. "watchReset": [
  9411. ]
  9412. },
  9413. {
  9414. "clientIndex": 0,
  9415. "watchEntity": {
  9416. "docs": [
  9417. {
  9418. "key": "collection/a",
  9419. "options": {
  9420. "hasCommittedMutations": false,
  9421. "hasLocalMutations": false
  9422. },
  9423. "value": {
  9424. "val": 11
  9425. },
  9426. "version": 2000
  9427. },
  9428. {
  9429. "key": "collection/b",
  9430. "options": {
  9431. "hasCommittedMutations": false,
  9432. "hasLocalMutations": false
  9433. },
  9434. "value": {
  9435. "val": 12
  9436. },
  9437. "version": 2000
  9438. },
  9439. {
  9440. "key": "collection/d",
  9441. "options": {
  9442. "hasCommittedMutations": false,
  9443. "hasLocalMutations": false
  9444. },
  9445. "value": {
  9446. "val": 100
  9447. },
  9448. "version": 2000
  9449. }
  9450. ],
  9451. "targets": [
  9452. 2
  9453. ]
  9454. }
  9455. },
  9456. {
  9457. "clientIndex": 0,
  9458. "watchCurrent": [
  9459. [
  9460. 2
  9461. ],
  9462. "resume-token-2000"
  9463. ]
  9464. },
  9465. {
  9466. "clientIndex": 0,
  9467. "watchSnapshot": {
  9468. "targetIds": [
  9469. ],
  9470. "version": 2000
  9471. },
  9472. "expectedState": {
  9473. "activeLimboDocs": [
  9474. "collection/c"
  9475. ],
  9476. "activeTargets": {
  9477. "1": {
  9478. "queries": [
  9479. {
  9480. "filters": [
  9481. ],
  9482. "orderBys": [
  9483. ],
  9484. "path": "collection/c"
  9485. }
  9486. ],
  9487. "resumeToken": "",
  9488. "targetPurpose": 2
  9489. },
  9490. "2": {
  9491. "queries": [
  9492. {
  9493. "filters": [
  9494. ],
  9495. "limit": 3,
  9496. "limitType": "LimitToLast",
  9497. "orderBys": [
  9498. [
  9499. "val",
  9500. "desc"
  9501. ]
  9502. ],
  9503. "path": "collection"
  9504. }
  9505. ],
  9506. "resumeToken": ""
  9507. }
  9508. }
  9509. }
  9510. },
  9511. {
  9512. "clientIndex": 1,
  9513. "drainQueue": true,
  9514. "expectedSnapshotEvents": [
  9515. {
  9516. "errorCode": 0,
  9517. "fromCache": true,
  9518. "hasPendingWrites": false,
  9519. "query": {
  9520. "filters": [
  9521. ],
  9522. "limit": 3,
  9523. "limitType": "LimitToLast",
  9524. "orderBys": [
  9525. [
  9526. "val",
  9527. "desc"
  9528. ]
  9529. ],
  9530. "path": "collection"
  9531. }
  9532. }
  9533. ]
  9534. }
  9535. ]
  9536. },
  9537. "LimitToLast query from secondary results in no expected limbo doc": {
  9538. "describeName": "Limbo Documents:",
  9539. "itName": "LimitToLast query from secondary results in no expected limbo doc",
  9540. "tags": [
  9541. "multi-client"
  9542. ],
  9543. "config": {
  9544. "numClients": 2,
  9545. "useGarbageCollection": false
  9546. },
  9547. "steps": [
  9548. {
  9549. "clientIndex": 0,
  9550. "drainQueue": true
  9551. },
  9552. {
  9553. "applyClientState": {
  9554. "visibility": "visible"
  9555. },
  9556. "clientIndex": 0
  9557. },
  9558. {
  9559. "clientIndex": 1,
  9560. "drainQueue": true
  9561. },
  9562. {
  9563. "clientIndex": 1,
  9564. "userListen": {
  9565. "query": {
  9566. "filters": [
  9567. ],
  9568. "limit": 3,
  9569. "limitType": "LimitToLast",
  9570. "orderBys": [
  9571. [
  9572. "val",
  9573. "desc"
  9574. ]
  9575. ],
  9576. "path": "collection"
  9577. },
  9578. "targetId": 2
  9579. },
  9580. "expectedState": {
  9581. "activeTargets": {
  9582. "2": {
  9583. "queries": [
  9584. {
  9585. "filters": [
  9586. ],
  9587. "limit": 3,
  9588. "limitType": "LimitToLast",
  9589. "orderBys": [
  9590. [
  9591. "val",
  9592. "desc"
  9593. ]
  9594. ],
  9595. "path": "collection"
  9596. }
  9597. ],
  9598. "resumeToken": ""
  9599. }
  9600. }
  9601. }
  9602. },
  9603. {
  9604. "clientIndex": 0,
  9605. "drainQueue": true,
  9606. "expectedState": {
  9607. "activeTargets": {
  9608. "2": {
  9609. "queries": [
  9610. {
  9611. "filters": [
  9612. ],
  9613. "limit": 3,
  9614. "limitType": "LimitToLast",
  9615. "orderBys": [
  9616. [
  9617. "val",
  9618. "desc"
  9619. ]
  9620. ],
  9621. "path": "collection"
  9622. }
  9623. ],
  9624. "resumeToken": ""
  9625. }
  9626. }
  9627. }
  9628. },
  9629. {
  9630. "clientIndex": 0,
  9631. "watchAck": [
  9632. 2
  9633. ]
  9634. },
  9635. {
  9636. "clientIndex": 0,
  9637. "watchEntity": {
  9638. "docs": [
  9639. {
  9640. "key": "collection/a",
  9641. "options": {
  9642. "hasCommittedMutations": false,
  9643. "hasLocalMutations": false
  9644. },
  9645. "value": {
  9646. "val": 11
  9647. },
  9648. "version": 1000
  9649. },
  9650. {
  9651. "key": "collection/b",
  9652. "options": {
  9653. "hasCommittedMutations": false,
  9654. "hasLocalMutations": false
  9655. },
  9656. "value": {
  9657. "val": 12
  9658. },
  9659. "version": 1000
  9660. },
  9661. {
  9662. "key": "collection/c",
  9663. "options": {
  9664. "hasCommittedMutations": false,
  9665. "hasLocalMutations": false
  9666. },
  9667. "value": {
  9668. "val": 13
  9669. },
  9670. "version": 1000
  9671. }
  9672. ],
  9673. "targets": [
  9674. 2
  9675. ]
  9676. }
  9677. },
  9678. {
  9679. "clientIndex": 0,
  9680. "watchCurrent": [
  9681. [
  9682. 2
  9683. ],
  9684. "resume-token-1000"
  9685. ]
  9686. },
  9687. {
  9688. "clientIndex": 0,
  9689. "watchSnapshot": {
  9690. "targetIds": [
  9691. ],
  9692. "version": 1000
  9693. }
  9694. },
  9695. {
  9696. "clientIndex": 1,
  9697. "drainQueue": true,
  9698. "expectedSnapshotEvents": [
  9699. {
  9700. "added": [
  9701. {
  9702. "key": "collection/c",
  9703. "options": {
  9704. "hasCommittedMutations": false,
  9705. "hasLocalMutations": false
  9706. },
  9707. "value": {
  9708. "val": 13
  9709. },
  9710. "version": 1000
  9711. },
  9712. {
  9713. "key": "collection/b",
  9714. "options": {
  9715. "hasCommittedMutations": false,
  9716. "hasLocalMutations": false
  9717. },
  9718. "value": {
  9719. "val": 12
  9720. },
  9721. "version": 1000
  9722. },
  9723. {
  9724. "key": "collection/a",
  9725. "options": {
  9726. "hasCommittedMutations": false,
  9727. "hasLocalMutations": false
  9728. },
  9729. "value": {
  9730. "val": 11
  9731. },
  9732. "version": 1000
  9733. }
  9734. ],
  9735. "errorCode": 0,
  9736. "fromCache": false,
  9737. "hasPendingWrites": false,
  9738. "query": {
  9739. "filters": [
  9740. ],
  9741. "limit": 3,
  9742. "limitType": "LimitToLast",
  9743. "orderBys": [
  9744. [
  9745. "val",
  9746. "desc"
  9747. ]
  9748. ],
  9749. "path": "collection"
  9750. }
  9751. }
  9752. ]
  9753. },
  9754. {
  9755. "clientIndex": 0,
  9756. "drainQueue": true
  9757. },
  9758. {
  9759. "clientIndex": 0,
  9760. "watchReset": [
  9761. ]
  9762. },
  9763. {
  9764. "clientIndex": 0,
  9765. "watchEntity": {
  9766. "docs": [
  9767. {
  9768. "key": "collection/a",
  9769. "options": {
  9770. "hasCommittedMutations": false,
  9771. "hasLocalMutations": false
  9772. },
  9773. "value": {
  9774. "val": 5
  9775. },
  9776. "version": 2000
  9777. },
  9778. {
  9779. "key": "collection/b",
  9780. "options": {
  9781. "hasCommittedMutations": false,
  9782. "hasLocalMutations": false
  9783. },
  9784. "value": {
  9785. "val": 6
  9786. },
  9787. "version": 2000
  9788. },
  9789. {
  9790. "key": "collection/d",
  9791. "options": {
  9792. "hasCommittedMutations": false,
  9793. "hasLocalMutations": false
  9794. },
  9795. "value": {
  9796. "val": 7
  9797. },
  9798. "version": 2000
  9799. }
  9800. ],
  9801. "targets": [
  9802. 2
  9803. ]
  9804. }
  9805. },
  9806. {
  9807. "clientIndex": 0,
  9808. "watchCurrent": [
  9809. [
  9810. 2
  9811. ],
  9812. "resume-token-2000"
  9813. ]
  9814. },
  9815. {
  9816. "clientIndex": 0,
  9817. "watchSnapshot": {
  9818. "targetIds": [
  9819. ],
  9820. "version": 2000
  9821. }
  9822. },
  9823. {
  9824. "clientIndex": 1,
  9825. "drainQueue": true,
  9826. "expectedSnapshotEvents": [
  9827. {
  9828. "added": [
  9829. {
  9830. "key": "collection/d",
  9831. "options": {
  9832. "hasCommittedMutations": false,
  9833. "hasLocalMutations": false
  9834. },
  9835. "value": {
  9836. "val": 7
  9837. },
  9838. "version": 2000
  9839. }
  9840. ],
  9841. "errorCode": 0,
  9842. "fromCache": false,
  9843. "hasPendingWrites": false,
  9844. "modified": [
  9845. {
  9846. "key": "collection/b",
  9847. "options": {
  9848. "hasCommittedMutations": false,
  9849. "hasLocalMutations": false
  9850. },
  9851. "value": {
  9852. "val": 6
  9853. },
  9854. "version": 2000
  9855. },
  9856. {
  9857. "key": "collection/a",
  9858. "options": {
  9859. "hasCommittedMutations": false,
  9860. "hasLocalMutations": false
  9861. },
  9862. "value": {
  9863. "val": 5
  9864. },
  9865. "version": 2000
  9866. }
  9867. ],
  9868. "query": {
  9869. "filters": [
  9870. ],
  9871. "limit": 3,
  9872. "limitType": "LimitToLast",
  9873. "orderBys": [
  9874. [
  9875. "val",
  9876. "desc"
  9877. ]
  9878. ],
  9879. "path": "collection"
  9880. },
  9881. "removed": [
  9882. {
  9883. "key": "collection/c",
  9884. "options": {
  9885. "hasCommittedMutations": false,
  9886. "hasLocalMutations": false
  9887. },
  9888. "value": {
  9889. "val": 13
  9890. },
  9891. "version": 1000
  9892. }
  9893. ]
  9894. }
  9895. ]
  9896. },
  9897. {
  9898. "clientIndex": 0,
  9899. "drainQueue": true,
  9900. "expectedState": {
  9901. "activeLimboDocs": [
  9902. ],
  9903. "activeTargets": {
  9904. "2": {
  9905. "queries": [
  9906. {
  9907. "filters": [
  9908. ],
  9909. "limit": 3,
  9910. "limitType": "LimitToLast",
  9911. "orderBys": [
  9912. [
  9913. "val",
  9914. "desc"
  9915. ]
  9916. ],
  9917. "path": "collection"
  9918. }
  9919. ],
  9920. "resumeToken": ""
  9921. }
  9922. }
  9923. }
  9924. }
  9925. ]
  9926. }
  9927. }