limbo_spec_test.json 242 KB

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