limbo_spec_test.json 168 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634
  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. "query": {
  15. "filters": [
  16. ],
  17. "orderBys": [
  18. ],
  19. "path": "collection"
  20. },
  21. "targetId": 2
  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. "query": {
  269. "filters": [
  270. [
  271. "matches",
  272. "==",
  273. true
  274. ]
  275. ],
  276. "orderBys": [
  277. ],
  278. "path": "collection"
  279. },
  280. "targetId": 2
  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. "query": {
  441. "filters": [
  442. ],
  443. "orderBys": [
  444. ],
  445. "path": "collection"
  446. },
  447. "targetId": 4
  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. "query": {
  692. "filters": [
  693. ],
  694. "orderBys": [
  695. ],
  696. "path": "collection"
  697. },
  698. "targetId": 2
  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. "query": {
  995. "filters": [
  996. ],
  997. "orderBys": [
  998. ],
  999. "path": "collection"
  1000. },
  1001. "targetId": 2
  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. "query": {
  1239. "filters": [
  1240. ],
  1241. "orderBys": [
  1242. ],
  1243. "path": "collection"
  1244. },
  1245. "targetId": 2
  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. "query": {
  1489. "filters": [
  1490. ],
  1491. "orderBys": [
  1492. ],
  1493. "path": "collection"
  1494. },
  1495. "targetId": 2
  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. "query": {
  1881. "filters": [
  1882. [
  1883. "key",
  1884. "==",
  1885. "a"
  1886. ]
  1887. ],
  1888. "orderBys": [
  1889. ],
  1890. "path": "collection"
  1891. },
  1892. "targetId": 2
  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. "query": {
  2173. "filters": [
  2174. [
  2175. "key",
  2176. "==",
  2177. "a"
  2178. ]
  2179. ],
  2180. "orderBys": [
  2181. ],
  2182. "path": "collection"
  2183. },
  2184. "targetId": 2
  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. "query": {
  2283. "filters": [
  2284. [
  2285. "key",
  2286. "==",
  2287. "b"
  2288. ]
  2289. ],
  2290. "orderBys": [
  2291. ],
  2292. "path": "collection"
  2293. },
  2294. "targetId": 4
  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. "query": {
  2649. "filters": [
  2650. ],
  2651. "orderBys": [
  2652. ],
  2653. "path": "collection"
  2654. },
  2655. "targetId": 2
  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. "query": {
  2786. "filters": [
  2787. [
  2788. "matches",
  2789. "==",
  2790. true
  2791. ]
  2792. ],
  2793. "orderBys": [
  2794. ],
  2795. "path": "collection"
  2796. },
  2797. "targetId": 4
  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. "query": {
  2926. "filters": [
  2927. ],
  2928. "orderBys": [
  2929. ],
  2930. "path": "collection"
  2931. },
  2932. "targetId": 2
  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. "query": {
  3030. "filters": [
  3031. ],
  3032. "orderBys": [
  3033. ],
  3034. "path": "collection"
  3035. },
  3036. "targetId": 2
  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. "query": {
  3644. "filters": [
  3645. ],
  3646. "orderBys": [
  3647. ],
  3648. "path": "collection"
  3649. },
  3650. "targetId": 2
  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. "query": {
  3781. "filters": [
  3782. [
  3783. "include",
  3784. "==",
  3785. true
  3786. ]
  3787. ],
  3788. "limit": 1,
  3789. "limitType": "LimitToFirst",
  3790. "orderBys": [
  3791. ],
  3792. "path": "collection"
  3793. },
  3794. "targetId": 4
  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. "query": {
  4170. "filters": [
  4171. ],
  4172. "orderBys": [
  4173. ],
  4174. "path": "collection"
  4175. },
  4176. "targetId": 2
  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. "query": {
  4307. "filters": [
  4308. [
  4309. "include",
  4310. "==",
  4311. true
  4312. ]
  4313. ],
  4314. "limit": 1,
  4315. "limitType": "LimitToFirst",
  4316. "orderBys": [
  4317. ],
  4318. "path": "collection"
  4319. },
  4320. "targetId": 4
  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. ],
  4660. "config": {
  4661. "maxConcurrentLimboResolutions": 1,
  4662. "numClients": 1,
  4663. "useGarbageCollection": true
  4664. },
  4665. "steps": [
  4666. {
  4667. "userListen": {
  4668. "query": {
  4669. "filters": [
  4670. ],
  4671. "orderBys": [
  4672. ],
  4673. "path": "collection"
  4674. },
  4675. "targetId": 2
  4676. },
  4677. "expectedState": {
  4678. "activeTargets": {
  4679. "2": {
  4680. "queries": [
  4681. {
  4682. "filters": [
  4683. ],
  4684. "orderBys": [
  4685. ],
  4686. "path": "collection"
  4687. }
  4688. ],
  4689. "resumeToken": ""
  4690. }
  4691. }
  4692. }
  4693. },
  4694. {
  4695. "watchAck": [
  4696. 2
  4697. ]
  4698. },
  4699. {
  4700. "watchEntity": {
  4701. "docs": [
  4702. {
  4703. "key": "collection/a",
  4704. "options": {
  4705. "hasCommittedMutations": false,
  4706. "hasLocalMutations": false
  4707. },
  4708. "value": {
  4709. "key": "a"
  4710. },
  4711. "version": 1000
  4712. },
  4713. {
  4714. "key": "collection/b",
  4715. "options": {
  4716. "hasCommittedMutations": false,
  4717. "hasLocalMutations": false
  4718. },
  4719. "value": {
  4720. "key": "b"
  4721. },
  4722. "version": 1000
  4723. }
  4724. ],
  4725. "targets": [
  4726. 2
  4727. ]
  4728. }
  4729. },
  4730. {
  4731. "watchCurrent": [
  4732. [
  4733. 2
  4734. ],
  4735. "resume-token-1000"
  4736. ]
  4737. },
  4738. {
  4739. "watchSnapshot": {
  4740. "targetIds": [
  4741. ],
  4742. "version": 1000
  4743. },
  4744. "expectedSnapshotEvents": [
  4745. {
  4746. "added": [
  4747. {
  4748. "key": "collection/a",
  4749. "options": {
  4750. "hasCommittedMutations": false,
  4751. "hasLocalMutations": false
  4752. },
  4753. "value": {
  4754. "key": "a"
  4755. },
  4756. "version": 1000
  4757. },
  4758. {
  4759. "key": "collection/b",
  4760. "options": {
  4761. "hasCommittedMutations": false,
  4762. "hasLocalMutations": false
  4763. },
  4764. "value": {
  4765. "key": "b"
  4766. },
  4767. "version": 1000
  4768. }
  4769. ],
  4770. "errorCode": 0,
  4771. "fromCache": false,
  4772. "hasPendingWrites": false,
  4773. "query": {
  4774. "filters": [
  4775. ],
  4776. "orderBys": [
  4777. ],
  4778. "path": "collection"
  4779. }
  4780. }
  4781. ]
  4782. },
  4783. {
  4784. "watchReset": [
  4785. 2
  4786. ]
  4787. },
  4788. {
  4789. "watchEntity": {
  4790. "docs": [
  4791. ],
  4792. "targets": [
  4793. 2
  4794. ]
  4795. }
  4796. },
  4797. {
  4798. "watchCurrent": [
  4799. [
  4800. 2
  4801. ],
  4802. "resume-token-1001"
  4803. ]
  4804. },
  4805. {
  4806. "watchSnapshot": {
  4807. "targetIds": [
  4808. ],
  4809. "version": 2000
  4810. },
  4811. "expectedSnapshotEvents": [
  4812. {
  4813. "errorCode": 0,
  4814. "fromCache": true,
  4815. "hasPendingWrites": false,
  4816. "query": {
  4817. "filters": [
  4818. ],
  4819. "orderBys": [
  4820. ],
  4821. "path": "collection"
  4822. }
  4823. }
  4824. ],
  4825. "expectedState": {
  4826. "activeLimboDocs": [
  4827. "collection/a"
  4828. ],
  4829. "activeTargets": {
  4830. "1": {
  4831. "queries": [
  4832. {
  4833. "filters": [
  4834. ],
  4835. "orderBys": [
  4836. ],
  4837. "path": "collection/a"
  4838. }
  4839. ],
  4840. "resumeToken": ""
  4841. },
  4842. "2": {
  4843. "queries": [
  4844. {
  4845. "filters": [
  4846. ],
  4847. "orderBys": [
  4848. ],
  4849. "path": "collection"
  4850. }
  4851. ],
  4852. "resumeToken": ""
  4853. }
  4854. },
  4855. "enqueuedLimboDocs": [
  4856. "collection/b"
  4857. ]
  4858. }
  4859. },
  4860. {
  4861. "watchRemove": {
  4862. "cause": {
  4863. "code": 8
  4864. },
  4865. "targetIds": [
  4866. 1
  4867. ]
  4868. },
  4869. "expectedSnapshotEvents": [
  4870. {
  4871. "errorCode": 0,
  4872. "fromCache": true,
  4873. "hasPendingWrites": false,
  4874. "query": {
  4875. "filters": [
  4876. ],
  4877. "orderBys": [
  4878. ],
  4879. "path": "collection"
  4880. },
  4881. "removed": [
  4882. {
  4883. "key": "collection/a",
  4884. "options": {
  4885. "hasCommittedMutations": false,
  4886. "hasLocalMutations": false
  4887. },
  4888. "value": {
  4889. "key": "a"
  4890. },
  4891. "version": 1000
  4892. }
  4893. ]
  4894. }
  4895. ],
  4896. "expectedState": {
  4897. "activeLimboDocs": [
  4898. "collection/b"
  4899. ],
  4900. "activeTargets": {
  4901. "2": {
  4902. "queries": [
  4903. {
  4904. "filters": [
  4905. ],
  4906. "orderBys": [
  4907. ],
  4908. "path": "collection"
  4909. }
  4910. ],
  4911. "resumeToken": ""
  4912. },
  4913. "3": {
  4914. "queries": [
  4915. {
  4916. "filters": [
  4917. ],
  4918. "orderBys": [
  4919. ],
  4920. "path": "collection/b"
  4921. }
  4922. ],
  4923. "resumeToken": ""
  4924. }
  4925. },
  4926. "enqueuedLimboDocs": [
  4927. ]
  4928. }
  4929. },
  4930. {
  4931. "watchRemove": {
  4932. "cause": {
  4933. "code": 8
  4934. },
  4935. "targetIds": [
  4936. 3
  4937. ]
  4938. },
  4939. "expectedSnapshotEvents": [
  4940. {
  4941. "errorCode": 0,
  4942. "fromCache": false,
  4943. "hasPendingWrites": false,
  4944. "query": {
  4945. "filters": [
  4946. ],
  4947. "orderBys": [
  4948. ],
  4949. "path": "collection"
  4950. },
  4951. "removed": [
  4952. {
  4953. "key": "collection/b",
  4954. "options": {
  4955. "hasCommittedMutations": false,
  4956. "hasLocalMutations": false
  4957. },
  4958. "value": {
  4959. "key": "b"
  4960. },
  4961. "version": 1000
  4962. }
  4963. ]
  4964. }
  4965. ],
  4966. "expectedState": {
  4967. "activeLimboDocs": [
  4968. ],
  4969. "activeTargets": {
  4970. "2": {
  4971. "queries": [
  4972. {
  4973. "filters": [
  4974. ],
  4975. "orderBys": [
  4976. ],
  4977. "path": "collection"
  4978. }
  4979. ],
  4980. "resumeToken": ""
  4981. }
  4982. },
  4983. "enqueuedLimboDocs": [
  4984. ]
  4985. }
  4986. }
  4987. ]
  4988. },
  4989. "Limbo resolution throttling with all results at once from watch": {
  4990. "describeName": "Limbo Documents:",
  4991. "itName": "Limbo resolution throttling with all results at once from watch",
  4992. "tags": [
  4993. ],
  4994. "config": {
  4995. "maxConcurrentLimboResolutions": 2,
  4996. "numClients": 1,
  4997. "useGarbageCollection": true
  4998. },
  4999. "steps": [
  5000. {
  5001. "userListen": {
  5002. "query": {
  5003. "filters": [
  5004. ],
  5005. "orderBys": [
  5006. ],
  5007. "path": "collection"
  5008. },
  5009. "targetId": 2
  5010. },
  5011. "expectedState": {
  5012. "activeTargets": {
  5013. "2": {
  5014. "queries": [
  5015. {
  5016. "filters": [
  5017. ],
  5018. "orderBys": [
  5019. ],
  5020. "path": "collection"
  5021. }
  5022. ],
  5023. "resumeToken": ""
  5024. }
  5025. }
  5026. }
  5027. },
  5028. {
  5029. "watchAck": [
  5030. 2
  5031. ]
  5032. },
  5033. {
  5034. "watchEntity": {
  5035. "docs": [
  5036. {
  5037. "key": "collection/a",
  5038. "options": {
  5039. "hasCommittedMutations": false,
  5040. "hasLocalMutations": false
  5041. },
  5042. "value": {
  5043. "key": "a"
  5044. },
  5045. "version": 1000
  5046. },
  5047. {
  5048. "key": "collection/b",
  5049. "options": {
  5050. "hasCommittedMutations": false,
  5051. "hasLocalMutations": false
  5052. },
  5053. "value": {
  5054. "key": "b"
  5055. },
  5056. "version": 1000
  5057. },
  5058. {
  5059. "key": "collection/c",
  5060. "options": {
  5061. "hasCommittedMutations": false,
  5062. "hasLocalMutations": false
  5063. },
  5064. "value": {
  5065. "key": "c"
  5066. },
  5067. "version": 1000
  5068. },
  5069. {
  5070. "key": "collection/d",
  5071. "options": {
  5072. "hasCommittedMutations": false,
  5073. "hasLocalMutations": false
  5074. },
  5075. "value": {
  5076. "key": "d"
  5077. },
  5078. "version": 1000
  5079. },
  5080. {
  5081. "key": "collection/e",
  5082. "options": {
  5083. "hasCommittedMutations": false,
  5084. "hasLocalMutations": false
  5085. },
  5086. "value": {
  5087. "key": "e"
  5088. },
  5089. "version": 1000
  5090. }
  5091. ],
  5092. "targets": [
  5093. 2
  5094. ]
  5095. }
  5096. },
  5097. {
  5098. "watchCurrent": [
  5099. [
  5100. 2
  5101. ],
  5102. "resume-token-1000"
  5103. ]
  5104. },
  5105. {
  5106. "watchSnapshot": {
  5107. "targetIds": [
  5108. ],
  5109. "version": 1000
  5110. },
  5111. "expectedSnapshotEvents": [
  5112. {
  5113. "added": [
  5114. {
  5115. "key": "collection/a",
  5116. "options": {
  5117. "hasCommittedMutations": false,
  5118. "hasLocalMutations": false
  5119. },
  5120. "value": {
  5121. "key": "a"
  5122. },
  5123. "version": 1000
  5124. },
  5125. {
  5126. "key": "collection/b",
  5127. "options": {
  5128. "hasCommittedMutations": false,
  5129. "hasLocalMutations": false
  5130. },
  5131. "value": {
  5132. "key": "b"
  5133. },
  5134. "version": 1000
  5135. },
  5136. {
  5137. "key": "collection/c",
  5138. "options": {
  5139. "hasCommittedMutations": false,
  5140. "hasLocalMutations": false
  5141. },
  5142. "value": {
  5143. "key": "c"
  5144. },
  5145. "version": 1000
  5146. },
  5147. {
  5148. "key": "collection/d",
  5149. "options": {
  5150. "hasCommittedMutations": false,
  5151. "hasLocalMutations": false
  5152. },
  5153. "value": {
  5154. "key": "d"
  5155. },
  5156. "version": 1000
  5157. },
  5158. {
  5159. "key": "collection/e",
  5160. "options": {
  5161. "hasCommittedMutations": false,
  5162. "hasLocalMutations": false
  5163. },
  5164. "value": {
  5165. "key": "e"
  5166. },
  5167. "version": 1000
  5168. }
  5169. ],
  5170. "errorCode": 0,
  5171. "fromCache": false,
  5172. "hasPendingWrites": false,
  5173. "query": {
  5174. "filters": [
  5175. ],
  5176. "orderBys": [
  5177. ],
  5178. "path": "collection"
  5179. }
  5180. }
  5181. ]
  5182. },
  5183. {
  5184. "watchReset": [
  5185. 2
  5186. ]
  5187. },
  5188. {
  5189. "watchEntity": {
  5190. "docs": [
  5191. ],
  5192. "targets": [
  5193. 2
  5194. ]
  5195. }
  5196. },
  5197. {
  5198. "watchCurrent": [
  5199. [
  5200. 2
  5201. ],
  5202. "resume-token-2000"
  5203. ]
  5204. },
  5205. {
  5206. "watchSnapshot": {
  5207. "targetIds": [
  5208. ],
  5209. "version": 2000
  5210. },
  5211. "expectedSnapshotEvents": [
  5212. {
  5213. "errorCode": 0,
  5214. "fromCache": true,
  5215. "hasPendingWrites": false,
  5216. "query": {
  5217. "filters": [
  5218. ],
  5219. "orderBys": [
  5220. ],
  5221. "path": "collection"
  5222. }
  5223. }
  5224. ],
  5225. "expectedState": {
  5226. "activeLimboDocs": [
  5227. "collection/a",
  5228. "collection/b"
  5229. ],
  5230. "activeTargets": {
  5231. "1": {
  5232. "queries": [
  5233. {
  5234. "filters": [
  5235. ],
  5236. "orderBys": [
  5237. ],
  5238. "path": "collection/a"
  5239. }
  5240. ],
  5241. "resumeToken": ""
  5242. },
  5243. "2": {
  5244. "queries": [
  5245. {
  5246. "filters": [
  5247. ],
  5248. "orderBys": [
  5249. ],
  5250. "path": "collection"
  5251. }
  5252. ],
  5253. "resumeToken": ""
  5254. },
  5255. "3": {
  5256. "queries": [
  5257. {
  5258. "filters": [
  5259. ],
  5260. "orderBys": [
  5261. ],
  5262. "path": "collection/b"
  5263. }
  5264. ],
  5265. "resumeToken": ""
  5266. }
  5267. },
  5268. "enqueuedLimboDocs": [
  5269. "collection/c",
  5270. "collection/d",
  5271. "collection/e"
  5272. ]
  5273. }
  5274. },
  5275. {
  5276. "watchAck": [
  5277. 1
  5278. ]
  5279. },
  5280. {
  5281. "watchAck": [
  5282. 3
  5283. ]
  5284. },
  5285. {
  5286. "watchCurrent": [
  5287. [
  5288. 1
  5289. ],
  5290. "resume-token-2001"
  5291. ]
  5292. },
  5293. {
  5294. "watchCurrent": [
  5295. [
  5296. 3
  5297. ],
  5298. "resume-token-2001"
  5299. ]
  5300. },
  5301. {
  5302. "watchSnapshot": {
  5303. "targetIds": [
  5304. ],
  5305. "version": 2001
  5306. },
  5307. "expectedSnapshotEvents": [
  5308. {
  5309. "errorCode": 0,
  5310. "fromCache": true,
  5311. "hasPendingWrites": false,
  5312. "query": {
  5313. "filters": [
  5314. ],
  5315. "orderBys": [
  5316. ],
  5317. "path": "collection"
  5318. },
  5319. "removed": [
  5320. {
  5321. "key": "collection/a",
  5322. "options": {
  5323. "hasCommittedMutations": false,
  5324. "hasLocalMutations": false
  5325. },
  5326. "value": {
  5327. "key": "a"
  5328. },
  5329. "version": 1000
  5330. },
  5331. {
  5332. "key": "collection/b",
  5333. "options": {
  5334. "hasCommittedMutations": false,
  5335. "hasLocalMutations": false
  5336. },
  5337. "value": {
  5338. "key": "b"
  5339. },
  5340. "version": 1000
  5341. }
  5342. ]
  5343. }
  5344. ],
  5345. "expectedState": {
  5346. "activeLimboDocs": [
  5347. "collection/c",
  5348. "collection/d"
  5349. ],
  5350. "activeTargets": {
  5351. "2": {
  5352. "queries": [
  5353. {
  5354. "filters": [
  5355. ],
  5356. "orderBys": [
  5357. ],
  5358. "path": "collection"
  5359. }
  5360. ],
  5361. "resumeToken": ""
  5362. },
  5363. "5": {
  5364. "queries": [
  5365. {
  5366. "filters": [
  5367. ],
  5368. "orderBys": [
  5369. ],
  5370. "path": "collection/c"
  5371. }
  5372. ],
  5373. "resumeToken": ""
  5374. },
  5375. "7": {
  5376. "queries": [
  5377. {
  5378. "filters": [
  5379. ],
  5380. "orderBys": [
  5381. ],
  5382. "path": "collection/d"
  5383. }
  5384. ],
  5385. "resumeToken": ""
  5386. }
  5387. },
  5388. "enqueuedLimboDocs": [
  5389. "collection/e"
  5390. ]
  5391. }
  5392. },
  5393. {
  5394. "watchAck": [
  5395. 5
  5396. ]
  5397. },
  5398. {
  5399. "watchAck": [
  5400. 7
  5401. ]
  5402. },
  5403. {
  5404. "watchCurrent": [
  5405. [
  5406. 5
  5407. ],
  5408. "resume-token-2002"
  5409. ]
  5410. },
  5411. {
  5412. "watchCurrent": [
  5413. [
  5414. 7
  5415. ],
  5416. "resume-token-2002"
  5417. ]
  5418. },
  5419. {
  5420. "watchSnapshot": {
  5421. "targetIds": [
  5422. ],
  5423. "version": 2002
  5424. },
  5425. "expectedSnapshotEvents": [
  5426. {
  5427. "errorCode": 0,
  5428. "fromCache": true,
  5429. "hasPendingWrites": false,
  5430. "query": {
  5431. "filters": [
  5432. ],
  5433. "orderBys": [
  5434. ],
  5435. "path": "collection"
  5436. },
  5437. "removed": [
  5438. {
  5439. "key": "collection/c",
  5440. "options": {
  5441. "hasCommittedMutations": false,
  5442. "hasLocalMutations": false
  5443. },
  5444. "value": {
  5445. "key": "c"
  5446. },
  5447. "version": 1000
  5448. },
  5449. {
  5450. "key": "collection/d",
  5451. "options": {
  5452. "hasCommittedMutations": false,
  5453. "hasLocalMutations": false
  5454. },
  5455. "value": {
  5456. "key": "d"
  5457. },
  5458. "version": 1000
  5459. }
  5460. ]
  5461. }
  5462. ],
  5463. "expectedState": {
  5464. "activeLimboDocs": [
  5465. "collection/e"
  5466. ],
  5467. "activeTargets": {
  5468. "2": {
  5469. "queries": [
  5470. {
  5471. "filters": [
  5472. ],
  5473. "orderBys": [
  5474. ],
  5475. "path": "collection"
  5476. }
  5477. ],
  5478. "resumeToken": ""
  5479. },
  5480. "9": {
  5481. "queries": [
  5482. {
  5483. "filters": [
  5484. ],
  5485. "orderBys": [
  5486. ],
  5487. "path": "collection/e"
  5488. }
  5489. ],
  5490. "resumeToken": ""
  5491. }
  5492. },
  5493. "enqueuedLimboDocs": [
  5494. ]
  5495. }
  5496. },
  5497. {
  5498. "watchAck": [
  5499. 9
  5500. ]
  5501. },
  5502. {
  5503. "watchCurrent": [
  5504. [
  5505. 9
  5506. ],
  5507. "resume-token-2003"
  5508. ]
  5509. },
  5510. {
  5511. "watchSnapshot": {
  5512. "targetIds": [
  5513. ],
  5514. "version": 2003
  5515. },
  5516. "expectedSnapshotEvents": [
  5517. {
  5518. "errorCode": 0,
  5519. "fromCache": false,
  5520. "hasPendingWrites": false,
  5521. "query": {
  5522. "filters": [
  5523. ],
  5524. "orderBys": [
  5525. ],
  5526. "path": "collection"
  5527. },
  5528. "removed": [
  5529. {
  5530. "key": "collection/e",
  5531. "options": {
  5532. "hasCommittedMutations": false,
  5533. "hasLocalMutations": false
  5534. },
  5535. "value": {
  5536. "key": "e"
  5537. },
  5538. "version": 1000
  5539. }
  5540. ]
  5541. }
  5542. ],
  5543. "expectedState": {
  5544. "activeLimboDocs": [
  5545. ],
  5546. "activeTargets": {
  5547. "2": {
  5548. "queries": [
  5549. {
  5550. "filters": [
  5551. ],
  5552. "orderBys": [
  5553. ],
  5554. "path": "collection"
  5555. }
  5556. ],
  5557. "resumeToken": ""
  5558. }
  5559. },
  5560. "enqueuedLimboDocs": [
  5561. ]
  5562. }
  5563. }
  5564. ]
  5565. },
  5566. "Limbo resolution throttling with existence filter mismatch": {
  5567. "describeName": "Limbo Documents:",
  5568. "itName": "Limbo resolution throttling with existence filter mismatch",
  5569. "tags": [
  5570. ],
  5571. "config": {
  5572. "maxConcurrentLimboResolutions": 2,
  5573. "numClients": 1,
  5574. "useGarbageCollection": true
  5575. },
  5576. "steps": [
  5577. {
  5578. "userListen": {
  5579. "query": {
  5580. "filters": [
  5581. ],
  5582. "orderBys": [
  5583. ],
  5584. "path": "collection"
  5585. },
  5586. "targetId": 2
  5587. },
  5588. "expectedState": {
  5589. "activeTargets": {
  5590. "2": {
  5591. "queries": [
  5592. {
  5593. "filters": [
  5594. ],
  5595. "orderBys": [
  5596. ],
  5597. "path": "collection"
  5598. }
  5599. ],
  5600. "resumeToken": ""
  5601. }
  5602. }
  5603. }
  5604. },
  5605. {
  5606. "watchAck": [
  5607. 2
  5608. ]
  5609. },
  5610. {
  5611. "watchEntity": {
  5612. "docs": [
  5613. {
  5614. "key": "collection/a1",
  5615. "options": {
  5616. "hasCommittedMutations": false,
  5617. "hasLocalMutations": false
  5618. },
  5619. "value": {
  5620. "key": "a1"
  5621. },
  5622. "version": 1000
  5623. },
  5624. {
  5625. "key": "collection/a2",
  5626. "options": {
  5627. "hasCommittedMutations": false,
  5628. "hasLocalMutations": false
  5629. },
  5630. "value": {
  5631. "key": "a2"
  5632. },
  5633. "version": 1000
  5634. },
  5635. {
  5636. "key": "collection/a3",
  5637. "options": {
  5638. "hasCommittedMutations": false,
  5639. "hasLocalMutations": false
  5640. },
  5641. "value": {
  5642. "key": "a3"
  5643. },
  5644. "version": 1000
  5645. }
  5646. ],
  5647. "targets": [
  5648. 2
  5649. ]
  5650. }
  5651. },
  5652. {
  5653. "watchCurrent": [
  5654. [
  5655. 2
  5656. ],
  5657. "resume-token-1000"
  5658. ]
  5659. },
  5660. {
  5661. "watchSnapshot": {
  5662. "targetIds": [
  5663. ],
  5664. "version": 1000
  5665. },
  5666. "expectedSnapshotEvents": [
  5667. {
  5668. "added": [
  5669. {
  5670. "key": "collection/a1",
  5671. "options": {
  5672. "hasCommittedMutations": false,
  5673. "hasLocalMutations": false
  5674. },
  5675. "value": {
  5676. "key": "a1"
  5677. },
  5678. "version": 1000
  5679. },
  5680. {
  5681. "key": "collection/a2",
  5682. "options": {
  5683. "hasCommittedMutations": false,
  5684. "hasLocalMutations": false
  5685. },
  5686. "value": {
  5687. "key": "a2"
  5688. },
  5689. "version": 1000
  5690. },
  5691. {
  5692. "key": "collection/a3",
  5693. "options": {
  5694. "hasCommittedMutations": false,
  5695. "hasLocalMutations": false
  5696. },
  5697. "value": {
  5698. "key": "a3"
  5699. },
  5700. "version": 1000
  5701. }
  5702. ],
  5703. "errorCode": 0,
  5704. "fromCache": false,
  5705. "hasPendingWrites": false,
  5706. "query": {
  5707. "filters": [
  5708. ],
  5709. "orderBys": [
  5710. ],
  5711. "path": "collection"
  5712. }
  5713. }
  5714. ]
  5715. },
  5716. {
  5717. "enableNetwork": false,
  5718. "expectedSnapshotEvents": [
  5719. {
  5720. "errorCode": 0,
  5721. "fromCache": true,
  5722. "hasPendingWrites": false,
  5723. "query": {
  5724. "filters": [
  5725. ],
  5726. "orderBys": [
  5727. ],
  5728. "path": "collection"
  5729. }
  5730. }
  5731. ],
  5732. "expectedState": {
  5733. "activeLimboDocs": [
  5734. ],
  5735. "activeTargets": {
  5736. },
  5737. "enqueuedLimboDocs": [
  5738. ]
  5739. }
  5740. },
  5741. {
  5742. "enableNetwork": true,
  5743. "expectedState": {
  5744. "activeTargets": {
  5745. "2": {
  5746. "queries": [
  5747. {
  5748. "filters": [
  5749. ],
  5750. "orderBys": [
  5751. ],
  5752. "path": "collection"
  5753. }
  5754. ],
  5755. "resumeToken": "resume-token-1000"
  5756. }
  5757. }
  5758. }
  5759. },
  5760. {
  5761. "watchAck": [
  5762. 2
  5763. ]
  5764. },
  5765. {
  5766. "watchEntity": {
  5767. "docs": [
  5768. {
  5769. "key": "collection/b1",
  5770. "options": {
  5771. "hasCommittedMutations": false,
  5772. "hasLocalMutations": false
  5773. },
  5774. "value": {
  5775. "key": "b1"
  5776. },
  5777. "version": 1000
  5778. },
  5779. {
  5780. "key": "collection/b2",
  5781. "options": {
  5782. "hasCommittedMutations": false,
  5783. "hasLocalMutations": false
  5784. },
  5785. "value": {
  5786. "key": "b2"
  5787. },
  5788. "version": 1000
  5789. },
  5790. {
  5791. "key": "collection/b3",
  5792. "options": {
  5793. "hasCommittedMutations": false,
  5794. "hasLocalMutations": false
  5795. },
  5796. "value": {
  5797. "key": "b3"
  5798. },
  5799. "version": 1000
  5800. }
  5801. ],
  5802. "targets": [
  5803. 2
  5804. ]
  5805. }
  5806. },
  5807. {
  5808. "watchFilter": [
  5809. [
  5810. 2
  5811. ],
  5812. "collection/b1",
  5813. "collection/b2",
  5814. "collection/b3"
  5815. ]
  5816. },
  5817. {
  5818. "watchSnapshot": {
  5819. "targetIds": [
  5820. ],
  5821. "version": 1001
  5822. },
  5823. "expectedSnapshotEvents": [
  5824. {
  5825. "added": [
  5826. {
  5827. "key": "collection/b1",
  5828. "options": {
  5829. "hasCommittedMutations": false,
  5830. "hasLocalMutations": false
  5831. },
  5832. "value": {
  5833. "key": "b1"
  5834. },
  5835. "version": 1000
  5836. },
  5837. {
  5838. "key": "collection/b2",
  5839. "options": {
  5840. "hasCommittedMutations": false,
  5841. "hasLocalMutations": false
  5842. },
  5843. "value": {
  5844. "key": "b2"
  5845. },
  5846. "version": 1000
  5847. },
  5848. {
  5849. "key": "collection/b3",
  5850. "options": {
  5851. "hasCommittedMutations": false,
  5852. "hasLocalMutations": false
  5853. },
  5854. "value": {
  5855. "key": "b3"
  5856. },
  5857. "version": 1000
  5858. }
  5859. ],
  5860. "errorCode": 0,
  5861. "fromCache": true,
  5862. "hasPendingWrites": false,
  5863. "query": {
  5864. "filters": [
  5865. ],
  5866. "orderBys": [
  5867. ],
  5868. "path": "collection"
  5869. }
  5870. }
  5871. ],
  5872. "expectedState": {
  5873. "activeTargets": {
  5874. "2": {
  5875. "queries": [
  5876. {
  5877. "filters": [
  5878. ],
  5879. "orderBys": [
  5880. ],
  5881. "path": "collection"
  5882. }
  5883. ],
  5884. "resumeToken": ""
  5885. }
  5886. }
  5887. }
  5888. },
  5889. {
  5890. "watchRemove": {
  5891. "targetIds": [
  5892. 2
  5893. ]
  5894. }
  5895. },
  5896. {
  5897. "watchAck": [
  5898. 2
  5899. ]
  5900. },
  5901. {
  5902. "watchEntity": {
  5903. "docs": [
  5904. {
  5905. "key": "collection/b1",
  5906. "options": {
  5907. "hasCommittedMutations": false,
  5908. "hasLocalMutations": false
  5909. },
  5910. "value": {
  5911. "key": "b1"
  5912. },
  5913. "version": 1000
  5914. },
  5915. {
  5916. "key": "collection/b2",
  5917. "options": {
  5918. "hasCommittedMutations": false,
  5919. "hasLocalMutations": false
  5920. },
  5921. "value": {
  5922. "key": "b2"
  5923. },
  5924. "version": 1000
  5925. },
  5926. {
  5927. "key": "collection/b3",
  5928. "options": {
  5929. "hasCommittedMutations": false,
  5930. "hasLocalMutations": false
  5931. },
  5932. "value": {
  5933. "key": "b3"
  5934. },
  5935. "version": 1000
  5936. }
  5937. ],
  5938. "targets": [
  5939. 2
  5940. ]
  5941. }
  5942. },
  5943. {
  5944. "watchCurrent": [
  5945. [
  5946. 2
  5947. ],
  5948. "resume-token-1002"
  5949. ]
  5950. },
  5951. {
  5952. "watchSnapshot": {
  5953. "targetIds": [
  5954. ],
  5955. "version": 1002
  5956. },
  5957. "expectedState": {
  5958. "activeLimboDocs": [
  5959. "collection/a1",
  5960. "collection/a2"
  5961. ],
  5962. "activeTargets": {
  5963. "1": {
  5964. "queries": [
  5965. {
  5966. "filters": [
  5967. ],
  5968. "orderBys": [
  5969. ],
  5970. "path": "collection/a1"
  5971. }
  5972. ],
  5973. "resumeToken": ""
  5974. },
  5975. "2": {
  5976. "queries": [
  5977. {
  5978. "filters": [
  5979. ],
  5980. "orderBys": [
  5981. ],
  5982. "path": "collection"
  5983. }
  5984. ],
  5985. "resumeToken": ""
  5986. },
  5987. "3": {
  5988. "queries": [
  5989. {
  5990. "filters": [
  5991. ],
  5992. "orderBys": [
  5993. ],
  5994. "path": "collection/a2"
  5995. }
  5996. ],
  5997. "resumeToken": ""
  5998. }
  5999. },
  6000. "enqueuedLimboDocs": [
  6001. "collection/a3"
  6002. ]
  6003. }
  6004. },
  6005. {
  6006. "watchAck": [
  6007. 1
  6008. ]
  6009. },
  6010. {
  6011. "watchAck": [
  6012. 3
  6013. ]
  6014. },
  6015. {
  6016. "watchCurrent": [
  6017. [
  6018. 1
  6019. ],
  6020. "resume-token-1003"
  6021. ]
  6022. },
  6023. {
  6024. "watchCurrent": [
  6025. [
  6026. 3
  6027. ],
  6028. "resume-token-1003"
  6029. ]
  6030. },
  6031. {
  6032. "watchSnapshot": {
  6033. "targetIds": [
  6034. ],
  6035. "version": 1003
  6036. },
  6037. "expectedSnapshotEvents": [
  6038. {
  6039. "errorCode": 0,
  6040. "fromCache": true,
  6041. "hasPendingWrites": false,
  6042. "query": {
  6043. "filters": [
  6044. ],
  6045. "orderBys": [
  6046. ],
  6047. "path": "collection"
  6048. },
  6049. "removed": [
  6050. {
  6051. "key": "collection/a1",
  6052. "options": {
  6053. "hasCommittedMutations": false,
  6054. "hasLocalMutations": false
  6055. },
  6056. "value": {
  6057. "key": "a1"
  6058. },
  6059. "version": 1000
  6060. },
  6061. {
  6062. "key": "collection/a2",
  6063. "options": {
  6064. "hasCommittedMutations": false,
  6065. "hasLocalMutations": false
  6066. },
  6067. "value": {
  6068. "key": "a2"
  6069. },
  6070. "version": 1000
  6071. }
  6072. ]
  6073. }
  6074. ],
  6075. "expectedState": {
  6076. "activeLimboDocs": [
  6077. "collection/a3"
  6078. ],
  6079. "activeTargets": {
  6080. "2": {
  6081. "queries": [
  6082. {
  6083. "filters": [
  6084. ],
  6085. "orderBys": [
  6086. ],
  6087. "path": "collection"
  6088. }
  6089. ],
  6090. "resumeToken": ""
  6091. },
  6092. "5": {
  6093. "queries": [
  6094. {
  6095. "filters": [
  6096. ],
  6097. "orderBys": [
  6098. ],
  6099. "path": "collection/a3"
  6100. }
  6101. ],
  6102. "resumeToken": ""
  6103. }
  6104. },
  6105. "enqueuedLimboDocs": [
  6106. ]
  6107. }
  6108. },
  6109. {
  6110. "watchAck": [
  6111. 5
  6112. ]
  6113. },
  6114. {
  6115. "watchCurrent": [
  6116. [
  6117. 5
  6118. ],
  6119. "resume-token-1004"
  6120. ]
  6121. },
  6122. {
  6123. "watchSnapshot": {
  6124. "targetIds": [
  6125. ],
  6126. "version": 1004
  6127. },
  6128. "expectedSnapshotEvents": [
  6129. {
  6130. "errorCode": 0,
  6131. "fromCache": false,
  6132. "hasPendingWrites": false,
  6133. "query": {
  6134. "filters": [
  6135. ],
  6136. "orderBys": [
  6137. ],
  6138. "path": "collection"
  6139. },
  6140. "removed": [
  6141. {
  6142. "key": "collection/a3",
  6143. "options": {
  6144. "hasCommittedMutations": false,
  6145. "hasLocalMutations": false
  6146. },
  6147. "value": {
  6148. "key": "a3"
  6149. },
  6150. "version": 1000
  6151. }
  6152. ]
  6153. }
  6154. ],
  6155. "expectedState": {
  6156. "activeLimboDocs": [
  6157. ],
  6158. "activeTargets": {
  6159. "2": {
  6160. "queries": [
  6161. {
  6162. "filters": [
  6163. ],
  6164. "orderBys": [
  6165. ],
  6166. "path": "collection"
  6167. }
  6168. ],
  6169. "resumeToken": ""
  6170. }
  6171. },
  6172. "enqueuedLimboDocs": [
  6173. ]
  6174. }
  6175. }
  6176. ]
  6177. },
  6178. "Limbo resolution throttling with results one at a time from watch": {
  6179. "describeName": "Limbo Documents:",
  6180. "itName": "Limbo resolution throttling with results one at a time from watch",
  6181. "tags": [
  6182. ],
  6183. "config": {
  6184. "maxConcurrentLimboResolutions": 2,
  6185. "numClients": 1,
  6186. "useGarbageCollection": true
  6187. },
  6188. "steps": [
  6189. {
  6190. "userListen": {
  6191. "query": {
  6192. "filters": [
  6193. ],
  6194. "orderBys": [
  6195. ],
  6196. "path": "collection"
  6197. },
  6198. "targetId": 2
  6199. },
  6200. "expectedState": {
  6201. "activeTargets": {
  6202. "2": {
  6203. "queries": [
  6204. {
  6205. "filters": [
  6206. ],
  6207. "orderBys": [
  6208. ],
  6209. "path": "collection"
  6210. }
  6211. ],
  6212. "resumeToken": ""
  6213. }
  6214. }
  6215. }
  6216. },
  6217. {
  6218. "watchAck": [
  6219. 2
  6220. ]
  6221. },
  6222. {
  6223. "watchEntity": {
  6224. "docs": [
  6225. {
  6226. "key": "collection/a",
  6227. "options": {
  6228. "hasCommittedMutations": false,
  6229. "hasLocalMutations": false
  6230. },
  6231. "value": {
  6232. "key": "a"
  6233. },
  6234. "version": 1000
  6235. },
  6236. {
  6237. "key": "collection/b",
  6238. "options": {
  6239. "hasCommittedMutations": false,
  6240. "hasLocalMutations": false
  6241. },
  6242. "value": {
  6243. "key": "b"
  6244. },
  6245. "version": 1000
  6246. },
  6247. {
  6248. "key": "collection/c",
  6249. "options": {
  6250. "hasCommittedMutations": false,
  6251. "hasLocalMutations": false
  6252. },
  6253. "value": {
  6254. "key": "c"
  6255. },
  6256. "version": 1000
  6257. },
  6258. {
  6259. "key": "collection/d",
  6260. "options": {
  6261. "hasCommittedMutations": false,
  6262. "hasLocalMutations": false
  6263. },
  6264. "value": {
  6265. "key": "d"
  6266. },
  6267. "version": 1000
  6268. },
  6269. {
  6270. "key": "collection/e",
  6271. "options": {
  6272. "hasCommittedMutations": false,
  6273. "hasLocalMutations": false
  6274. },
  6275. "value": {
  6276. "key": "e"
  6277. },
  6278. "version": 1000
  6279. }
  6280. ],
  6281. "targets": [
  6282. 2
  6283. ]
  6284. }
  6285. },
  6286. {
  6287. "watchCurrent": [
  6288. [
  6289. 2
  6290. ],
  6291. "resume-token-1000"
  6292. ]
  6293. },
  6294. {
  6295. "watchSnapshot": {
  6296. "targetIds": [
  6297. ],
  6298. "version": 1000
  6299. },
  6300. "expectedSnapshotEvents": [
  6301. {
  6302. "added": [
  6303. {
  6304. "key": "collection/a",
  6305. "options": {
  6306. "hasCommittedMutations": false,
  6307. "hasLocalMutations": false
  6308. },
  6309. "value": {
  6310. "key": "a"
  6311. },
  6312. "version": 1000
  6313. },
  6314. {
  6315. "key": "collection/b",
  6316. "options": {
  6317. "hasCommittedMutations": false,
  6318. "hasLocalMutations": false
  6319. },
  6320. "value": {
  6321. "key": "b"
  6322. },
  6323. "version": 1000
  6324. },
  6325. {
  6326. "key": "collection/c",
  6327. "options": {
  6328. "hasCommittedMutations": false,
  6329. "hasLocalMutations": false
  6330. },
  6331. "value": {
  6332. "key": "c"
  6333. },
  6334. "version": 1000
  6335. },
  6336. {
  6337. "key": "collection/d",
  6338. "options": {
  6339. "hasCommittedMutations": false,
  6340. "hasLocalMutations": false
  6341. },
  6342. "value": {
  6343. "key": "d"
  6344. },
  6345. "version": 1000
  6346. },
  6347. {
  6348. "key": "collection/e",
  6349. "options": {
  6350. "hasCommittedMutations": false,
  6351. "hasLocalMutations": false
  6352. },
  6353. "value": {
  6354. "key": "e"
  6355. },
  6356. "version": 1000
  6357. }
  6358. ],
  6359. "errorCode": 0,
  6360. "fromCache": false,
  6361. "hasPendingWrites": false,
  6362. "query": {
  6363. "filters": [
  6364. ],
  6365. "orderBys": [
  6366. ],
  6367. "path": "collection"
  6368. }
  6369. }
  6370. ]
  6371. },
  6372. {
  6373. "watchReset": [
  6374. 2
  6375. ]
  6376. },
  6377. {
  6378. "watchEntity": {
  6379. "docs": [
  6380. ],
  6381. "targets": [
  6382. 2
  6383. ]
  6384. }
  6385. },
  6386. {
  6387. "watchCurrent": [
  6388. [
  6389. 2
  6390. ],
  6391. "resume-token-2000"
  6392. ]
  6393. },
  6394. {
  6395. "watchSnapshot": {
  6396. "targetIds": [
  6397. ],
  6398. "version": 2000
  6399. },
  6400. "expectedSnapshotEvents": [
  6401. {
  6402. "errorCode": 0,
  6403. "fromCache": true,
  6404. "hasPendingWrites": false,
  6405. "query": {
  6406. "filters": [
  6407. ],
  6408. "orderBys": [
  6409. ],
  6410. "path": "collection"
  6411. }
  6412. }
  6413. ],
  6414. "expectedState": {
  6415. "activeLimboDocs": [
  6416. "collection/a",
  6417. "collection/b"
  6418. ],
  6419. "activeTargets": {
  6420. "1": {
  6421. "queries": [
  6422. {
  6423. "filters": [
  6424. ],
  6425. "orderBys": [
  6426. ],
  6427. "path": "collection/a"
  6428. }
  6429. ],
  6430. "resumeToken": ""
  6431. },
  6432. "2": {
  6433. "queries": [
  6434. {
  6435. "filters": [
  6436. ],
  6437. "orderBys": [
  6438. ],
  6439. "path": "collection"
  6440. }
  6441. ],
  6442. "resumeToken": ""
  6443. },
  6444. "3": {
  6445. "queries": [
  6446. {
  6447. "filters": [
  6448. ],
  6449. "orderBys": [
  6450. ],
  6451. "path": "collection/b"
  6452. }
  6453. ],
  6454. "resumeToken": ""
  6455. }
  6456. },
  6457. "enqueuedLimboDocs": [
  6458. "collection/c",
  6459. "collection/d",
  6460. "collection/e"
  6461. ]
  6462. }
  6463. },
  6464. {
  6465. "watchAck": [
  6466. 1
  6467. ]
  6468. },
  6469. {
  6470. "watchAck": [
  6471. 3
  6472. ]
  6473. },
  6474. {
  6475. "watchCurrent": [
  6476. [
  6477. 1
  6478. ],
  6479. "resume-token-2001"
  6480. ]
  6481. },
  6482. {
  6483. "watchSnapshot": {
  6484. "targetIds": [
  6485. ],
  6486. "version": 2001
  6487. },
  6488. "expectedSnapshotEvents": [
  6489. {
  6490. "errorCode": 0,
  6491. "fromCache": true,
  6492. "hasPendingWrites": false,
  6493. "query": {
  6494. "filters": [
  6495. ],
  6496. "orderBys": [
  6497. ],
  6498. "path": "collection"
  6499. },
  6500. "removed": [
  6501. {
  6502. "key": "collection/a",
  6503. "options": {
  6504. "hasCommittedMutations": false,
  6505. "hasLocalMutations": false
  6506. },
  6507. "value": {
  6508. "key": "a"
  6509. },
  6510. "version": 1000
  6511. }
  6512. ]
  6513. }
  6514. ],
  6515. "expectedState": {
  6516. "activeLimboDocs": [
  6517. "collection/b",
  6518. "collection/c"
  6519. ],
  6520. "activeTargets": {
  6521. "2": {
  6522. "queries": [
  6523. {
  6524. "filters": [
  6525. ],
  6526. "orderBys": [
  6527. ],
  6528. "path": "collection"
  6529. }
  6530. ],
  6531. "resumeToken": ""
  6532. },
  6533. "3": {
  6534. "queries": [
  6535. {
  6536. "filters": [
  6537. ],
  6538. "orderBys": [
  6539. ],
  6540. "path": "collection/b"
  6541. }
  6542. ],
  6543. "resumeToken": ""
  6544. },
  6545. "5": {
  6546. "queries": [
  6547. {
  6548. "filters": [
  6549. ],
  6550. "orderBys": [
  6551. ],
  6552. "path": "collection/c"
  6553. }
  6554. ],
  6555. "resumeToken": ""
  6556. }
  6557. },
  6558. "enqueuedLimboDocs": [
  6559. "collection/d",
  6560. "collection/e"
  6561. ]
  6562. }
  6563. },
  6564. {
  6565. "watchAck": [
  6566. 5
  6567. ]
  6568. },
  6569. {
  6570. "watchCurrent": [
  6571. [
  6572. 3
  6573. ],
  6574. "resume-token-2002"
  6575. ]
  6576. },
  6577. {
  6578. "watchSnapshot": {
  6579. "targetIds": [
  6580. ],
  6581. "version": 2002
  6582. },
  6583. "expectedSnapshotEvents": [
  6584. {
  6585. "errorCode": 0,
  6586. "fromCache": true,
  6587. "hasPendingWrites": false,
  6588. "query": {
  6589. "filters": [
  6590. ],
  6591. "orderBys": [
  6592. ],
  6593. "path": "collection"
  6594. },
  6595. "removed": [
  6596. {
  6597. "key": "collection/b",
  6598. "options": {
  6599. "hasCommittedMutations": false,
  6600. "hasLocalMutations": false
  6601. },
  6602. "value": {
  6603. "key": "b"
  6604. },
  6605. "version": 1000
  6606. }
  6607. ]
  6608. }
  6609. ],
  6610. "expectedState": {
  6611. "activeLimboDocs": [
  6612. "collection/c",
  6613. "collection/d"
  6614. ],
  6615. "activeTargets": {
  6616. "2": {
  6617. "queries": [
  6618. {
  6619. "filters": [
  6620. ],
  6621. "orderBys": [
  6622. ],
  6623. "path": "collection"
  6624. }
  6625. ],
  6626. "resumeToken": ""
  6627. },
  6628. "5": {
  6629. "queries": [
  6630. {
  6631. "filters": [
  6632. ],
  6633. "orderBys": [
  6634. ],
  6635. "path": "collection/c"
  6636. }
  6637. ],
  6638. "resumeToken": ""
  6639. },
  6640. "7": {
  6641. "queries": [
  6642. {
  6643. "filters": [
  6644. ],
  6645. "orderBys": [
  6646. ],
  6647. "path": "collection/d"
  6648. }
  6649. ],
  6650. "resumeToken": ""
  6651. }
  6652. },
  6653. "enqueuedLimboDocs": [
  6654. "collection/e"
  6655. ]
  6656. }
  6657. },
  6658. {
  6659. "watchAck": [
  6660. 7
  6661. ]
  6662. },
  6663. {
  6664. "watchCurrent": [
  6665. [
  6666. 5
  6667. ],
  6668. "resume-token-2003"
  6669. ]
  6670. },
  6671. {
  6672. "watchSnapshot": {
  6673. "targetIds": [
  6674. ],
  6675. "version": 2003
  6676. },
  6677. "expectedSnapshotEvents": [
  6678. {
  6679. "errorCode": 0,
  6680. "fromCache": true,
  6681. "hasPendingWrites": false,
  6682. "query": {
  6683. "filters": [
  6684. ],
  6685. "orderBys": [
  6686. ],
  6687. "path": "collection"
  6688. },
  6689. "removed": [
  6690. {
  6691. "key": "collection/c",
  6692. "options": {
  6693. "hasCommittedMutations": false,
  6694. "hasLocalMutations": false
  6695. },
  6696. "value": {
  6697. "key": "c"
  6698. },
  6699. "version": 1000
  6700. }
  6701. ]
  6702. }
  6703. ],
  6704. "expectedState": {
  6705. "activeLimboDocs": [
  6706. "collection/d",
  6707. "collection/e"
  6708. ],
  6709. "activeTargets": {
  6710. "2": {
  6711. "queries": [
  6712. {
  6713. "filters": [
  6714. ],
  6715. "orderBys": [
  6716. ],
  6717. "path": "collection"
  6718. }
  6719. ],
  6720. "resumeToken": ""
  6721. },
  6722. "7": {
  6723. "queries": [
  6724. {
  6725. "filters": [
  6726. ],
  6727. "orderBys": [
  6728. ],
  6729. "path": "collection/d"
  6730. }
  6731. ],
  6732. "resumeToken": ""
  6733. },
  6734. "9": {
  6735. "queries": [
  6736. {
  6737. "filters": [
  6738. ],
  6739. "orderBys": [
  6740. ],
  6741. "path": "collection/e"
  6742. }
  6743. ],
  6744. "resumeToken": ""
  6745. }
  6746. },
  6747. "enqueuedLimboDocs": [
  6748. ]
  6749. }
  6750. },
  6751. {
  6752. "watchAck": [
  6753. 9
  6754. ]
  6755. },
  6756. {
  6757. "watchCurrent": [
  6758. [
  6759. 7
  6760. ],
  6761. "resume-token-2004"
  6762. ]
  6763. },
  6764. {
  6765. "watchSnapshot": {
  6766. "targetIds": [
  6767. ],
  6768. "version": 2004
  6769. },
  6770. "expectedSnapshotEvents": [
  6771. {
  6772. "errorCode": 0,
  6773. "fromCache": true,
  6774. "hasPendingWrites": false,
  6775. "query": {
  6776. "filters": [
  6777. ],
  6778. "orderBys": [
  6779. ],
  6780. "path": "collection"
  6781. },
  6782. "removed": [
  6783. {
  6784. "key": "collection/d",
  6785. "options": {
  6786. "hasCommittedMutations": false,
  6787. "hasLocalMutations": false
  6788. },
  6789. "value": {
  6790. "key": "d"
  6791. },
  6792. "version": 1000
  6793. }
  6794. ]
  6795. }
  6796. ],
  6797. "expectedState": {
  6798. "activeLimboDocs": [
  6799. "collection/e"
  6800. ],
  6801. "activeTargets": {
  6802. "2": {
  6803. "queries": [
  6804. {
  6805. "filters": [
  6806. ],
  6807. "orderBys": [
  6808. ],
  6809. "path": "collection"
  6810. }
  6811. ],
  6812. "resumeToken": ""
  6813. },
  6814. "9": {
  6815. "queries": [
  6816. {
  6817. "filters": [
  6818. ],
  6819. "orderBys": [
  6820. ],
  6821. "path": "collection/e"
  6822. }
  6823. ],
  6824. "resumeToken": ""
  6825. }
  6826. },
  6827. "enqueuedLimboDocs": [
  6828. ]
  6829. }
  6830. },
  6831. {
  6832. "watchCurrent": [
  6833. [
  6834. 9
  6835. ],
  6836. "resume-token-2005"
  6837. ]
  6838. },
  6839. {
  6840. "watchSnapshot": {
  6841. "targetIds": [
  6842. ],
  6843. "version": 2005
  6844. },
  6845. "expectedSnapshotEvents": [
  6846. {
  6847. "errorCode": 0,
  6848. "fromCache": false,
  6849. "hasPendingWrites": false,
  6850. "query": {
  6851. "filters": [
  6852. ],
  6853. "orderBys": [
  6854. ],
  6855. "path": "collection"
  6856. },
  6857. "removed": [
  6858. {
  6859. "key": "collection/e",
  6860. "options": {
  6861. "hasCommittedMutations": false,
  6862. "hasLocalMutations": false
  6863. },
  6864. "value": {
  6865. "key": "e"
  6866. },
  6867. "version": 1000
  6868. }
  6869. ]
  6870. }
  6871. ],
  6872. "expectedState": {
  6873. "activeLimboDocs": [
  6874. ],
  6875. "activeTargets": {
  6876. "2": {
  6877. "queries": [
  6878. {
  6879. "filters": [
  6880. ],
  6881. "orderBys": [
  6882. ],
  6883. "path": "collection"
  6884. }
  6885. ],
  6886. "resumeToken": ""
  6887. }
  6888. },
  6889. "enqueuedLimboDocs": [
  6890. ]
  6891. }
  6892. }
  6893. ]
  6894. },
  6895. "LimitToLast query from secondary results in expected limbo doc": {
  6896. "describeName": "Limbo Documents:",
  6897. "itName": "LimitToLast query from secondary results in expected limbo doc",
  6898. "tags": [
  6899. "multi-client"
  6900. ],
  6901. "config": {
  6902. "numClients": 2,
  6903. "useGarbageCollection": false
  6904. },
  6905. "steps": [
  6906. {
  6907. "clientIndex": 0,
  6908. "drainQueue": true
  6909. },
  6910. {
  6911. "applyClientState": {
  6912. "visibility": "visible"
  6913. },
  6914. "clientIndex": 0
  6915. },
  6916. {
  6917. "clientIndex": 1,
  6918. "drainQueue": true
  6919. },
  6920. {
  6921. "clientIndex": 1,
  6922. "userListen": {
  6923. "query": {
  6924. "filters": [
  6925. ],
  6926. "limit": 3,
  6927. "limitType": "LimitToLast",
  6928. "orderBys": [
  6929. [
  6930. "val",
  6931. "desc"
  6932. ]
  6933. ],
  6934. "path": "collection"
  6935. },
  6936. "targetId": 2
  6937. },
  6938. "expectedState": {
  6939. "activeTargets": {
  6940. "2": {
  6941. "queries": [
  6942. {
  6943. "filters": [
  6944. ],
  6945. "limit": 3,
  6946. "limitType": "LimitToLast",
  6947. "orderBys": [
  6948. [
  6949. "val",
  6950. "desc"
  6951. ]
  6952. ],
  6953. "path": "collection"
  6954. }
  6955. ],
  6956. "resumeToken": ""
  6957. }
  6958. }
  6959. }
  6960. },
  6961. {
  6962. "clientIndex": 0,
  6963. "drainQueue": true,
  6964. "expectedState": {
  6965. "activeTargets": {
  6966. "2": {
  6967. "queries": [
  6968. {
  6969. "filters": [
  6970. ],
  6971. "limit": 3,
  6972. "limitType": "LimitToLast",
  6973. "orderBys": [
  6974. [
  6975. "val",
  6976. "desc"
  6977. ]
  6978. ],
  6979. "path": "collection"
  6980. }
  6981. ],
  6982. "resumeToken": ""
  6983. }
  6984. }
  6985. }
  6986. },
  6987. {
  6988. "clientIndex": 0,
  6989. "watchAck": [
  6990. 2
  6991. ]
  6992. },
  6993. {
  6994. "clientIndex": 0,
  6995. "watchEntity": {
  6996. "docs": [
  6997. {
  6998. "key": "collection/a",
  6999. "options": {
  7000. "hasCommittedMutations": false,
  7001. "hasLocalMutations": false
  7002. },
  7003. "value": {
  7004. "val": 11
  7005. },
  7006. "version": 1000
  7007. },
  7008. {
  7009. "key": "collection/b",
  7010. "options": {
  7011. "hasCommittedMutations": false,
  7012. "hasLocalMutations": false
  7013. },
  7014. "value": {
  7015. "val": 12
  7016. },
  7017. "version": 1000
  7018. },
  7019. {
  7020. "key": "collection/c",
  7021. "options": {
  7022. "hasCommittedMutations": false,
  7023. "hasLocalMutations": false
  7024. },
  7025. "value": {
  7026. "val": 13
  7027. },
  7028. "version": 1000
  7029. }
  7030. ],
  7031. "targets": [
  7032. 2
  7033. ]
  7034. }
  7035. },
  7036. {
  7037. "clientIndex": 0,
  7038. "watchCurrent": [
  7039. [
  7040. 2
  7041. ],
  7042. "resume-token-1000"
  7043. ]
  7044. },
  7045. {
  7046. "clientIndex": 0,
  7047. "watchSnapshot": {
  7048. "targetIds": [
  7049. ],
  7050. "version": 1000
  7051. }
  7052. },
  7053. {
  7054. "clientIndex": 1,
  7055. "drainQueue": true,
  7056. "expectedSnapshotEvents": [
  7057. {
  7058. "added": [
  7059. {
  7060. "key": "collection/c",
  7061. "options": {
  7062. "hasCommittedMutations": false,
  7063. "hasLocalMutations": false
  7064. },
  7065. "value": {
  7066. "val": 13
  7067. },
  7068. "version": 1000
  7069. },
  7070. {
  7071. "key": "collection/b",
  7072. "options": {
  7073. "hasCommittedMutations": false,
  7074. "hasLocalMutations": false
  7075. },
  7076. "value": {
  7077. "val": 12
  7078. },
  7079. "version": 1000
  7080. },
  7081. {
  7082. "key": "collection/a",
  7083. "options": {
  7084. "hasCommittedMutations": false,
  7085. "hasLocalMutations": false
  7086. },
  7087. "value": {
  7088. "val": 11
  7089. },
  7090. "version": 1000
  7091. }
  7092. ],
  7093. "errorCode": 0,
  7094. "fromCache": false,
  7095. "hasPendingWrites": false,
  7096. "query": {
  7097. "filters": [
  7098. ],
  7099. "limit": 3,
  7100. "limitType": "LimitToLast",
  7101. "orderBys": [
  7102. [
  7103. "val",
  7104. "desc"
  7105. ]
  7106. ],
  7107. "path": "collection"
  7108. }
  7109. }
  7110. ]
  7111. },
  7112. {
  7113. "clientIndex": 0,
  7114. "drainQueue": true
  7115. },
  7116. {
  7117. "clientIndex": 0,
  7118. "watchReset": [
  7119. ]
  7120. },
  7121. {
  7122. "clientIndex": 0,
  7123. "watchEntity": {
  7124. "docs": [
  7125. {
  7126. "key": "collection/a",
  7127. "options": {
  7128. "hasCommittedMutations": false,
  7129. "hasLocalMutations": false
  7130. },
  7131. "value": {
  7132. "val": 11
  7133. },
  7134. "version": 2000
  7135. },
  7136. {
  7137. "key": "collection/b",
  7138. "options": {
  7139. "hasCommittedMutations": false,
  7140. "hasLocalMutations": false
  7141. },
  7142. "value": {
  7143. "val": 12
  7144. },
  7145. "version": 2000
  7146. },
  7147. {
  7148. "key": "collection/d",
  7149. "options": {
  7150. "hasCommittedMutations": false,
  7151. "hasLocalMutations": false
  7152. },
  7153. "value": {
  7154. "val": 100
  7155. },
  7156. "version": 2000
  7157. }
  7158. ],
  7159. "targets": [
  7160. 2
  7161. ]
  7162. }
  7163. },
  7164. {
  7165. "clientIndex": 0,
  7166. "watchCurrent": [
  7167. [
  7168. 2
  7169. ],
  7170. "resume-token-2000"
  7171. ]
  7172. },
  7173. {
  7174. "clientIndex": 0,
  7175. "watchSnapshot": {
  7176. "targetIds": [
  7177. ],
  7178. "version": 2000
  7179. },
  7180. "expectedState": {
  7181. "activeLimboDocs": [
  7182. "collection/c"
  7183. ],
  7184. "activeTargets": {
  7185. "1": {
  7186. "queries": [
  7187. {
  7188. "filters": [
  7189. ],
  7190. "orderBys": [
  7191. ],
  7192. "path": "collection/c"
  7193. }
  7194. ],
  7195. "resumeToken": ""
  7196. },
  7197. "2": {
  7198. "queries": [
  7199. {
  7200. "filters": [
  7201. ],
  7202. "limit": 3,
  7203. "limitType": "LimitToLast",
  7204. "orderBys": [
  7205. [
  7206. "val",
  7207. "desc"
  7208. ]
  7209. ],
  7210. "path": "collection"
  7211. }
  7212. ],
  7213. "resumeToken": ""
  7214. }
  7215. }
  7216. }
  7217. },
  7218. {
  7219. "clientIndex": 1,
  7220. "drainQueue": true,
  7221. "expectedSnapshotEvents": [
  7222. {
  7223. "errorCode": 0,
  7224. "fromCache": true,
  7225. "hasPendingWrites": false,
  7226. "query": {
  7227. "filters": [
  7228. ],
  7229. "limit": 3,
  7230. "limitType": "LimitToLast",
  7231. "orderBys": [
  7232. [
  7233. "val",
  7234. "desc"
  7235. ]
  7236. ],
  7237. "path": "collection"
  7238. }
  7239. }
  7240. ]
  7241. }
  7242. ]
  7243. },
  7244. "LimitToLast query from secondary results in no expected limbo doc": {
  7245. "describeName": "Limbo Documents:",
  7246. "itName": "LimitToLast query from secondary results in no expected limbo doc",
  7247. "tags": [
  7248. "multi-client"
  7249. ],
  7250. "config": {
  7251. "numClients": 2,
  7252. "useGarbageCollection": false
  7253. },
  7254. "steps": [
  7255. {
  7256. "clientIndex": 0,
  7257. "drainQueue": true
  7258. },
  7259. {
  7260. "applyClientState": {
  7261. "visibility": "visible"
  7262. },
  7263. "clientIndex": 0
  7264. },
  7265. {
  7266. "clientIndex": 1,
  7267. "drainQueue": true
  7268. },
  7269. {
  7270. "clientIndex": 1,
  7271. "userListen": {
  7272. "query": {
  7273. "filters": [
  7274. ],
  7275. "limit": 3,
  7276. "limitType": "LimitToLast",
  7277. "orderBys": [
  7278. [
  7279. "val",
  7280. "desc"
  7281. ]
  7282. ],
  7283. "path": "collection"
  7284. },
  7285. "targetId": 2
  7286. },
  7287. "expectedState": {
  7288. "activeTargets": {
  7289. "2": {
  7290. "queries": [
  7291. {
  7292. "filters": [
  7293. ],
  7294. "limit": 3,
  7295. "limitType": "LimitToLast",
  7296. "orderBys": [
  7297. [
  7298. "val",
  7299. "desc"
  7300. ]
  7301. ],
  7302. "path": "collection"
  7303. }
  7304. ],
  7305. "resumeToken": ""
  7306. }
  7307. }
  7308. }
  7309. },
  7310. {
  7311. "clientIndex": 0,
  7312. "drainQueue": true,
  7313. "expectedState": {
  7314. "activeTargets": {
  7315. "2": {
  7316. "queries": [
  7317. {
  7318. "filters": [
  7319. ],
  7320. "limit": 3,
  7321. "limitType": "LimitToLast",
  7322. "orderBys": [
  7323. [
  7324. "val",
  7325. "desc"
  7326. ]
  7327. ],
  7328. "path": "collection"
  7329. }
  7330. ],
  7331. "resumeToken": ""
  7332. }
  7333. }
  7334. }
  7335. },
  7336. {
  7337. "clientIndex": 0,
  7338. "watchAck": [
  7339. 2
  7340. ]
  7341. },
  7342. {
  7343. "clientIndex": 0,
  7344. "watchEntity": {
  7345. "docs": [
  7346. {
  7347. "key": "collection/a",
  7348. "options": {
  7349. "hasCommittedMutations": false,
  7350. "hasLocalMutations": false
  7351. },
  7352. "value": {
  7353. "val": 11
  7354. },
  7355. "version": 1000
  7356. },
  7357. {
  7358. "key": "collection/b",
  7359. "options": {
  7360. "hasCommittedMutations": false,
  7361. "hasLocalMutations": false
  7362. },
  7363. "value": {
  7364. "val": 12
  7365. },
  7366. "version": 1000
  7367. },
  7368. {
  7369. "key": "collection/c",
  7370. "options": {
  7371. "hasCommittedMutations": false,
  7372. "hasLocalMutations": false
  7373. },
  7374. "value": {
  7375. "val": 13
  7376. },
  7377. "version": 1000
  7378. }
  7379. ],
  7380. "targets": [
  7381. 2
  7382. ]
  7383. }
  7384. },
  7385. {
  7386. "clientIndex": 0,
  7387. "watchCurrent": [
  7388. [
  7389. 2
  7390. ],
  7391. "resume-token-1000"
  7392. ]
  7393. },
  7394. {
  7395. "clientIndex": 0,
  7396. "watchSnapshot": {
  7397. "targetIds": [
  7398. ],
  7399. "version": 1000
  7400. }
  7401. },
  7402. {
  7403. "clientIndex": 1,
  7404. "drainQueue": true,
  7405. "expectedSnapshotEvents": [
  7406. {
  7407. "added": [
  7408. {
  7409. "key": "collection/c",
  7410. "options": {
  7411. "hasCommittedMutations": false,
  7412. "hasLocalMutations": false
  7413. },
  7414. "value": {
  7415. "val": 13
  7416. },
  7417. "version": 1000
  7418. },
  7419. {
  7420. "key": "collection/b",
  7421. "options": {
  7422. "hasCommittedMutations": false,
  7423. "hasLocalMutations": false
  7424. },
  7425. "value": {
  7426. "val": 12
  7427. },
  7428. "version": 1000
  7429. },
  7430. {
  7431. "key": "collection/a",
  7432. "options": {
  7433. "hasCommittedMutations": false,
  7434. "hasLocalMutations": false
  7435. },
  7436. "value": {
  7437. "val": 11
  7438. },
  7439. "version": 1000
  7440. }
  7441. ],
  7442. "errorCode": 0,
  7443. "fromCache": false,
  7444. "hasPendingWrites": false,
  7445. "query": {
  7446. "filters": [
  7447. ],
  7448. "limit": 3,
  7449. "limitType": "LimitToLast",
  7450. "orderBys": [
  7451. [
  7452. "val",
  7453. "desc"
  7454. ]
  7455. ],
  7456. "path": "collection"
  7457. }
  7458. }
  7459. ]
  7460. },
  7461. {
  7462. "clientIndex": 0,
  7463. "drainQueue": true
  7464. },
  7465. {
  7466. "clientIndex": 0,
  7467. "watchReset": [
  7468. ]
  7469. },
  7470. {
  7471. "clientIndex": 0,
  7472. "watchEntity": {
  7473. "docs": [
  7474. {
  7475. "key": "collection/a",
  7476. "options": {
  7477. "hasCommittedMutations": false,
  7478. "hasLocalMutations": false
  7479. },
  7480. "value": {
  7481. "val": 5
  7482. },
  7483. "version": 2000
  7484. },
  7485. {
  7486. "key": "collection/b",
  7487. "options": {
  7488. "hasCommittedMutations": false,
  7489. "hasLocalMutations": false
  7490. },
  7491. "value": {
  7492. "val": 6
  7493. },
  7494. "version": 2000
  7495. },
  7496. {
  7497. "key": "collection/d",
  7498. "options": {
  7499. "hasCommittedMutations": false,
  7500. "hasLocalMutations": false
  7501. },
  7502. "value": {
  7503. "val": 7
  7504. },
  7505. "version": 2000
  7506. }
  7507. ],
  7508. "targets": [
  7509. 2
  7510. ]
  7511. }
  7512. },
  7513. {
  7514. "clientIndex": 0,
  7515. "watchCurrent": [
  7516. [
  7517. 2
  7518. ],
  7519. "resume-token-2000"
  7520. ]
  7521. },
  7522. {
  7523. "clientIndex": 0,
  7524. "watchSnapshot": {
  7525. "targetIds": [
  7526. ],
  7527. "version": 2000
  7528. }
  7529. },
  7530. {
  7531. "clientIndex": 1,
  7532. "drainQueue": true,
  7533. "expectedSnapshotEvents": [
  7534. {
  7535. "added": [
  7536. {
  7537. "key": "collection/d",
  7538. "options": {
  7539. "hasCommittedMutations": false,
  7540. "hasLocalMutations": false
  7541. },
  7542. "value": {
  7543. "val": 7
  7544. },
  7545. "version": 2000
  7546. }
  7547. ],
  7548. "errorCode": 0,
  7549. "fromCache": false,
  7550. "hasPendingWrites": false,
  7551. "modified": [
  7552. {
  7553. "key": "collection/b",
  7554. "options": {
  7555. "hasCommittedMutations": false,
  7556. "hasLocalMutations": false
  7557. },
  7558. "value": {
  7559. "val": 6
  7560. },
  7561. "version": 2000
  7562. },
  7563. {
  7564. "key": "collection/a",
  7565. "options": {
  7566. "hasCommittedMutations": false,
  7567. "hasLocalMutations": false
  7568. },
  7569. "value": {
  7570. "val": 5
  7571. },
  7572. "version": 2000
  7573. }
  7574. ],
  7575. "query": {
  7576. "filters": [
  7577. ],
  7578. "limit": 3,
  7579. "limitType": "LimitToLast",
  7580. "orderBys": [
  7581. [
  7582. "val",
  7583. "desc"
  7584. ]
  7585. ],
  7586. "path": "collection"
  7587. },
  7588. "removed": [
  7589. {
  7590. "key": "collection/c",
  7591. "options": {
  7592. "hasCommittedMutations": false,
  7593. "hasLocalMutations": false
  7594. },
  7595. "value": {
  7596. "val": 13
  7597. },
  7598. "version": 1000
  7599. }
  7600. ]
  7601. }
  7602. ]
  7603. },
  7604. {
  7605. "clientIndex": 0,
  7606. "drainQueue": true,
  7607. "expectedState": {
  7608. "activeLimboDocs": [
  7609. ],
  7610. "activeTargets": {
  7611. "2": {
  7612. "queries": [
  7613. {
  7614. "filters": [
  7615. ],
  7616. "limit": 3,
  7617. "limitType": "LimitToLast",
  7618. "orderBys": [
  7619. [
  7620. "val",
  7621. "desc"
  7622. ]
  7623. ],
  7624. "path": "collection"
  7625. }
  7626. ],
  7627. "resumeToken": ""
  7628. }
  7629. }
  7630. }
  7631. }
  7632. ]
  7633. }
  7634. }