limbo_spec_test.json 216 KB

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