limbo_spec_test.json 167 KB

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