limit_spec_test.json 137 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086
  1. {
  2. "Deleted Document in limbo in full limit query": {
  3. "describeName": "Limits:",
  4. "itName": "Deleted Document in limbo in full limit query",
  5. "tags": [
  6. ],
  7. "config": {
  8. "numClients": 1,
  9. "useGarbageCollection": true
  10. },
  11. "steps": [
  12. {
  13. "userListen": {
  14. "query": {
  15. "filters": [
  16. ],
  17. "limit": 2,
  18. "limitType": "LimitToFirst",
  19. "orderBys": [
  20. ],
  21. "path": "collection"
  22. },
  23. "targetId": 2
  24. },
  25. "expectedState": {
  26. "activeTargets": {
  27. "2": {
  28. "queries": [
  29. {
  30. "filters": [
  31. ],
  32. "limit": 2,
  33. "limitType": "LimitToFirst",
  34. "orderBys": [
  35. ],
  36. "path": "collection"
  37. }
  38. ],
  39. "resumeToken": ""
  40. }
  41. }
  42. }
  43. },
  44. {
  45. "watchAck": [
  46. 2
  47. ]
  48. },
  49. {
  50. "watchEntity": {
  51. "docs": [
  52. {
  53. "key": "collection/a",
  54. "options": {
  55. "hasCommittedMutations": false,
  56. "hasLocalMutations": false
  57. },
  58. "value": {
  59. "key": "a"
  60. },
  61. "version": 1000
  62. },
  63. {
  64. "key": "collection/b",
  65. "options": {
  66. "hasCommittedMutations": false,
  67. "hasLocalMutations": false
  68. },
  69. "value": {
  70. "key": "b"
  71. },
  72. "version": 1001
  73. }
  74. ],
  75. "targets": [
  76. 2
  77. ]
  78. }
  79. },
  80. {
  81. "watchCurrent": [
  82. [
  83. 2
  84. ],
  85. "resume-token-1002"
  86. ]
  87. },
  88. {
  89. "watchSnapshot": {
  90. "targetIds": [
  91. ],
  92. "version": 1002
  93. },
  94. "expectedSnapshotEvents": [
  95. {
  96. "added": [
  97. {
  98. "key": "collection/a",
  99. "options": {
  100. "hasCommittedMutations": false,
  101. "hasLocalMutations": false
  102. },
  103. "value": {
  104. "key": "a"
  105. },
  106. "version": 1000
  107. },
  108. {
  109. "key": "collection/b",
  110. "options": {
  111. "hasCommittedMutations": false,
  112. "hasLocalMutations": false
  113. },
  114. "value": {
  115. "key": "b"
  116. },
  117. "version": 1001
  118. }
  119. ],
  120. "errorCode": 0,
  121. "fromCache": false,
  122. "hasPendingWrites": false,
  123. "query": {
  124. "filters": [
  125. ],
  126. "limit": 2,
  127. "limitType": "LimitToFirst",
  128. "orderBys": [
  129. ],
  130. "path": "collection"
  131. }
  132. }
  133. ]
  134. },
  135. {
  136. "watchReset": [
  137. 2
  138. ]
  139. },
  140. {
  141. "watchEntity": {
  142. "docs": [
  143. {
  144. "key": "collection/b",
  145. "options": {
  146. "hasCommittedMutations": false,
  147. "hasLocalMutations": false
  148. },
  149. "value": {
  150. "key": "b"
  151. },
  152. "version": 1001
  153. },
  154. {
  155. "key": "collection/c",
  156. "options": {
  157. "hasCommittedMutations": false,
  158. "hasLocalMutations": false
  159. },
  160. "value": {
  161. "key": "c"
  162. },
  163. "version": 1002
  164. }
  165. ],
  166. "targets": [
  167. 2
  168. ]
  169. }
  170. },
  171. {
  172. "watchCurrent": [
  173. [
  174. 2
  175. ],
  176. "resume-token-2000"
  177. ]
  178. },
  179. {
  180. "watchSnapshot": {
  181. "targetIds": [
  182. ],
  183. "version": 2000
  184. },
  185. "expectedSnapshotEvents": [
  186. {
  187. "errorCode": 0,
  188. "fromCache": true,
  189. "hasPendingWrites": false,
  190. "query": {
  191. "filters": [
  192. ],
  193. "limit": 2,
  194. "limitType": "LimitToFirst",
  195. "orderBys": [
  196. ],
  197. "path": "collection"
  198. }
  199. }
  200. ],
  201. "expectedState": {
  202. "activeLimboDocs": [
  203. "collection/a"
  204. ],
  205. "activeTargets": {
  206. "1": {
  207. "queries": [
  208. {
  209. "filters": [
  210. ],
  211. "orderBys": [
  212. ],
  213. "path": "collection/a"
  214. }
  215. ],
  216. "resumeToken": ""
  217. },
  218. "2": {
  219. "queries": [
  220. {
  221. "filters": [
  222. ],
  223. "limit": 2,
  224. "limitType": "LimitToFirst",
  225. "orderBys": [
  226. ],
  227. "path": "collection"
  228. }
  229. ],
  230. "resumeToken": ""
  231. }
  232. }
  233. }
  234. },
  235. {
  236. "watchAck": [
  237. 1
  238. ]
  239. },
  240. {
  241. "watchCurrent": [
  242. [
  243. 1
  244. ],
  245. "resume-token-2000"
  246. ]
  247. },
  248. {
  249. "watchSnapshot": {
  250. "targetIds": [
  251. ],
  252. "version": 2000
  253. },
  254. "expectedSnapshotEvents": [
  255. {
  256. "added": [
  257. {
  258. "key": "collection/c",
  259. "options": {
  260. "hasCommittedMutations": false,
  261. "hasLocalMutations": false
  262. },
  263. "value": {
  264. "key": "c"
  265. },
  266. "version": 1002
  267. }
  268. ],
  269. "errorCode": 0,
  270. "fromCache": false,
  271. "hasPendingWrites": false,
  272. "query": {
  273. "filters": [
  274. ],
  275. "limit": 2,
  276. "limitType": "LimitToFirst",
  277. "orderBys": [
  278. ],
  279. "path": "collection"
  280. },
  281. "removed": [
  282. {
  283. "key": "collection/a",
  284. "options": {
  285. "hasCommittedMutations": false,
  286. "hasLocalMutations": false
  287. },
  288. "value": {
  289. "key": "a"
  290. },
  291. "version": 1000
  292. }
  293. ]
  294. }
  295. ],
  296. "expectedState": {
  297. "activeLimboDocs": [
  298. ],
  299. "activeTargets": {
  300. "2": {
  301. "queries": [
  302. {
  303. "filters": [
  304. ],
  305. "limit": 2,
  306. "limitType": "LimitToFirst",
  307. "orderBys": [
  308. ],
  309. "path": "collection"
  310. }
  311. ],
  312. "resumeToken": ""
  313. }
  314. }
  315. }
  316. }
  317. ]
  318. },
  319. "Documents in limit are can handle removed messages for only one of many query": {
  320. "describeName": "Limits:",
  321. "itName": "Documents in limit are can handle removed messages for only one of many query",
  322. "tags": [
  323. ],
  324. "config": {
  325. "numClients": 1,
  326. "useGarbageCollection": true
  327. },
  328. "steps": [
  329. {
  330. "userListen": {
  331. "query": {
  332. "filters": [
  333. ],
  334. "limit": 2,
  335. "limitType": "LimitToFirst",
  336. "orderBys": [
  337. ],
  338. "path": "collection"
  339. },
  340. "targetId": 2
  341. },
  342. "expectedState": {
  343. "activeTargets": {
  344. "2": {
  345. "queries": [
  346. {
  347. "filters": [
  348. ],
  349. "limit": 2,
  350. "limitType": "LimitToFirst",
  351. "orderBys": [
  352. ],
  353. "path": "collection"
  354. }
  355. ],
  356. "resumeToken": ""
  357. }
  358. }
  359. }
  360. },
  361. {
  362. "userListen": {
  363. "query": {
  364. "filters": [
  365. ],
  366. "limit": 3,
  367. "limitType": "LimitToFirst",
  368. "orderBys": [
  369. ],
  370. "path": "collection"
  371. },
  372. "targetId": 4
  373. },
  374. "expectedState": {
  375. "activeTargets": {
  376. "2": {
  377. "queries": [
  378. {
  379. "filters": [
  380. ],
  381. "limit": 2,
  382. "limitType": "LimitToFirst",
  383. "orderBys": [
  384. ],
  385. "path": "collection"
  386. }
  387. ],
  388. "resumeToken": ""
  389. },
  390. "4": {
  391. "queries": [
  392. {
  393. "filters": [
  394. ],
  395. "limit": 3,
  396. "limitType": "LimitToFirst",
  397. "orderBys": [
  398. ],
  399. "path": "collection"
  400. }
  401. ],
  402. "resumeToken": ""
  403. }
  404. }
  405. }
  406. },
  407. {
  408. "watchAck": [
  409. 2
  410. ]
  411. },
  412. {
  413. "watchAck": [
  414. 4
  415. ]
  416. },
  417. {
  418. "watchEntity": {
  419. "docs": [
  420. {
  421. "key": "collection/a",
  422. "options": {
  423. "hasCommittedMutations": false,
  424. "hasLocalMutations": false
  425. },
  426. "value": {
  427. "key": "a"
  428. },
  429. "version": 1000
  430. },
  431. {
  432. "key": "collection/c",
  433. "options": {
  434. "hasCommittedMutations": false,
  435. "hasLocalMutations": false
  436. },
  437. "value": {
  438. "key": "c"
  439. },
  440. "version": 1001
  441. }
  442. ],
  443. "targets": [
  444. 2
  445. ]
  446. }
  447. },
  448. {
  449. "watchEntity": {
  450. "docs": [
  451. {
  452. "key": "collection/a",
  453. "options": {
  454. "hasCommittedMutations": false,
  455. "hasLocalMutations": false
  456. },
  457. "value": {
  458. "key": "a"
  459. },
  460. "version": 1000
  461. },
  462. {
  463. "key": "collection/c",
  464. "options": {
  465. "hasCommittedMutations": false,
  466. "hasLocalMutations": false
  467. },
  468. "value": {
  469. "key": "c"
  470. },
  471. "version": 1001
  472. }
  473. ],
  474. "targets": [
  475. 4
  476. ]
  477. }
  478. },
  479. {
  480. "watchCurrent": [
  481. [
  482. 2
  483. ],
  484. "resume-token-1001"
  485. ]
  486. },
  487. {
  488. "watchCurrent": [
  489. [
  490. 4
  491. ],
  492. "resume-token-1001"
  493. ]
  494. },
  495. {
  496. "watchSnapshot": {
  497. "targetIds": [
  498. ],
  499. "version": 1001
  500. },
  501. "expectedSnapshotEvents": [
  502. {
  503. "added": [
  504. {
  505. "key": "collection/a",
  506. "options": {
  507. "hasCommittedMutations": false,
  508. "hasLocalMutations": false
  509. },
  510. "value": {
  511. "key": "a"
  512. },
  513. "version": 1000
  514. },
  515. {
  516. "key": "collection/c",
  517. "options": {
  518. "hasCommittedMutations": false,
  519. "hasLocalMutations": false
  520. },
  521. "value": {
  522. "key": "c"
  523. },
  524. "version": 1001
  525. }
  526. ],
  527. "errorCode": 0,
  528. "fromCache": false,
  529. "hasPendingWrites": false,
  530. "query": {
  531. "filters": [
  532. ],
  533. "limit": 2,
  534. "limitType": "LimitToFirst",
  535. "orderBys": [
  536. ],
  537. "path": "collection"
  538. }
  539. },
  540. {
  541. "added": [
  542. {
  543. "key": "collection/a",
  544. "options": {
  545. "hasCommittedMutations": false,
  546. "hasLocalMutations": false
  547. },
  548. "value": {
  549. "key": "a"
  550. },
  551. "version": 1000
  552. },
  553. {
  554. "key": "collection/c",
  555. "options": {
  556. "hasCommittedMutations": false,
  557. "hasLocalMutations": false
  558. },
  559. "value": {
  560. "key": "c"
  561. },
  562. "version": 1001
  563. }
  564. ],
  565. "errorCode": 0,
  566. "fromCache": false,
  567. "hasPendingWrites": false,
  568. "query": {
  569. "filters": [
  570. ],
  571. "limit": 3,
  572. "limitType": "LimitToFirst",
  573. "orderBys": [
  574. ],
  575. "path": "collection"
  576. }
  577. }
  578. ]
  579. },
  580. {
  581. "watchEntity": {
  582. "docs": [
  583. {
  584. "key": "collection/b",
  585. "options": {
  586. "hasCommittedMutations": false,
  587. "hasLocalMutations": false
  588. },
  589. "value": {
  590. "key": "b"
  591. },
  592. "version": 1002
  593. }
  594. ],
  595. "targets": [
  596. 2,
  597. 4
  598. ]
  599. }
  600. },
  601. {
  602. "watchEntity": {
  603. "key": "collection/c",
  604. "removedTargets": [
  605. 2
  606. ]
  607. }
  608. },
  609. {
  610. "watchSnapshot": {
  611. "targetIds": [
  612. ],
  613. "version": 1002
  614. },
  615. "expectedSnapshotEvents": [
  616. {
  617. "added": [
  618. {
  619. "key": "collection/b",
  620. "options": {
  621. "hasCommittedMutations": false,
  622. "hasLocalMutations": false
  623. },
  624. "value": {
  625. "key": "b"
  626. },
  627. "version": 1002
  628. }
  629. ],
  630. "errorCode": 0,
  631. "fromCache": false,
  632. "hasPendingWrites": false,
  633. "query": {
  634. "filters": [
  635. ],
  636. "limit": 2,
  637. "limitType": "LimitToFirst",
  638. "orderBys": [
  639. ],
  640. "path": "collection"
  641. },
  642. "removed": [
  643. {
  644. "key": "collection/c",
  645. "options": {
  646. "hasCommittedMutations": false,
  647. "hasLocalMutations": false
  648. },
  649. "value": {
  650. "key": "c"
  651. },
  652. "version": 1001
  653. }
  654. ]
  655. },
  656. {
  657. "added": [
  658. {
  659. "key": "collection/b",
  660. "options": {
  661. "hasCommittedMutations": false,
  662. "hasLocalMutations": false
  663. },
  664. "value": {
  665. "key": "b"
  666. },
  667. "version": 1002
  668. }
  669. ],
  670. "errorCode": 0,
  671. "fromCache": false,
  672. "hasPendingWrites": false,
  673. "query": {
  674. "filters": [
  675. ],
  676. "limit": 3,
  677. "limitType": "LimitToFirst",
  678. "orderBys": [
  679. ],
  680. "path": "collection"
  681. }
  682. }
  683. ],
  684. "expectedState": {
  685. "activeLimboDocs": [
  686. ],
  687. "activeTargets": {
  688. "2": {
  689. "queries": [
  690. {
  691. "filters": [
  692. ],
  693. "limit": 2,
  694. "limitType": "LimitToFirst",
  695. "orderBys": [
  696. ],
  697. "path": "collection"
  698. }
  699. ],
  700. "resumeToken": ""
  701. },
  702. "4": {
  703. "queries": [
  704. {
  705. "filters": [
  706. ],
  707. "limit": 3,
  708. "limitType": "LimitToFirst",
  709. "orderBys": [
  710. ],
  711. "path": "collection"
  712. }
  713. ],
  714. "resumeToken": ""
  715. }
  716. }
  717. }
  718. }
  719. ]
  720. },
  721. "Documents in limit are replaced by remote event": {
  722. "describeName": "Limits:",
  723. "itName": "Documents in limit are replaced by remote event",
  724. "tags": [
  725. ],
  726. "config": {
  727. "numClients": 1,
  728. "useGarbageCollection": true
  729. },
  730. "steps": [
  731. {
  732. "userListen": {
  733. "query": {
  734. "filters": [
  735. ],
  736. "limit": 2,
  737. "limitType": "LimitToFirst",
  738. "orderBys": [
  739. ],
  740. "path": "collection"
  741. },
  742. "targetId": 2
  743. },
  744. "expectedState": {
  745. "activeTargets": {
  746. "2": {
  747. "queries": [
  748. {
  749. "filters": [
  750. ],
  751. "limit": 2,
  752. "limitType": "LimitToFirst",
  753. "orderBys": [
  754. ],
  755. "path": "collection"
  756. }
  757. ],
  758. "resumeToken": ""
  759. }
  760. }
  761. }
  762. },
  763. {
  764. "watchAck": [
  765. 2
  766. ]
  767. },
  768. {
  769. "watchEntity": {
  770. "docs": [
  771. {
  772. "key": "collection/a",
  773. "options": {
  774. "hasCommittedMutations": false,
  775. "hasLocalMutations": false
  776. },
  777. "value": {
  778. "key": "a"
  779. },
  780. "version": 1000
  781. },
  782. {
  783. "key": "collection/c",
  784. "options": {
  785. "hasCommittedMutations": false,
  786. "hasLocalMutations": false
  787. },
  788. "value": {
  789. "key": "c"
  790. },
  791. "version": 1001
  792. }
  793. ],
  794. "targets": [
  795. 2
  796. ]
  797. }
  798. },
  799. {
  800. "watchCurrent": [
  801. [
  802. 2
  803. ],
  804. "resume-token-1001"
  805. ]
  806. },
  807. {
  808. "watchSnapshot": {
  809. "targetIds": [
  810. ],
  811. "version": 1001
  812. },
  813. "expectedSnapshotEvents": [
  814. {
  815. "added": [
  816. {
  817. "key": "collection/a",
  818. "options": {
  819. "hasCommittedMutations": false,
  820. "hasLocalMutations": false
  821. },
  822. "value": {
  823. "key": "a"
  824. },
  825. "version": 1000
  826. },
  827. {
  828. "key": "collection/c",
  829. "options": {
  830. "hasCommittedMutations": false,
  831. "hasLocalMutations": false
  832. },
  833. "value": {
  834. "key": "c"
  835. },
  836. "version": 1001
  837. }
  838. ],
  839. "errorCode": 0,
  840. "fromCache": false,
  841. "hasPendingWrites": false,
  842. "query": {
  843. "filters": [
  844. ],
  845. "limit": 2,
  846. "limitType": "LimitToFirst",
  847. "orderBys": [
  848. ],
  849. "path": "collection"
  850. }
  851. }
  852. ]
  853. },
  854. {
  855. "watchEntity": {
  856. "docs": [
  857. {
  858. "key": "collection/b",
  859. "options": {
  860. "hasCommittedMutations": false,
  861. "hasLocalMutations": false
  862. },
  863. "value": {
  864. "key": "b"
  865. },
  866. "version": 1002
  867. }
  868. ],
  869. "targets": [
  870. 2
  871. ]
  872. }
  873. },
  874. {
  875. "watchEntity": {
  876. "docs": [
  877. {
  878. "key": "collection/c",
  879. "options": {
  880. "hasCommittedMutations": false,
  881. "hasLocalMutations": false
  882. },
  883. "value": {
  884. "key": "c"
  885. },
  886. "version": 1001
  887. }
  888. ],
  889. "removedTargets": [
  890. 2
  891. ]
  892. }
  893. },
  894. {
  895. "watchSnapshot": {
  896. "targetIds": [
  897. ],
  898. "version": 1002
  899. },
  900. "expectedSnapshotEvents": [
  901. {
  902. "added": [
  903. {
  904. "key": "collection/b",
  905. "options": {
  906. "hasCommittedMutations": false,
  907. "hasLocalMutations": false
  908. },
  909. "value": {
  910. "key": "b"
  911. },
  912. "version": 1002
  913. }
  914. ],
  915. "errorCode": 0,
  916. "fromCache": false,
  917. "hasPendingWrites": false,
  918. "query": {
  919. "filters": [
  920. ],
  921. "limit": 2,
  922. "limitType": "LimitToFirst",
  923. "orderBys": [
  924. ],
  925. "path": "collection"
  926. },
  927. "removed": [
  928. {
  929. "key": "collection/c",
  930. "options": {
  931. "hasCommittedMutations": false,
  932. "hasLocalMutations": false
  933. },
  934. "value": {
  935. "key": "c"
  936. },
  937. "version": 1001
  938. }
  939. ]
  940. }
  941. ]
  942. }
  943. ]
  944. },
  945. "Documents in limit can handle removed messages": {
  946. "describeName": "Limits:",
  947. "itName": "Documents in limit can handle removed messages",
  948. "tags": [
  949. ],
  950. "config": {
  951. "numClients": 1,
  952. "useGarbageCollection": true
  953. },
  954. "steps": [
  955. {
  956. "userListen": {
  957. "query": {
  958. "filters": [
  959. ],
  960. "limit": 2,
  961. "limitType": "LimitToFirst",
  962. "orderBys": [
  963. ],
  964. "path": "collection"
  965. },
  966. "targetId": 2
  967. },
  968. "expectedState": {
  969. "activeTargets": {
  970. "2": {
  971. "queries": [
  972. {
  973. "filters": [
  974. ],
  975. "limit": 2,
  976. "limitType": "LimitToFirst",
  977. "orderBys": [
  978. ],
  979. "path": "collection"
  980. }
  981. ],
  982. "resumeToken": ""
  983. }
  984. }
  985. }
  986. },
  987. {
  988. "watchAck": [
  989. 2
  990. ]
  991. },
  992. {
  993. "watchEntity": {
  994. "docs": [
  995. {
  996. "key": "collection/a",
  997. "options": {
  998. "hasCommittedMutations": false,
  999. "hasLocalMutations": false
  1000. },
  1001. "value": {
  1002. "key": "a"
  1003. },
  1004. "version": 1000
  1005. },
  1006. {
  1007. "key": "collection/c",
  1008. "options": {
  1009. "hasCommittedMutations": false,
  1010. "hasLocalMutations": false
  1011. },
  1012. "value": {
  1013. "key": "c"
  1014. },
  1015. "version": 1001
  1016. }
  1017. ],
  1018. "targets": [
  1019. 2
  1020. ]
  1021. }
  1022. },
  1023. {
  1024. "watchCurrent": [
  1025. [
  1026. 2
  1027. ],
  1028. "resume-token-1001"
  1029. ]
  1030. },
  1031. {
  1032. "watchSnapshot": {
  1033. "targetIds": [
  1034. ],
  1035. "version": 1001
  1036. },
  1037. "expectedSnapshotEvents": [
  1038. {
  1039. "added": [
  1040. {
  1041. "key": "collection/a",
  1042. "options": {
  1043. "hasCommittedMutations": false,
  1044. "hasLocalMutations": false
  1045. },
  1046. "value": {
  1047. "key": "a"
  1048. },
  1049. "version": 1000
  1050. },
  1051. {
  1052. "key": "collection/c",
  1053. "options": {
  1054. "hasCommittedMutations": false,
  1055. "hasLocalMutations": false
  1056. },
  1057. "value": {
  1058. "key": "c"
  1059. },
  1060. "version": 1001
  1061. }
  1062. ],
  1063. "errorCode": 0,
  1064. "fromCache": false,
  1065. "hasPendingWrites": false,
  1066. "query": {
  1067. "filters": [
  1068. ],
  1069. "limit": 2,
  1070. "limitType": "LimitToFirst",
  1071. "orderBys": [
  1072. ],
  1073. "path": "collection"
  1074. }
  1075. }
  1076. ]
  1077. },
  1078. {
  1079. "watchEntity": {
  1080. "docs": [
  1081. {
  1082. "key": "collection/b",
  1083. "options": {
  1084. "hasCommittedMutations": false,
  1085. "hasLocalMutations": false
  1086. },
  1087. "value": {
  1088. "key": "b"
  1089. },
  1090. "version": 1002
  1091. }
  1092. ],
  1093. "targets": [
  1094. 2
  1095. ]
  1096. }
  1097. },
  1098. {
  1099. "watchEntity": {
  1100. "key": "collection/c",
  1101. "removedTargets": [
  1102. 2
  1103. ]
  1104. }
  1105. },
  1106. {
  1107. "watchSnapshot": {
  1108. "targetIds": [
  1109. ],
  1110. "version": 1002
  1111. },
  1112. "expectedSnapshotEvents": [
  1113. {
  1114. "added": [
  1115. {
  1116. "key": "collection/b",
  1117. "options": {
  1118. "hasCommittedMutations": false,
  1119. "hasLocalMutations": false
  1120. },
  1121. "value": {
  1122. "key": "b"
  1123. },
  1124. "version": 1002
  1125. }
  1126. ],
  1127. "errorCode": 0,
  1128. "fromCache": false,
  1129. "hasPendingWrites": false,
  1130. "query": {
  1131. "filters": [
  1132. ],
  1133. "limit": 2,
  1134. "limitType": "LimitToFirst",
  1135. "orderBys": [
  1136. ],
  1137. "path": "collection"
  1138. },
  1139. "removed": [
  1140. {
  1141. "key": "collection/c",
  1142. "options": {
  1143. "hasCommittedMutations": false,
  1144. "hasLocalMutations": false
  1145. },
  1146. "value": {
  1147. "key": "c"
  1148. },
  1149. "version": 1001
  1150. }
  1151. ]
  1152. }
  1153. ],
  1154. "expectedState": {
  1155. "activeLimboDocs": [
  1156. ],
  1157. "activeTargets": {
  1158. "2": {
  1159. "queries": [
  1160. {
  1161. "filters": [
  1162. ],
  1163. "limit": 2,
  1164. "limitType": "LimitToFirst",
  1165. "orderBys": [
  1166. ],
  1167. "path": "collection"
  1168. }
  1169. ],
  1170. "resumeToken": ""
  1171. }
  1172. }
  1173. }
  1174. }
  1175. ]
  1176. },
  1177. "Documents outside of limit don't raise hasPendingWrites": {
  1178. "describeName": "Limits:",
  1179. "itName": "Documents outside of limit don't raise hasPendingWrites",
  1180. "tags": [
  1181. ],
  1182. "config": {
  1183. "numClients": 1,
  1184. "useGarbageCollection": false
  1185. },
  1186. "steps": [
  1187. {
  1188. "userListen": {
  1189. "query": {
  1190. "filters": [
  1191. ],
  1192. "limit": 2,
  1193. "limitType": "LimitToFirst",
  1194. "orderBys": [
  1195. ],
  1196. "path": "collection"
  1197. },
  1198. "targetId": 2
  1199. },
  1200. "expectedState": {
  1201. "activeTargets": {
  1202. "2": {
  1203. "queries": [
  1204. {
  1205. "filters": [
  1206. ],
  1207. "limit": 2,
  1208. "limitType": "LimitToFirst",
  1209. "orderBys": [
  1210. ],
  1211. "path": "collection"
  1212. }
  1213. ],
  1214. "resumeToken": ""
  1215. }
  1216. }
  1217. }
  1218. },
  1219. {
  1220. "watchAck": [
  1221. 2
  1222. ]
  1223. },
  1224. {
  1225. "watchEntity": {
  1226. "docs": [
  1227. {
  1228. "key": "collection/a",
  1229. "options": {
  1230. "hasCommittedMutations": false,
  1231. "hasLocalMutations": false
  1232. },
  1233. "value": {
  1234. "key": "a"
  1235. },
  1236. "version": 1000
  1237. },
  1238. {
  1239. "key": "collection/b",
  1240. "options": {
  1241. "hasCommittedMutations": false,
  1242. "hasLocalMutations": false
  1243. },
  1244. "value": {
  1245. "key": "b"
  1246. },
  1247. "version": 1000
  1248. }
  1249. ],
  1250. "targets": [
  1251. 2
  1252. ]
  1253. }
  1254. },
  1255. {
  1256. "watchCurrent": [
  1257. [
  1258. 2
  1259. ],
  1260. "resume-token-1000"
  1261. ]
  1262. },
  1263. {
  1264. "watchSnapshot": {
  1265. "targetIds": [
  1266. ],
  1267. "version": 1000
  1268. },
  1269. "expectedSnapshotEvents": [
  1270. {
  1271. "added": [
  1272. {
  1273. "key": "collection/a",
  1274. "options": {
  1275. "hasCommittedMutations": false,
  1276. "hasLocalMutations": false
  1277. },
  1278. "value": {
  1279. "key": "a"
  1280. },
  1281. "version": 1000
  1282. },
  1283. {
  1284. "key": "collection/b",
  1285. "options": {
  1286. "hasCommittedMutations": false,
  1287. "hasLocalMutations": false
  1288. },
  1289. "value": {
  1290. "key": "b"
  1291. },
  1292. "version": 1000
  1293. }
  1294. ],
  1295. "errorCode": 0,
  1296. "fromCache": false,
  1297. "hasPendingWrites": false,
  1298. "query": {
  1299. "filters": [
  1300. ],
  1301. "limit": 2,
  1302. "limitType": "LimitToFirst",
  1303. "orderBys": [
  1304. ],
  1305. "path": "collection"
  1306. }
  1307. }
  1308. ]
  1309. },
  1310. {
  1311. "userUnlisten": [
  1312. 2,
  1313. {
  1314. "filters": [
  1315. ],
  1316. "limit": 2,
  1317. "limitType": "LimitToFirst",
  1318. "orderBys": [
  1319. ],
  1320. "path": "collection"
  1321. }
  1322. ],
  1323. "expectedState": {
  1324. "activeTargets": {
  1325. }
  1326. }
  1327. },
  1328. {
  1329. "userSet": [
  1330. "collection/c",
  1331. {
  1332. "key": "c"
  1333. }
  1334. ]
  1335. },
  1336. {
  1337. "userListen": {
  1338. "query": {
  1339. "filters": [
  1340. ],
  1341. "limit": 2,
  1342. "limitType": "LimitToFirst",
  1343. "orderBys": [
  1344. ],
  1345. "path": "collection"
  1346. },
  1347. "targetId": 2
  1348. },
  1349. "expectedSnapshotEvents": [
  1350. {
  1351. "added": [
  1352. {
  1353. "key": "collection/a",
  1354. "options": {
  1355. "hasCommittedMutations": false,
  1356. "hasLocalMutations": false
  1357. },
  1358. "value": {
  1359. "key": "a"
  1360. },
  1361. "version": 1000
  1362. },
  1363. {
  1364. "key": "collection/b",
  1365. "options": {
  1366. "hasCommittedMutations": false,
  1367. "hasLocalMutations": false
  1368. },
  1369. "value": {
  1370. "key": "b"
  1371. },
  1372. "version": 1000
  1373. }
  1374. ],
  1375. "errorCode": 0,
  1376. "fromCache": true,
  1377. "hasPendingWrites": false,
  1378. "query": {
  1379. "filters": [
  1380. ],
  1381. "limit": 2,
  1382. "limitType": "LimitToFirst",
  1383. "orderBys": [
  1384. ],
  1385. "path": "collection"
  1386. }
  1387. }
  1388. ],
  1389. "expectedState": {
  1390. "activeTargets": {
  1391. "2": {
  1392. "queries": [
  1393. {
  1394. "filters": [
  1395. ],
  1396. "limit": 2,
  1397. "limitType": "LimitToFirst",
  1398. "orderBys": [
  1399. ],
  1400. "path": "collection"
  1401. }
  1402. ],
  1403. "resumeToken": "resume-token-1000"
  1404. }
  1405. }
  1406. }
  1407. }
  1408. ]
  1409. },
  1410. "Initial snapshots for limit queries are re-filled from cache (with latency-compensated edit)": {
  1411. "describeName": "Limits:",
  1412. "itName": "Initial snapshots for limit queries are re-filled from cache (with latency-compensated edit)",
  1413. "tags": [
  1414. ],
  1415. "config": {
  1416. "numClients": 1,
  1417. "useGarbageCollection": false
  1418. },
  1419. "steps": [
  1420. {
  1421. "userListen": {
  1422. "query": {
  1423. "filters": [
  1424. ],
  1425. "orderBys": [
  1426. ],
  1427. "path": "collection"
  1428. },
  1429. "targetId": 2
  1430. },
  1431. "expectedState": {
  1432. "activeTargets": {
  1433. "2": {
  1434. "queries": [
  1435. {
  1436. "filters": [
  1437. ],
  1438. "orderBys": [
  1439. ],
  1440. "path": "collection"
  1441. }
  1442. ],
  1443. "resumeToken": ""
  1444. }
  1445. }
  1446. }
  1447. },
  1448. {
  1449. "watchAck": [
  1450. 2
  1451. ]
  1452. },
  1453. {
  1454. "watchEntity": {
  1455. "docs": [
  1456. {
  1457. "key": "collection/a",
  1458. "options": {
  1459. "hasCommittedMutations": false,
  1460. "hasLocalMutations": false
  1461. },
  1462. "value": {
  1463. "pos": 1
  1464. },
  1465. "version": 1001
  1466. },
  1467. {
  1468. "key": "collection/b",
  1469. "options": {
  1470. "hasCommittedMutations": false,
  1471. "hasLocalMutations": false
  1472. },
  1473. "value": {
  1474. "pos": 2
  1475. },
  1476. "version": 1002
  1477. },
  1478. {
  1479. "key": "collection/c",
  1480. "options": {
  1481. "hasCommittedMutations": false,
  1482. "hasLocalMutations": false
  1483. },
  1484. "value": {
  1485. "pos": 3
  1486. },
  1487. "version": 1003
  1488. }
  1489. ],
  1490. "targets": [
  1491. 2
  1492. ]
  1493. }
  1494. },
  1495. {
  1496. "watchCurrent": [
  1497. [
  1498. 2
  1499. ],
  1500. "resume-token-1003"
  1501. ]
  1502. },
  1503. {
  1504. "watchSnapshot": {
  1505. "targetIds": [
  1506. ],
  1507. "version": 1003
  1508. },
  1509. "expectedSnapshotEvents": [
  1510. {
  1511. "added": [
  1512. {
  1513. "key": "collection/a",
  1514. "options": {
  1515. "hasCommittedMutations": false,
  1516. "hasLocalMutations": false
  1517. },
  1518. "value": {
  1519. "pos": 1
  1520. },
  1521. "version": 1001
  1522. },
  1523. {
  1524. "key": "collection/b",
  1525. "options": {
  1526. "hasCommittedMutations": false,
  1527. "hasLocalMutations": false
  1528. },
  1529. "value": {
  1530. "pos": 2
  1531. },
  1532. "version": 1002
  1533. },
  1534. {
  1535. "key": "collection/c",
  1536. "options": {
  1537. "hasCommittedMutations": false,
  1538. "hasLocalMutations": false
  1539. },
  1540. "value": {
  1541. "pos": 3
  1542. },
  1543. "version": 1003
  1544. }
  1545. ],
  1546. "errorCode": 0,
  1547. "fromCache": false,
  1548. "hasPendingWrites": false,
  1549. "query": {
  1550. "filters": [
  1551. ],
  1552. "orderBys": [
  1553. ],
  1554. "path": "collection"
  1555. }
  1556. }
  1557. ]
  1558. },
  1559. {
  1560. "userUnlisten": [
  1561. 2,
  1562. {
  1563. "filters": [
  1564. ],
  1565. "orderBys": [
  1566. ],
  1567. "path": "collection"
  1568. }
  1569. ],
  1570. "expectedState": {
  1571. "activeTargets": {
  1572. }
  1573. }
  1574. },
  1575. {
  1576. "watchRemove": {
  1577. "targetIds": [
  1578. 2
  1579. ]
  1580. }
  1581. },
  1582. {
  1583. "userListen": {
  1584. "query": {
  1585. "filters": [
  1586. ],
  1587. "limit": 2,
  1588. "limitType": "LimitToFirst",
  1589. "orderBys": [
  1590. [
  1591. "pos",
  1592. "asc"
  1593. ]
  1594. ],
  1595. "path": "collection"
  1596. },
  1597. "targetId": 4
  1598. },
  1599. "expectedSnapshotEvents": [
  1600. {
  1601. "added": [
  1602. {
  1603. "key": "collection/a",
  1604. "options": {
  1605. "hasCommittedMutations": false,
  1606. "hasLocalMutations": false
  1607. },
  1608. "value": {
  1609. "pos": 1
  1610. },
  1611. "version": 1001
  1612. },
  1613. {
  1614. "key": "collection/b",
  1615. "options": {
  1616. "hasCommittedMutations": false,
  1617. "hasLocalMutations": false
  1618. },
  1619. "value": {
  1620. "pos": 2
  1621. },
  1622. "version": 1002
  1623. }
  1624. ],
  1625. "errorCode": 0,
  1626. "fromCache": true,
  1627. "hasPendingWrites": false,
  1628. "query": {
  1629. "filters": [
  1630. ],
  1631. "limit": 2,
  1632. "limitType": "LimitToFirst",
  1633. "orderBys": [
  1634. [
  1635. "pos",
  1636. "asc"
  1637. ]
  1638. ],
  1639. "path": "collection"
  1640. }
  1641. }
  1642. ],
  1643. "expectedState": {
  1644. "activeTargets": {
  1645. "4": {
  1646. "queries": [
  1647. {
  1648. "filters": [
  1649. ],
  1650. "limit": 2,
  1651. "limitType": "LimitToFirst",
  1652. "orderBys": [
  1653. [
  1654. "pos",
  1655. "asc"
  1656. ]
  1657. ],
  1658. "path": "collection"
  1659. }
  1660. ],
  1661. "resumeToken": ""
  1662. }
  1663. }
  1664. }
  1665. },
  1666. {
  1667. "watchAck": [
  1668. 4
  1669. ]
  1670. },
  1671. {
  1672. "watchEntity": {
  1673. "docs": [
  1674. {
  1675. "key": "collection/a",
  1676. "options": {
  1677. "hasCommittedMutations": false,
  1678. "hasLocalMutations": false
  1679. },
  1680. "value": {
  1681. "pos": 1
  1682. },
  1683. "version": 1001
  1684. },
  1685. {
  1686. "key": "collection/b",
  1687. "options": {
  1688. "hasCommittedMutations": false,
  1689. "hasLocalMutations": false
  1690. },
  1691. "value": {
  1692. "pos": 2
  1693. },
  1694. "version": 1002
  1695. }
  1696. ],
  1697. "targets": [
  1698. 4
  1699. ]
  1700. }
  1701. },
  1702. {
  1703. "watchCurrent": [
  1704. [
  1705. 4
  1706. ],
  1707. "resume-token-1004"
  1708. ]
  1709. },
  1710. {
  1711. "watchSnapshot": {
  1712. "targetIds": [
  1713. ],
  1714. "version": 1004
  1715. },
  1716. "expectedSnapshotEvents": [
  1717. {
  1718. "errorCode": 0,
  1719. "fromCache": false,
  1720. "hasPendingWrites": false,
  1721. "query": {
  1722. "filters": [
  1723. ],
  1724. "limit": 2,
  1725. "limitType": "LimitToFirst",
  1726. "orderBys": [
  1727. [
  1728. "pos",
  1729. "asc"
  1730. ]
  1731. ],
  1732. "path": "collection"
  1733. }
  1734. }
  1735. ]
  1736. },
  1737. {
  1738. "userUnlisten": [
  1739. 4,
  1740. {
  1741. "filters": [
  1742. ],
  1743. "limit": 2,
  1744. "limitType": "LimitToFirst",
  1745. "orderBys": [
  1746. [
  1747. "pos",
  1748. "asc"
  1749. ]
  1750. ],
  1751. "path": "collection"
  1752. }
  1753. ],
  1754. "expectedState": {
  1755. "activeTargets": {
  1756. }
  1757. }
  1758. },
  1759. {
  1760. "watchRemove": {
  1761. "targetIds": [
  1762. 4
  1763. ]
  1764. }
  1765. },
  1766. {
  1767. "userSet": [
  1768. "collection/a",
  1769. {
  1770. "pos": 4
  1771. }
  1772. ]
  1773. },
  1774. {
  1775. "userListen": {
  1776. "query": {
  1777. "filters": [
  1778. ],
  1779. "limit": 2,
  1780. "limitType": "LimitToFirst",
  1781. "orderBys": [
  1782. [
  1783. "pos",
  1784. "asc"
  1785. ]
  1786. ],
  1787. "path": "collection"
  1788. },
  1789. "targetId": 4
  1790. },
  1791. "expectedSnapshotEvents": [
  1792. {
  1793. "added": [
  1794. {
  1795. "key": "collection/b",
  1796. "options": {
  1797. "hasCommittedMutations": false,
  1798. "hasLocalMutations": false
  1799. },
  1800. "value": {
  1801. "pos": 2
  1802. },
  1803. "version": 1002
  1804. },
  1805. {
  1806. "key": "collection/c",
  1807. "options": {
  1808. "hasCommittedMutations": false,
  1809. "hasLocalMutations": false
  1810. },
  1811. "value": {
  1812. "pos": 3
  1813. },
  1814. "version": 1003
  1815. }
  1816. ],
  1817. "errorCode": 0,
  1818. "fromCache": true,
  1819. "hasPendingWrites": false,
  1820. "query": {
  1821. "filters": [
  1822. ],
  1823. "limit": 2,
  1824. "limitType": "LimitToFirst",
  1825. "orderBys": [
  1826. [
  1827. "pos",
  1828. "asc"
  1829. ]
  1830. ],
  1831. "path": "collection"
  1832. }
  1833. }
  1834. ],
  1835. "expectedState": {
  1836. "activeTargets": {
  1837. "4": {
  1838. "queries": [
  1839. {
  1840. "filters": [
  1841. ],
  1842. "limit": 2,
  1843. "limitType": "LimitToFirst",
  1844. "orderBys": [
  1845. [
  1846. "pos",
  1847. "asc"
  1848. ]
  1849. ],
  1850. "path": "collection"
  1851. }
  1852. ],
  1853. "resumeToken": "resume-token-1004"
  1854. }
  1855. }
  1856. }
  1857. }
  1858. ]
  1859. },
  1860. "Initial snapshots for limit queries are re-filled from cache (with removal)": {
  1861. "describeName": "Limits:",
  1862. "itName": "Initial snapshots for limit queries are re-filled from cache (with removal)",
  1863. "tags": [
  1864. ],
  1865. "config": {
  1866. "numClients": 1,
  1867. "useGarbageCollection": false
  1868. },
  1869. "steps": [
  1870. {
  1871. "userListen": {
  1872. "query": {
  1873. "filters": [
  1874. [
  1875. "matches",
  1876. "==",
  1877. true
  1878. ]
  1879. ],
  1880. "orderBys": [
  1881. ],
  1882. "path": "collection"
  1883. },
  1884. "targetId": 2
  1885. },
  1886. "expectedState": {
  1887. "activeTargets": {
  1888. "2": {
  1889. "queries": [
  1890. {
  1891. "filters": [
  1892. [
  1893. "matches",
  1894. "==",
  1895. true
  1896. ]
  1897. ],
  1898. "orderBys": [
  1899. ],
  1900. "path": "collection"
  1901. }
  1902. ],
  1903. "resumeToken": ""
  1904. }
  1905. }
  1906. }
  1907. },
  1908. {
  1909. "watchAck": [
  1910. 2
  1911. ]
  1912. },
  1913. {
  1914. "watchEntity": {
  1915. "docs": [
  1916. {
  1917. "key": "collection/a",
  1918. "options": {
  1919. "hasCommittedMutations": false,
  1920. "hasLocalMutations": false
  1921. },
  1922. "value": {
  1923. "matches": true
  1924. },
  1925. "version": 1001
  1926. },
  1927. {
  1928. "key": "collection/b",
  1929. "options": {
  1930. "hasCommittedMutations": false,
  1931. "hasLocalMutations": false
  1932. },
  1933. "value": {
  1934. "matches": true
  1935. },
  1936. "version": 1002
  1937. },
  1938. {
  1939. "key": "collection/c",
  1940. "options": {
  1941. "hasCommittedMutations": false,
  1942. "hasLocalMutations": false
  1943. },
  1944. "value": {
  1945. "matches": true
  1946. },
  1947. "version": 1003
  1948. }
  1949. ],
  1950. "targets": [
  1951. 2
  1952. ]
  1953. }
  1954. },
  1955. {
  1956. "watchCurrent": [
  1957. [
  1958. 2
  1959. ],
  1960. "resume-token-1003"
  1961. ]
  1962. },
  1963. {
  1964. "watchSnapshot": {
  1965. "targetIds": [
  1966. ],
  1967. "version": 1003
  1968. },
  1969. "expectedSnapshotEvents": [
  1970. {
  1971. "added": [
  1972. {
  1973. "key": "collection/a",
  1974. "options": {
  1975. "hasCommittedMutations": false,
  1976. "hasLocalMutations": false
  1977. },
  1978. "value": {
  1979. "matches": true
  1980. },
  1981. "version": 1001
  1982. },
  1983. {
  1984. "key": "collection/b",
  1985. "options": {
  1986. "hasCommittedMutations": false,
  1987. "hasLocalMutations": false
  1988. },
  1989. "value": {
  1990. "matches": true
  1991. },
  1992. "version": 1002
  1993. },
  1994. {
  1995. "key": "collection/c",
  1996. "options": {
  1997. "hasCommittedMutations": false,
  1998. "hasLocalMutations": false
  1999. },
  2000. "value": {
  2001. "matches": true
  2002. },
  2003. "version": 1003
  2004. }
  2005. ],
  2006. "errorCode": 0,
  2007. "fromCache": false,
  2008. "hasPendingWrites": false,
  2009. "query": {
  2010. "filters": [
  2011. [
  2012. "matches",
  2013. "==",
  2014. true
  2015. ]
  2016. ],
  2017. "orderBys": [
  2018. ],
  2019. "path": "collection"
  2020. }
  2021. }
  2022. ]
  2023. },
  2024. {
  2025. "userUnlisten": [
  2026. 2,
  2027. {
  2028. "filters": [
  2029. [
  2030. "matches",
  2031. "==",
  2032. true
  2033. ]
  2034. ],
  2035. "orderBys": [
  2036. ],
  2037. "path": "collection"
  2038. }
  2039. ],
  2040. "expectedState": {
  2041. "activeTargets": {
  2042. }
  2043. }
  2044. },
  2045. {
  2046. "userListen": {
  2047. "query": {
  2048. "filters": [
  2049. [
  2050. "matches",
  2051. "==",
  2052. true
  2053. ]
  2054. ],
  2055. "limit": 2,
  2056. "limitType": "LimitToFirst",
  2057. "orderBys": [
  2058. ],
  2059. "path": "collection"
  2060. },
  2061. "targetId": 4
  2062. },
  2063. "expectedSnapshotEvents": [
  2064. {
  2065. "added": [
  2066. {
  2067. "key": "collection/a",
  2068. "options": {
  2069. "hasCommittedMutations": false,
  2070. "hasLocalMutations": false
  2071. },
  2072. "value": {
  2073. "matches": true
  2074. },
  2075. "version": 1001
  2076. },
  2077. {
  2078. "key": "collection/b",
  2079. "options": {
  2080. "hasCommittedMutations": false,
  2081. "hasLocalMutations": false
  2082. },
  2083. "value": {
  2084. "matches": true
  2085. },
  2086. "version": 1002
  2087. }
  2088. ],
  2089. "errorCode": 0,
  2090. "fromCache": true,
  2091. "hasPendingWrites": false,
  2092. "query": {
  2093. "filters": [
  2094. [
  2095. "matches",
  2096. "==",
  2097. true
  2098. ]
  2099. ],
  2100. "limit": 2,
  2101. "limitType": "LimitToFirst",
  2102. "orderBys": [
  2103. ],
  2104. "path": "collection"
  2105. }
  2106. }
  2107. ],
  2108. "expectedState": {
  2109. "activeTargets": {
  2110. "4": {
  2111. "queries": [
  2112. {
  2113. "filters": [
  2114. [
  2115. "matches",
  2116. "==",
  2117. true
  2118. ]
  2119. ],
  2120. "limit": 2,
  2121. "limitType": "LimitToFirst",
  2122. "orderBys": [
  2123. ],
  2124. "path": "collection"
  2125. }
  2126. ],
  2127. "resumeToken": ""
  2128. }
  2129. }
  2130. }
  2131. },
  2132. {
  2133. "watchAck": [
  2134. 4
  2135. ]
  2136. },
  2137. {
  2138. "watchEntity": {
  2139. "docs": [
  2140. {
  2141. "key": "collection/a",
  2142. "options": {
  2143. "hasCommittedMutations": false,
  2144. "hasLocalMutations": false
  2145. },
  2146. "value": {
  2147. "matches": true
  2148. },
  2149. "version": 1001
  2150. },
  2151. {
  2152. "key": "collection/b",
  2153. "options": {
  2154. "hasCommittedMutations": false,
  2155. "hasLocalMutations": false
  2156. },
  2157. "value": {
  2158. "matches": true
  2159. },
  2160. "version": 1002
  2161. }
  2162. ],
  2163. "targets": [
  2164. 4
  2165. ]
  2166. }
  2167. },
  2168. {
  2169. "watchCurrent": [
  2170. [
  2171. 4
  2172. ],
  2173. "resume-token-1004"
  2174. ]
  2175. },
  2176. {
  2177. "watchSnapshot": {
  2178. "targetIds": [
  2179. ],
  2180. "version": 1004
  2181. },
  2182. "expectedSnapshotEvents": [
  2183. {
  2184. "errorCode": 0,
  2185. "fromCache": false,
  2186. "hasPendingWrites": false,
  2187. "query": {
  2188. "filters": [
  2189. [
  2190. "matches",
  2191. "==",
  2192. true
  2193. ]
  2194. ],
  2195. "limit": 2,
  2196. "limitType": "LimitToFirst",
  2197. "orderBys": [
  2198. ],
  2199. "path": "collection"
  2200. }
  2201. }
  2202. ]
  2203. },
  2204. {
  2205. "userUnlisten": [
  2206. 4,
  2207. {
  2208. "filters": [
  2209. [
  2210. "matches",
  2211. "==",
  2212. true
  2213. ]
  2214. ],
  2215. "limit": 2,
  2216. "limitType": "LimitToFirst",
  2217. "orderBys": [
  2218. ],
  2219. "path": "collection"
  2220. }
  2221. ],
  2222. "expectedState": {
  2223. "activeTargets": {
  2224. }
  2225. }
  2226. },
  2227. {
  2228. "watchRemove": {
  2229. "targetIds": [
  2230. 4
  2231. ]
  2232. }
  2233. },
  2234. {
  2235. "userSet": [
  2236. "collection/a",
  2237. {
  2238. "matches": false
  2239. }
  2240. ]
  2241. },
  2242. {
  2243. "userListen": {
  2244. "query": {
  2245. "filters": [
  2246. [
  2247. "matches",
  2248. "==",
  2249. true
  2250. ]
  2251. ],
  2252. "limit": 2,
  2253. "limitType": "LimitToFirst",
  2254. "orderBys": [
  2255. ],
  2256. "path": "collection"
  2257. },
  2258. "targetId": 4
  2259. },
  2260. "expectedSnapshotEvents": [
  2261. {
  2262. "added": [
  2263. {
  2264. "key": "collection/b",
  2265. "options": {
  2266. "hasCommittedMutations": false,
  2267. "hasLocalMutations": false
  2268. },
  2269. "value": {
  2270. "matches": true
  2271. },
  2272. "version": 1002
  2273. },
  2274. {
  2275. "key": "collection/c",
  2276. "options": {
  2277. "hasCommittedMutations": false,
  2278. "hasLocalMutations": false
  2279. },
  2280. "value": {
  2281. "matches": true
  2282. },
  2283. "version": 1003
  2284. }
  2285. ],
  2286. "errorCode": 0,
  2287. "fromCache": true,
  2288. "hasPendingWrites": false,
  2289. "query": {
  2290. "filters": [
  2291. [
  2292. "matches",
  2293. "==",
  2294. true
  2295. ]
  2296. ],
  2297. "limit": 2,
  2298. "limitType": "LimitToFirst",
  2299. "orderBys": [
  2300. ],
  2301. "path": "collection"
  2302. }
  2303. }
  2304. ],
  2305. "expectedState": {
  2306. "activeTargets": {
  2307. "4": {
  2308. "queries": [
  2309. {
  2310. "filters": [
  2311. [
  2312. "matches",
  2313. "==",
  2314. true
  2315. ]
  2316. ],
  2317. "limit": 2,
  2318. "limitType": "LimitToFirst",
  2319. "orderBys": [
  2320. ],
  2321. "path": "collection"
  2322. }
  2323. ],
  2324. "resumeToken": "resume-token-1004"
  2325. }
  2326. }
  2327. }
  2328. }
  2329. ]
  2330. },
  2331. "Initial snapshots for limit queries are re-filled from cache (with update from backend)": {
  2332. "describeName": "Limits:",
  2333. "itName": "Initial snapshots for limit queries are re-filled from cache (with update from backend)",
  2334. "tags": [
  2335. ],
  2336. "config": {
  2337. "numClients": 1,
  2338. "useGarbageCollection": false
  2339. },
  2340. "steps": [
  2341. {
  2342. "userListen": {
  2343. "query": {
  2344. "filters": [
  2345. ],
  2346. "orderBys": [
  2347. ],
  2348. "path": "collection"
  2349. },
  2350. "targetId": 2
  2351. },
  2352. "expectedState": {
  2353. "activeTargets": {
  2354. "2": {
  2355. "queries": [
  2356. {
  2357. "filters": [
  2358. ],
  2359. "orderBys": [
  2360. ],
  2361. "path": "collection"
  2362. }
  2363. ],
  2364. "resumeToken": ""
  2365. }
  2366. }
  2367. }
  2368. },
  2369. {
  2370. "watchAck": [
  2371. 2
  2372. ]
  2373. },
  2374. {
  2375. "watchEntity": {
  2376. "docs": [
  2377. {
  2378. "key": "collection/a",
  2379. "options": {
  2380. "hasCommittedMutations": false,
  2381. "hasLocalMutations": false
  2382. },
  2383. "value": {
  2384. "pos": 1
  2385. },
  2386. "version": 1001
  2387. },
  2388. {
  2389. "key": "collection/b",
  2390. "options": {
  2391. "hasCommittedMutations": false,
  2392. "hasLocalMutations": false
  2393. },
  2394. "value": {
  2395. "pos": 2
  2396. },
  2397. "version": 1002
  2398. },
  2399. {
  2400. "key": "collection/c",
  2401. "options": {
  2402. "hasCommittedMutations": false,
  2403. "hasLocalMutations": false
  2404. },
  2405. "value": {
  2406. "pos": 3
  2407. },
  2408. "version": 1003
  2409. }
  2410. ],
  2411. "targets": [
  2412. 2
  2413. ]
  2414. }
  2415. },
  2416. {
  2417. "watchCurrent": [
  2418. [
  2419. 2
  2420. ],
  2421. "resume-token-1003"
  2422. ]
  2423. },
  2424. {
  2425. "watchSnapshot": {
  2426. "targetIds": [
  2427. ],
  2428. "version": 1003
  2429. },
  2430. "expectedSnapshotEvents": [
  2431. {
  2432. "added": [
  2433. {
  2434. "key": "collection/a",
  2435. "options": {
  2436. "hasCommittedMutations": false,
  2437. "hasLocalMutations": false
  2438. },
  2439. "value": {
  2440. "pos": 1
  2441. },
  2442. "version": 1001
  2443. },
  2444. {
  2445. "key": "collection/b",
  2446. "options": {
  2447. "hasCommittedMutations": false,
  2448. "hasLocalMutations": false
  2449. },
  2450. "value": {
  2451. "pos": 2
  2452. },
  2453. "version": 1002
  2454. },
  2455. {
  2456. "key": "collection/c",
  2457. "options": {
  2458. "hasCommittedMutations": false,
  2459. "hasLocalMutations": false
  2460. },
  2461. "value": {
  2462. "pos": 3
  2463. },
  2464. "version": 1003
  2465. }
  2466. ],
  2467. "errorCode": 0,
  2468. "fromCache": false,
  2469. "hasPendingWrites": false,
  2470. "query": {
  2471. "filters": [
  2472. ],
  2473. "orderBys": [
  2474. ],
  2475. "path": "collection"
  2476. }
  2477. }
  2478. ]
  2479. },
  2480. {
  2481. "userUnlisten": [
  2482. 2,
  2483. {
  2484. "filters": [
  2485. ],
  2486. "orderBys": [
  2487. ],
  2488. "path": "collection"
  2489. }
  2490. ],
  2491. "expectedState": {
  2492. "activeTargets": {
  2493. }
  2494. }
  2495. },
  2496. {
  2497. "watchRemove": {
  2498. "targetIds": [
  2499. 2
  2500. ]
  2501. }
  2502. },
  2503. {
  2504. "userListen": {
  2505. "query": {
  2506. "filters": [
  2507. ],
  2508. "limit": 2,
  2509. "limitType": "LimitToFirst",
  2510. "orderBys": [
  2511. [
  2512. "pos",
  2513. "asc"
  2514. ]
  2515. ],
  2516. "path": "collection"
  2517. },
  2518. "targetId": 4
  2519. },
  2520. "expectedSnapshotEvents": [
  2521. {
  2522. "added": [
  2523. {
  2524. "key": "collection/a",
  2525. "options": {
  2526. "hasCommittedMutations": false,
  2527. "hasLocalMutations": false
  2528. },
  2529. "value": {
  2530. "pos": 1
  2531. },
  2532. "version": 1001
  2533. },
  2534. {
  2535. "key": "collection/b",
  2536. "options": {
  2537. "hasCommittedMutations": false,
  2538. "hasLocalMutations": false
  2539. },
  2540. "value": {
  2541. "pos": 2
  2542. },
  2543. "version": 1002
  2544. }
  2545. ],
  2546. "errorCode": 0,
  2547. "fromCache": true,
  2548. "hasPendingWrites": false,
  2549. "query": {
  2550. "filters": [
  2551. ],
  2552. "limit": 2,
  2553. "limitType": "LimitToFirst",
  2554. "orderBys": [
  2555. [
  2556. "pos",
  2557. "asc"
  2558. ]
  2559. ],
  2560. "path": "collection"
  2561. }
  2562. }
  2563. ],
  2564. "expectedState": {
  2565. "activeTargets": {
  2566. "4": {
  2567. "queries": [
  2568. {
  2569. "filters": [
  2570. ],
  2571. "limit": 2,
  2572. "limitType": "LimitToFirst",
  2573. "orderBys": [
  2574. [
  2575. "pos",
  2576. "asc"
  2577. ]
  2578. ],
  2579. "path": "collection"
  2580. }
  2581. ],
  2582. "resumeToken": ""
  2583. }
  2584. }
  2585. }
  2586. },
  2587. {
  2588. "watchAck": [
  2589. 4
  2590. ]
  2591. },
  2592. {
  2593. "watchEntity": {
  2594. "docs": [
  2595. {
  2596. "key": "collection/a",
  2597. "options": {
  2598. "hasCommittedMutations": false,
  2599. "hasLocalMutations": false
  2600. },
  2601. "value": {
  2602. "pos": 1
  2603. },
  2604. "version": 1001
  2605. },
  2606. {
  2607. "key": "collection/b",
  2608. "options": {
  2609. "hasCommittedMutations": false,
  2610. "hasLocalMutations": false
  2611. },
  2612. "value": {
  2613. "pos": 2
  2614. },
  2615. "version": 1002
  2616. }
  2617. ],
  2618. "targets": [
  2619. 4
  2620. ]
  2621. }
  2622. },
  2623. {
  2624. "watchCurrent": [
  2625. [
  2626. 4
  2627. ],
  2628. "resume-token-1004"
  2629. ]
  2630. },
  2631. {
  2632. "watchSnapshot": {
  2633. "targetIds": [
  2634. ],
  2635. "version": 1004
  2636. },
  2637. "expectedSnapshotEvents": [
  2638. {
  2639. "errorCode": 0,
  2640. "fromCache": false,
  2641. "hasPendingWrites": false,
  2642. "query": {
  2643. "filters": [
  2644. ],
  2645. "limit": 2,
  2646. "limitType": "LimitToFirst",
  2647. "orderBys": [
  2648. [
  2649. "pos",
  2650. "asc"
  2651. ]
  2652. ],
  2653. "path": "collection"
  2654. }
  2655. }
  2656. ]
  2657. },
  2658. {
  2659. "userUnlisten": [
  2660. 4,
  2661. {
  2662. "filters": [
  2663. ],
  2664. "limit": 2,
  2665. "limitType": "LimitToFirst",
  2666. "orderBys": [
  2667. [
  2668. "pos",
  2669. "asc"
  2670. ]
  2671. ],
  2672. "path": "collection"
  2673. }
  2674. ],
  2675. "expectedState": {
  2676. "activeTargets": {
  2677. }
  2678. }
  2679. },
  2680. {
  2681. "watchRemove": {
  2682. "targetIds": [
  2683. 4
  2684. ]
  2685. }
  2686. },
  2687. {
  2688. "userListen": {
  2689. "query": {
  2690. "filters": [
  2691. ],
  2692. "orderBys": [
  2693. ],
  2694. "path": "collection"
  2695. },
  2696. "targetId": 2
  2697. },
  2698. "expectedSnapshotEvents": [
  2699. {
  2700. "added": [
  2701. {
  2702. "key": "collection/a",
  2703. "options": {
  2704. "hasCommittedMutations": false,
  2705. "hasLocalMutations": false
  2706. },
  2707. "value": {
  2708. "pos": 1
  2709. },
  2710. "version": 1001
  2711. },
  2712. {
  2713. "key": "collection/b",
  2714. "options": {
  2715. "hasCommittedMutations": false,
  2716. "hasLocalMutations": false
  2717. },
  2718. "value": {
  2719. "pos": 2
  2720. },
  2721. "version": 1002
  2722. },
  2723. {
  2724. "key": "collection/c",
  2725. "options": {
  2726. "hasCommittedMutations": false,
  2727. "hasLocalMutations": false
  2728. },
  2729. "value": {
  2730. "pos": 3
  2731. },
  2732. "version": 1003
  2733. }
  2734. ],
  2735. "errorCode": 0,
  2736. "fromCache": true,
  2737. "hasPendingWrites": false,
  2738. "query": {
  2739. "filters": [
  2740. ],
  2741. "orderBys": [
  2742. ],
  2743. "path": "collection"
  2744. }
  2745. }
  2746. ],
  2747. "expectedState": {
  2748. "activeTargets": {
  2749. "2": {
  2750. "queries": [
  2751. {
  2752. "filters": [
  2753. ],
  2754. "orderBys": [
  2755. ],
  2756. "path": "collection"
  2757. }
  2758. ],
  2759. "resumeToken": "resume-token-1003"
  2760. }
  2761. }
  2762. }
  2763. },
  2764. {
  2765. "watchAck": [
  2766. 2
  2767. ]
  2768. },
  2769. {
  2770. "watchEntity": {
  2771. "docs": [
  2772. {
  2773. "key": "collection/a",
  2774. "options": {
  2775. "hasCommittedMutations": false,
  2776. "hasLocalMutations": false
  2777. },
  2778. "value": {
  2779. "pos": 4
  2780. },
  2781. "version": 1005
  2782. }
  2783. ],
  2784. "targets": [
  2785. 2
  2786. ]
  2787. }
  2788. },
  2789. {
  2790. "watchCurrent": [
  2791. [
  2792. 2
  2793. ],
  2794. "resume-token-1005"
  2795. ]
  2796. },
  2797. {
  2798. "watchSnapshot": {
  2799. "targetIds": [
  2800. ],
  2801. "version": 1005
  2802. },
  2803. "expectedSnapshotEvents": [
  2804. {
  2805. "errorCode": 0,
  2806. "fromCache": false,
  2807. "hasPendingWrites": false,
  2808. "modified": [
  2809. {
  2810. "key": "collection/a",
  2811. "options": {
  2812. "hasCommittedMutations": false,
  2813. "hasLocalMutations": false
  2814. },
  2815. "value": {
  2816. "pos": 4
  2817. },
  2818. "version": 1005
  2819. }
  2820. ],
  2821. "query": {
  2822. "filters": [
  2823. ],
  2824. "orderBys": [
  2825. ],
  2826. "path": "collection"
  2827. }
  2828. }
  2829. ]
  2830. },
  2831. {
  2832. "userListen": {
  2833. "query": {
  2834. "filters": [
  2835. ],
  2836. "limit": 2,
  2837. "limitType": "LimitToFirst",
  2838. "orderBys": [
  2839. [
  2840. "pos",
  2841. "asc"
  2842. ]
  2843. ],
  2844. "path": "collection"
  2845. },
  2846. "targetId": 4
  2847. },
  2848. "expectedSnapshotEvents": [
  2849. {
  2850. "added": [
  2851. {
  2852. "key": "collection/b",
  2853. "options": {
  2854. "hasCommittedMutations": false,
  2855. "hasLocalMutations": false
  2856. },
  2857. "value": {
  2858. "pos": 2
  2859. },
  2860. "version": 1002
  2861. },
  2862. {
  2863. "key": "collection/c",
  2864. "options": {
  2865. "hasCommittedMutations": false,
  2866. "hasLocalMutations": false
  2867. },
  2868. "value": {
  2869. "pos": 3
  2870. },
  2871. "version": 1003
  2872. }
  2873. ],
  2874. "errorCode": 0,
  2875. "fromCache": true,
  2876. "hasPendingWrites": false,
  2877. "query": {
  2878. "filters": [
  2879. ],
  2880. "limit": 2,
  2881. "limitType": "LimitToFirst",
  2882. "orderBys": [
  2883. [
  2884. "pos",
  2885. "asc"
  2886. ]
  2887. ],
  2888. "path": "collection"
  2889. }
  2890. }
  2891. ],
  2892. "expectedState": {
  2893. "activeTargets": {
  2894. "2": {
  2895. "queries": [
  2896. {
  2897. "filters": [
  2898. ],
  2899. "orderBys": [
  2900. ],
  2901. "path": "collection"
  2902. }
  2903. ],
  2904. "resumeToken": "resume-token-1003"
  2905. },
  2906. "4": {
  2907. "queries": [
  2908. {
  2909. "filters": [
  2910. ],
  2911. "limit": 2,
  2912. "limitType": "LimitToFirst",
  2913. "orderBys": [
  2914. [
  2915. "pos",
  2916. "asc"
  2917. ]
  2918. ],
  2919. "path": "collection"
  2920. }
  2921. ],
  2922. "resumeToken": "resume-token-1004"
  2923. }
  2924. }
  2925. }
  2926. }
  2927. ]
  2928. },
  2929. "Limit query includes write from secondary client ": {
  2930. "describeName": "Limits:",
  2931. "itName": "Limit query includes write from secondary client ",
  2932. "tags": [
  2933. "multi-client"
  2934. ],
  2935. "config": {
  2936. "numClients": 3,
  2937. "useGarbageCollection": false
  2938. },
  2939. "steps": [
  2940. {
  2941. "clientIndex": 0,
  2942. "drainQueue": true
  2943. },
  2944. {
  2945. "applyClientState": {
  2946. "visibility": "visible"
  2947. },
  2948. "clientIndex": 0
  2949. },
  2950. {
  2951. "clientIndex": 1,
  2952. "drainQueue": true
  2953. },
  2954. {
  2955. "clientIndex": 1,
  2956. "userListen": {
  2957. "query": {
  2958. "filters": [
  2959. ],
  2960. "limit": 2,
  2961. "limitType": "LimitToFirst",
  2962. "orderBys": [
  2963. ],
  2964. "path": "collection"
  2965. },
  2966. "targetId": 2
  2967. },
  2968. "expectedState": {
  2969. "activeTargets": {
  2970. "2": {
  2971. "queries": [
  2972. {
  2973. "filters": [
  2974. ],
  2975. "limit": 2,
  2976. "limitType": "LimitToFirst",
  2977. "orderBys": [
  2978. ],
  2979. "path": "collection"
  2980. }
  2981. ],
  2982. "resumeToken": ""
  2983. }
  2984. }
  2985. }
  2986. },
  2987. {
  2988. "clientIndex": 0,
  2989. "drainQueue": true,
  2990. "expectedState": {
  2991. "activeTargets": {
  2992. "2": {
  2993. "queries": [
  2994. {
  2995. "filters": [
  2996. ],
  2997. "limit": 2,
  2998. "limitType": "LimitToFirst",
  2999. "orderBys": [
  3000. ],
  3001. "path": "collection"
  3002. }
  3003. ],
  3004. "resumeToken": ""
  3005. }
  3006. }
  3007. }
  3008. },
  3009. {
  3010. "clientIndex": 0,
  3011. "watchAck": [
  3012. 2
  3013. ]
  3014. },
  3015. {
  3016. "clientIndex": 0,
  3017. "watchEntity": {
  3018. "docs": [
  3019. {
  3020. "key": "collection/b",
  3021. "options": {
  3022. "hasCommittedMutations": false,
  3023. "hasLocalMutations": false
  3024. },
  3025. "value": {
  3026. "key": "b"
  3027. },
  3028. "version": 1001
  3029. },
  3030. {
  3031. "key": "collection/c",
  3032. "options": {
  3033. "hasCommittedMutations": false,
  3034. "hasLocalMutations": false
  3035. },
  3036. "value": {
  3037. "key": "c"
  3038. },
  3039. "version": 1002
  3040. }
  3041. ],
  3042. "targets": [
  3043. 2
  3044. ]
  3045. }
  3046. },
  3047. {
  3048. "clientIndex": 0,
  3049. "watchCurrent": [
  3050. [
  3051. 2
  3052. ],
  3053. "resume-token-1002"
  3054. ]
  3055. },
  3056. {
  3057. "clientIndex": 0,
  3058. "watchSnapshot": {
  3059. "targetIds": [
  3060. ],
  3061. "version": 1002
  3062. }
  3063. },
  3064. {
  3065. "clientIndex": 1,
  3066. "drainQueue": true,
  3067. "expectedSnapshotEvents": [
  3068. {
  3069. "added": [
  3070. {
  3071. "key": "collection/b",
  3072. "options": {
  3073. "hasCommittedMutations": false,
  3074. "hasLocalMutations": false
  3075. },
  3076. "value": {
  3077. "key": "b"
  3078. },
  3079. "version": 1001
  3080. },
  3081. {
  3082. "key": "collection/c",
  3083. "options": {
  3084. "hasCommittedMutations": false,
  3085. "hasLocalMutations": false
  3086. },
  3087. "value": {
  3088. "key": "c"
  3089. },
  3090. "version": 1002
  3091. }
  3092. ],
  3093. "errorCode": 0,
  3094. "fromCache": false,
  3095. "hasPendingWrites": false,
  3096. "query": {
  3097. "filters": [
  3098. ],
  3099. "limit": 2,
  3100. "limitType": "LimitToFirst",
  3101. "orderBys": [
  3102. ],
  3103. "path": "collection"
  3104. }
  3105. }
  3106. ]
  3107. },
  3108. {
  3109. "clientIndex": 2,
  3110. "drainQueue": true
  3111. },
  3112. {
  3113. "clientIndex": 2,
  3114. "userSet": [
  3115. "collection/a",
  3116. {
  3117. "key": "a"
  3118. }
  3119. ]
  3120. },
  3121. {
  3122. "clientIndex": 1,
  3123. "drainQueue": true,
  3124. "expectedSnapshotEvents": [
  3125. {
  3126. "added": [
  3127. {
  3128. "key": "collection/a",
  3129. "options": {
  3130. "hasCommittedMutations": false,
  3131. "hasLocalMutations": true
  3132. },
  3133. "value": {
  3134. "key": "a"
  3135. },
  3136. "version": 0
  3137. }
  3138. ],
  3139. "errorCode": 0,
  3140. "fromCache": false,
  3141. "hasPendingWrites": true,
  3142. "query": {
  3143. "filters": [
  3144. ],
  3145. "limit": 2,
  3146. "limitType": "LimitToFirst",
  3147. "orderBys": [
  3148. ],
  3149. "path": "collection"
  3150. },
  3151. "removed": [
  3152. {
  3153. "key": "collection/c",
  3154. "options": {
  3155. "hasCommittedMutations": false,
  3156. "hasLocalMutations": false
  3157. },
  3158. "value": {
  3159. "key": "c"
  3160. },
  3161. "version": 1002
  3162. }
  3163. ]
  3164. }
  3165. ]
  3166. },
  3167. {
  3168. "clientIndex": 0,
  3169. "drainQueue": true
  3170. },
  3171. {
  3172. "clientIndex": 0,
  3173. "writeAck": {
  3174. "version": 1003
  3175. }
  3176. },
  3177. {
  3178. "clientIndex": 0,
  3179. "watchEntity": {
  3180. "docs": [
  3181. {
  3182. "key": "collection/a",
  3183. "options": {
  3184. "hasCommittedMutations": false,
  3185. "hasLocalMutations": false
  3186. },
  3187. "value": {
  3188. "key": "a"
  3189. },
  3190. "version": 1003
  3191. }
  3192. ],
  3193. "targets": [
  3194. 2
  3195. ]
  3196. }
  3197. },
  3198. {
  3199. "clientIndex": 0,
  3200. "watchEntity": {
  3201. "docs": [
  3202. {
  3203. "key": "collection/c",
  3204. "options": {
  3205. "hasCommittedMutations": false,
  3206. "hasLocalMutations": false
  3207. },
  3208. "value": {
  3209. "key": "c"
  3210. },
  3211. "version": 1002
  3212. }
  3213. ],
  3214. "removedTargets": [
  3215. 2
  3216. ]
  3217. }
  3218. },
  3219. {
  3220. "clientIndex": 0,
  3221. "watchSnapshot": {
  3222. "targetIds": [
  3223. ],
  3224. "version": 1003
  3225. }
  3226. },
  3227. {
  3228. "clientIndex": 1,
  3229. "drainQueue": true,
  3230. "expectedSnapshotEvents": [
  3231. {
  3232. "errorCode": 0,
  3233. "fromCache": false,
  3234. "hasPendingWrites": false,
  3235. "metadata": [
  3236. {
  3237. "key": "collection/a",
  3238. "options": {
  3239. "hasCommittedMutations": false,
  3240. "hasLocalMutations": false
  3241. },
  3242. "value": {
  3243. "key": "a"
  3244. },
  3245. "version": 1003
  3246. }
  3247. ],
  3248. "query": {
  3249. "filters": [
  3250. ],
  3251. "limit": 2,
  3252. "limitType": "LimitToFirst",
  3253. "orderBys": [
  3254. ],
  3255. "path": "collection"
  3256. }
  3257. }
  3258. ]
  3259. },
  3260. {
  3261. "clientIndex": 2,
  3262. "drainQueue": true,
  3263. "expectedState": {
  3264. "userCallbacks": {
  3265. "acknowledgedDocs": [
  3266. "collection/a"
  3267. ],
  3268. "rejectedDocs": [
  3269. ]
  3270. }
  3271. }
  3272. }
  3273. ]
  3274. },
  3275. "Limit query is refilled by primary client": {
  3276. "describeName": "Limits:",
  3277. "itName": "Limit query is refilled by primary client",
  3278. "tags": [
  3279. "multi-client"
  3280. ],
  3281. "config": {
  3282. "numClients": 2,
  3283. "useGarbageCollection": false
  3284. },
  3285. "steps": [
  3286. {
  3287. "clientIndex": 0,
  3288. "drainQueue": true
  3289. },
  3290. {
  3291. "applyClientState": {
  3292. "visibility": "visible"
  3293. },
  3294. "clientIndex": 0
  3295. },
  3296. {
  3297. "clientIndex": 1,
  3298. "drainQueue": true
  3299. },
  3300. {
  3301. "clientIndex": 1,
  3302. "userListen": {
  3303. "query": {
  3304. "filters": [
  3305. ],
  3306. "limit": 2,
  3307. "limitType": "LimitToFirst",
  3308. "orderBys": [
  3309. ],
  3310. "path": "collection"
  3311. },
  3312. "targetId": 2
  3313. },
  3314. "expectedState": {
  3315. "activeTargets": {
  3316. "2": {
  3317. "queries": [
  3318. {
  3319. "filters": [
  3320. ],
  3321. "limit": 2,
  3322. "limitType": "LimitToFirst",
  3323. "orderBys": [
  3324. ],
  3325. "path": "collection"
  3326. }
  3327. ],
  3328. "resumeToken": ""
  3329. }
  3330. }
  3331. }
  3332. },
  3333. {
  3334. "clientIndex": 0,
  3335. "drainQueue": true,
  3336. "expectedState": {
  3337. "activeTargets": {
  3338. "2": {
  3339. "queries": [
  3340. {
  3341. "filters": [
  3342. ],
  3343. "limit": 2,
  3344. "limitType": "LimitToFirst",
  3345. "orderBys": [
  3346. ],
  3347. "path": "collection"
  3348. }
  3349. ],
  3350. "resumeToken": ""
  3351. }
  3352. }
  3353. }
  3354. },
  3355. {
  3356. "clientIndex": 0,
  3357. "watchAck": [
  3358. 2
  3359. ]
  3360. },
  3361. {
  3362. "clientIndex": 0,
  3363. "watchEntity": {
  3364. "docs": [
  3365. {
  3366. "key": "collection/a",
  3367. "options": {
  3368. "hasCommittedMutations": false,
  3369. "hasLocalMutations": false
  3370. },
  3371. "value": {
  3372. "key": "a"
  3373. },
  3374. "version": 1000
  3375. },
  3376. {
  3377. "key": "collection/c",
  3378. "options": {
  3379. "hasCommittedMutations": false,
  3380. "hasLocalMutations": false
  3381. },
  3382. "value": {
  3383. "key": "c"
  3384. },
  3385. "version": 1001
  3386. }
  3387. ],
  3388. "targets": [
  3389. 2
  3390. ]
  3391. }
  3392. },
  3393. {
  3394. "clientIndex": 0,
  3395. "watchCurrent": [
  3396. [
  3397. 2
  3398. ],
  3399. "resume-token-1001"
  3400. ]
  3401. },
  3402. {
  3403. "clientIndex": 0,
  3404. "watchSnapshot": {
  3405. "targetIds": [
  3406. ],
  3407. "version": 1001
  3408. }
  3409. },
  3410. {
  3411. "clientIndex": 1,
  3412. "drainQueue": true,
  3413. "expectedSnapshotEvents": [
  3414. {
  3415. "added": [
  3416. {
  3417. "key": "collection/a",
  3418. "options": {
  3419. "hasCommittedMutations": false,
  3420. "hasLocalMutations": false
  3421. },
  3422. "value": {
  3423. "key": "a"
  3424. },
  3425. "version": 1000
  3426. },
  3427. {
  3428. "key": "collection/c",
  3429. "options": {
  3430. "hasCommittedMutations": false,
  3431. "hasLocalMutations": false
  3432. },
  3433. "value": {
  3434. "key": "c"
  3435. },
  3436. "version": 1001
  3437. }
  3438. ],
  3439. "errorCode": 0,
  3440. "fromCache": false,
  3441. "hasPendingWrites": false,
  3442. "query": {
  3443. "filters": [
  3444. ],
  3445. "limit": 2,
  3446. "limitType": "LimitToFirst",
  3447. "orderBys": [
  3448. ],
  3449. "path": "collection"
  3450. }
  3451. }
  3452. ]
  3453. },
  3454. {
  3455. "clientIndex": 0,
  3456. "drainQueue": true
  3457. },
  3458. {
  3459. "clientIndex": 0,
  3460. "watchEntity": {
  3461. "docs": [
  3462. {
  3463. "key": "collection/b",
  3464. "options": {
  3465. "hasCommittedMutations": false,
  3466. "hasLocalMutations": false
  3467. },
  3468. "value": {
  3469. "key": "b"
  3470. },
  3471. "version": 1002
  3472. }
  3473. ],
  3474. "targets": [
  3475. 2
  3476. ]
  3477. }
  3478. },
  3479. {
  3480. "clientIndex": 0,
  3481. "watchEntity": {
  3482. "docs": [
  3483. {
  3484. "key": "collection/c",
  3485. "options": {
  3486. "hasCommittedMutations": false,
  3487. "hasLocalMutations": false
  3488. },
  3489. "value": {
  3490. "key": "c"
  3491. },
  3492. "version": 1001
  3493. }
  3494. ],
  3495. "removedTargets": [
  3496. 2
  3497. ]
  3498. }
  3499. },
  3500. {
  3501. "clientIndex": 0,
  3502. "watchSnapshot": {
  3503. "targetIds": [
  3504. ],
  3505. "version": 1002
  3506. }
  3507. },
  3508. {
  3509. "clientIndex": 1,
  3510. "drainQueue": true,
  3511. "expectedSnapshotEvents": [
  3512. {
  3513. "added": [
  3514. {
  3515. "key": "collection/b",
  3516. "options": {
  3517. "hasCommittedMutations": false,
  3518. "hasLocalMutations": false
  3519. },
  3520. "value": {
  3521. "key": "b"
  3522. },
  3523. "version": 1002
  3524. }
  3525. ],
  3526. "errorCode": 0,
  3527. "fromCache": false,
  3528. "hasPendingWrites": false,
  3529. "query": {
  3530. "filters": [
  3531. ],
  3532. "limit": 2,
  3533. "limitType": "LimitToFirst",
  3534. "orderBys": [
  3535. ],
  3536. "path": "collection"
  3537. },
  3538. "removed": [
  3539. {
  3540. "key": "collection/c",
  3541. "options": {
  3542. "hasCommittedMutations": false,
  3543. "hasLocalMutations": false
  3544. },
  3545. "value": {
  3546. "key": "c"
  3547. },
  3548. "version": 1001
  3549. }
  3550. ]
  3551. }
  3552. ]
  3553. }
  3554. ]
  3555. },
  3556. "Limits are re-filled from cache": {
  3557. "describeName": "Limits:",
  3558. "itName": "Limits are re-filled from cache",
  3559. "tags": [
  3560. ],
  3561. "config": {
  3562. "numClients": 1,
  3563. "useGarbageCollection": false
  3564. },
  3565. "steps": [
  3566. {
  3567. "userListen": {
  3568. "query": {
  3569. "filters": [
  3570. [
  3571. "matches",
  3572. "==",
  3573. true
  3574. ]
  3575. ],
  3576. "orderBys": [
  3577. ],
  3578. "path": "collection"
  3579. },
  3580. "targetId": 2
  3581. },
  3582. "expectedState": {
  3583. "activeTargets": {
  3584. "2": {
  3585. "queries": [
  3586. {
  3587. "filters": [
  3588. [
  3589. "matches",
  3590. "==",
  3591. true
  3592. ]
  3593. ],
  3594. "orderBys": [
  3595. ],
  3596. "path": "collection"
  3597. }
  3598. ],
  3599. "resumeToken": ""
  3600. }
  3601. }
  3602. }
  3603. },
  3604. {
  3605. "watchAck": [
  3606. 2
  3607. ]
  3608. },
  3609. {
  3610. "watchEntity": {
  3611. "docs": [
  3612. {
  3613. "key": "collection/a",
  3614. "options": {
  3615. "hasCommittedMutations": false,
  3616. "hasLocalMutations": false
  3617. },
  3618. "value": {
  3619. "matches": true
  3620. },
  3621. "version": 1001
  3622. },
  3623. {
  3624. "key": "collection/b",
  3625. "options": {
  3626. "hasCommittedMutations": false,
  3627. "hasLocalMutations": false
  3628. },
  3629. "value": {
  3630. "matches": true
  3631. },
  3632. "version": 1002
  3633. },
  3634. {
  3635. "key": "collection/c",
  3636. "options": {
  3637. "hasCommittedMutations": false,
  3638. "hasLocalMutations": false
  3639. },
  3640. "value": {
  3641. "matches": true
  3642. },
  3643. "version": 1000
  3644. }
  3645. ],
  3646. "targets": [
  3647. 2
  3648. ]
  3649. }
  3650. },
  3651. {
  3652. "watchCurrent": [
  3653. [
  3654. 2
  3655. ],
  3656. "resume-token-1002"
  3657. ]
  3658. },
  3659. {
  3660. "watchSnapshot": {
  3661. "targetIds": [
  3662. ],
  3663. "version": 1002
  3664. },
  3665. "expectedSnapshotEvents": [
  3666. {
  3667. "added": [
  3668. {
  3669. "key": "collection/a",
  3670. "options": {
  3671. "hasCommittedMutations": false,
  3672. "hasLocalMutations": false
  3673. },
  3674. "value": {
  3675. "matches": true
  3676. },
  3677. "version": 1001
  3678. },
  3679. {
  3680. "key": "collection/b",
  3681. "options": {
  3682. "hasCommittedMutations": false,
  3683. "hasLocalMutations": false
  3684. },
  3685. "value": {
  3686. "matches": true
  3687. },
  3688. "version": 1002
  3689. },
  3690. {
  3691. "key": "collection/c",
  3692. "options": {
  3693. "hasCommittedMutations": false,
  3694. "hasLocalMutations": false
  3695. },
  3696. "value": {
  3697. "matches": true
  3698. },
  3699. "version": 1000
  3700. }
  3701. ],
  3702. "errorCode": 0,
  3703. "fromCache": false,
  3704. "hasPendingWrites": false,
  3705. "query": {
  3706. "filters": [
  3707. [
  3708. "matches",
  3709. "==",
  3710. true
  3711. ]
  3712. ],
  3713. "orderBys": [
  3714. ],
  3715. "path": "collection"
  3716. }
  3717. }
  3718. ]
  3719. },
  3720. {
  3721. "userUnlisten": [
  3722. 2,
  3723. {
  3724. "filters": [
  3725. [
  3726. "matches",
  3727. "==",
  3728. true
  3729. ]
  3730. ],
  3731. "orderBys": [
  3732. ],
  3733. "path": "collection"
  3734. }
  3735. ],
  3736. "expectedState": {
  3737. "activeTargets": {
  3738. }
  3739. }
  3740. },
  3741. {
  3742. "userListen": {
  3743. "query": {
  3744. "filters": [
  3745. [
  3746. "matches",
  3747. "==",
  3748. true
  3749. ]
  3750. ],
  3751. "limit": 2,
  3752. "limitType": "LimitToFirst",
  3753. "orderBys": [
  3754. ],
  3755. "path": "collection"
  3756. },
  3757. "targetId": 4
  3758. },
  3759. "expectedSnapshotEvents": [
  3760. {
  3761. "added": [
  3762. {
  3763. "key": "collection/a",
  3764. "options": {
  3765. "hasCommittedMutations": false,
  3766. "hasLocalMutations": false
  3767. },
  3768. "value": {
  3769. "matches": true
  3770. },
  3771. "version": 1001
  3772. },
  3773. {
  3774. "key": "collection/b",
  3775. "options": {
  3776. "hasCommittedMutations": false,
  3777. "hasLocalMutations": false
  3778. },
  3779. "value": {
  3780. "matches": true
  3781. },
  3782. "version": 1002
  3783. }
  3784. ],
  3785. "errorCode": 0,
  3786. "fromCache": true,
  3787. "hasPendingWrites": false,
  3788. "query": {
  3789. "filters": [
  3790. [
  3791. "matches",
  3792. "==",
  3793. true
  3794. ]
  3795. ],
  3796. "limit": 2,
  3797. "limitType": "LimitToFirst",
  3798. "orderBys": [
  3799. ],
  3800. "path": "collection"
  3801. }
  3802. }
  3803. ],
  3804. "expectedState": {
  3805. "activeTargets": {
  3806. "4": {
  3807. "queries": [
  3808. {
  3809. "filters": [
  3810. [
  3811. "matches",
  3812. "==",
  3813. true
  3814. ]
  3815. ],
  3816. "limit": 2,
  3817. "limitType": "LimitToFirst",
  3818. "orderBys": [
  3819. ],
  3820. "path": "collection"
  3821. }
  3822. ],
  3823. "resumeToken": ""
  3824. }
  3825. }
  3826. }
  3827. },
  3828. {
  3829. "userSet": [
  3830. "collection/a",
  3831. {
  3832. "matches": false
  3833. }
  3834. ],
  3835. "expectedSnapshotEvents": [
  3836. {
  3837. "added": [
  3838. {
  3839. "key": "collection/c",
  3840. "options": {
  3841. "hasCommittedMutations": false,
  3842. "hasLocalMutations": false
  3843. },
  3844. "value": {
  3845. "matches": true
  3846. },
  3847. "version": 1000
  3848. }
  3849. ],
  3850. "errorCode": 0,
  3851. "fromCache": true,
  3852. "hasPendingWrites": false,
  3853. "query": {
  3854. "filters": [
  3855. [
  3856. "matches",
  3857. "==",
  3858. true
  3859. ]
  3860. ],
  3861. "limit": 2,
  3862. "limitType": "LimitToFirst",
  3863. "orderBys": [
  3864. ],
  3865. "path": "collection"
  3866. },
  3867. "removed": [
  3868. {
  3869. "key": "collection/a",
  3870. "options": {
  3871. "hasCommittedMutations": false,
  3872. "hasLocalMutations": false
  3873. },
  3874. "value": {
  3875. "matches": true
  3876. },
  3877. "version": 1001
  3878. }
  3879. ]
  3880. }
  3881. ]
  3882. }
  3883. ]
  3884. },
  3885. "Multiple docs in limbo in full limit query": {
  3886. "describeName": "Limits:",
  3887. "itName": "Multiple docs in limbo in full limit query",
  3888. "tags": [
  3889. ],
  3890. "config": {
  3891. "numClients": 1,
  3892. "useGarbageCollection": true
  3893. },
  3894. "steps": [
  3895. {
  3896. "userListen": {
  3897. "query": {
  3898. "filters": [
  3899. ],
  3900. "limit": 2,
  3901. "limitType": "LimitToFirst",
  3902. "orderBys": [
  3903. ],
  3904. "path": "collection"
  3905. },
  3906. "targetId": 2
  3907. },
  3908. "expectedState": {
  3909. "activeTargets": {
  3910. "2": {
  3911. "queries": [
  3912. {
  3913. "filters": [
  3914. ],
  3915. "limit": 2,
  3916. "limitType": "LimitToFirst",
  3917. "orderBys": [
  3918. ],
  3919. "path": "collection"
  3920. }
  3921. ],
  3922. "resumeToken": ""
  3923. }
  3924. }
  3925. }
  3926. },
  3927. {
  3928. "watchAck": [
  3929. 2
  3930. ]
  3931. },
  3932. {
  3933. "watchEntity": {
  3934. "docs": [
  3935. {
  3936. "key": "collection/a",
  3937. "options": {
  3938. "hasCommittedMutations": false,
  3939. "hasLocalMutations": false
  3940. },
  3941. "value": {
  3942. "key": "a"
  3943. },
  3944. "version": 1000
  3945. },
  3946. {
  3947. "key": "collection/b",
  3948. "options": {
  3949. "hasCommittedMutations": false,
  3950. "hasLocalMutations": false
  3951. },
  3952. "value": {
  3953. "key": "b"
  3954. },
  3955. "version": 1001
  3956. }
  3957. ],
  3958. "targets": [
  3959. 2
  3960. ]
  3961. }
  3962. },
  3963. {
  3964. "watchCurrent": [
  3965. [
  3966. 2
  3967. ],
  3968. "resume-token-1001"
  3969. ]
  3970. },
  3971. {
  3972. "watchSnapshot": {
  3973. "targetIds": [
  3974. ],
  3975. "version": 1001
  3976. },
  3977. "expectedSnapshotEvents": [
  3978. {
  3979. "added": [
  3980. {
  3981. "key": "collection/a",
  3982. "options": {
  3983. "hasCommittedMutations": false,
  3984. "hasLocalMutations": false
  3985. },
  3986. "value": {
  3987. "key": "a"
  3988. },
  3989. "version": 1000
  3990. },
  3991. {
  3992. "key": "collection/b",
  3993. "options": {
  3994. "hasCommittedMutations": false,
  3995. "hasLocalMutations": false
  3996. },
  3997. "value": {
  3998. "key": "b"
  3999. },
  4000. "version": 1001
  4001. }
  4002. ],
  4003. "errorCode": 0,
  4004. "fromCache": false,
  4005. "hasPendingWrites": false,
  4006. "query": {
  4007. "filters": [
  4008. ],
  4009. "limit": 2,
  4010. "limitType": "LimitToFirst",
  4011. "orderBys": [
  4012. ],
  4013. "path": "collection"
  4014. }
  4015. }
  4016. ]
  4017. },
  4018. {
  4019. "userListen": {
  4020. "query": {
  4021. "filters": [
  4022. ],
  4023. "orderBys": [
  4024. ],
  4025. "path": "collection"
  4026. },
  4027. "targetId": 4
  4028. },
  4029. "expectedSnapshotEvents": [
  4030. {
  4031. "added": [
  4032. {
  4033. "key": "collection/a",
  4034. "options": {
  4035. "hasCommittedMutations": false,
  4036. "hasLocalMutations": false
  4037. },
  4038. "value": {
  4039. "key": "a"
  4040. },
  4041. "version": 1000
  4042. },
  4043. {
  4044. "key": "collection/b",
  4045. "options": {
  4046. "hasCommittedMutations": false,
  4047. "hasLocalMutations": false
  4048. },
  4049. "value": {
  4050. "key": "b"
  4051. },
  4052. "version": 1001
  4053. }
  4054. ],
  4055. "errorCode": 0,
  4056. "fromCache": true,
  4057. "hasPendingWrites": false,
  4058. "query": {
  4059. "filters": [
  4060. ],
  4061. "orderBys": [
  4062. ],
  4063. "path": "collection"
  4064. }
  4065. }
  4066. ],
  4067. "expectedState": {
  4068. "activeTargets": {
  4069. "2": {
  4070. "queries": [
  4071. {
  4072. "filters": [
  4073. ],
  4074. "limit": 2,
  4075. "limitType": "LimitToFirst",
  4076. "orderBys": [
  4077. ],
  4078. "path": "collection"
  4079. }
  4080. ],
  4081. "resumeToken": ""
  4082. },
  4083. "4": {
  4084. "queries": [
  4085. {
  4086. "filters": [
  4087. ],
  4088. "orderBys": [
  4089. ],
  4090. "path": "collection"
  4091. }
  4092. ],
  4093. "resumeToken": ""
  4094. }
  4095. }
  4096. }
  4097. },
  4098. {
  4099. "watchAck": [
  4100. 4
  4101. ]
  4102. },
  4103. {
  4104. "watchEntity": {
  4105. "docs": [
  4106. {
  4107. "key": "collection/a",
  4108. "options": {
  4109. "hasCommittedMutations": false,
  4110. "hasLocalMutations": false
  4111. },
  4112. "value": {
  4113. "key": "a"
  4114. },
  4115. "version": 1000
  4116. },
  4117. {
  4118. "key": "collection/b",
  4119. "options": {
  4120. "hasCommittedMutations": false,
  4121. "hasLocalMutations": false
  4122. },
  4123. "value": {
  4124. "key": "b"
  4125. },
  4126. "version": 1001
  4127. },
  4128. {
  4129. "key": "collection/c",
  4130. "options": {
  4131. "hasCommittedMutations": false,
  4132. "hasLocalMutations": false
  4133. },
  4134. "value": {
  4135. "key": "c"
  4136. },
  4137. "version": 1002
  4138. },
  4139. {
  4140. "key": "collection/d",
  4141. "options": {
  4142. "hasCommittedMutations": false,
  4143. "hasLocalMutations": false
  4144. },
  4145. "value": {
  4146. "key": "d"
  4147. },
  4148. "version": 1003
  4149. },
  4150. {
  4151. "key": "collection/e",
  4152. "options": {
  4153. "hasCommittedMutations": false,
  4154. "hasLocalMutations": false
  4155. },
  4156. "value": {
  4157. "key": "e"
  4158. },
  4159. "version": 1004
  4160. },
  4161. {
  4162. "key": "collection/f",
  4163. "options": {
  4164. "hasCommittedMutations": false,
  4165. "hasLocalMutations": false
  4166. },
  4167. "value": {
  4168. "key": "f"
  4169. },
  4170. "version": 1005
  4171. }
  4172. ],
  4173. "targets": [
  4174. 4
  4175. ]
  4176. }
  4177. },
  4178. {
  4179. "watchCurrent": [
  4180. [
  4181. 4
  4182. ],
  4183. "resume-token-1005"
  4184. ]
  4185. },
  4186. {
  4187. "watchSnapshot": {
  4188. "targetIds": [
  4189. ],
  4190. "version": 1005
  4191. },
  4192. "expectedSnapshotEvents": [
  4193. {
  4194. "added": [
  4195. {
  4196. "key": "collection/c",
  4197. "options": {
  4198. "hasCommittedMutations": false,
  4199. "hasLocalMutations": false
  4200. },
  4201. "value": {
  4202. "key": "c"
  4203. },
  4204. "version": 1002
  4205. },
  4206. {
  4207. "key": "collection/d",
  4208. "options": {
  4209. "hasCommittedMutations": false,
  4210. "hasLocalMutations": false
  4211. },
  4212. "value": {
  4213. "key": "d"
  4214. },
  4215. "version": 1003
  4216. },
  4217. {
  4218. "key": "collection/e",
  4219. "options": {
  4220. "hasCommittedMutations": false,
  4221. "hasLocalMutations": false
  4222. },
  4223. "value": {
  4224. "key": "e"
  4225. },
  4226. "version": 1004
  4227. },
  4228. {
  4229. "key": "collection/f",
  4230. "options": {
  4231. "hasCommittedMutations": false,
  4232. "hasLocalMutations": false
  4233. },
  4234. "value": {
  4235. "key": "f"
  4236. },
  4237. "version": 1005
  4238. }
  4239. ],
  4240. "errorCode": 0,
  4241. "fromCache": false,
  4242. "hasPendingWrites": false,
  4243. "query": {
  4244. "filters": [
  4245. ],
  4246. "orderBys": [
  4247. ],
  4248. "path": "collection"
  4249. }
  4250. }
  4251. ]
  4252. },
  4253. {
  4254. "watchReset": [
  4255. 2
  4256. ]
  4257. },
  4258. {
  4259. "watchEntity": {
  4260. "docs": [
  4261. {
  4262. "key": "collection/e",
  4263. "options": {
  4264. "hasCommittedMutations": false,
  4265. "hasLocalMutations": false
  4266. },
  4267. "value": {
  4268. "key": "e"
  4269. },
  4270. "version": 1004
  4271. },
  4272. {
  4273. "key": "collection/f",
  4274. "options": {
  4275. "hasCommittedMutations": false,
  4276. "hasLocalMutations": false
  4277. },
  4278. "value": {
  4279. "key": "f"
  4280. },
  4281. "version": 1005
  4282. }
  4283. ],
  4284. "targets": [
  4285. 2
  4286. ]
  4287. }
  4288. },
  4289. {
  4290. "watchCurrent": [
  4291. [
  4292. 2
  4293. ],
  4294. "resume-token-2000"
  4295. ]
  4296. },
  4297. {
  4298. "watchSnapshot": {
  4299. "targetIds": [
  4300. ],
  4301. "version": 2000
  4302. },
  4303. "expectedSnapshotEvents": [
  4304. {
  4305. "errorCode": 0,
  4306. "fromCache": true,
  4307. "hasPendingWrites": false,
  4308. "query": {
  4309. "filters": [
  4310. ],
  4311. "limit": 2,
  4312. "limitType": "LimitToFirst",
  4313. "orderBys": [
  4314. ],
  4315. "path": "collection"
  4316. }
  4317. }
  4318. ],
  4319. "expectedState": {
  4320. "activeLimboDocs": [
  4321. "collection/a",
  4322. "collection/b"
  4323. ],
  4324. "activeTargets": {
  4325. "1": {
  4326. "queries": [
  4327. {
  4328. "filters": [
  4329. ],
  4330. "orderBys": [
  4331. ],
  4332. "path": "collection/a"
  4333. }
  4334. ],
  4335. "resumeToken": ""
  4336. },
  4337. "2": {
  4338. "queries": [
  4339. {
  4340. "filters": [
  4341. ],
  4342. "limit": 2,
  4343. "limitType": "LimitToFirst",
  4344. "orderBys": [
  4345. ],
  4346. "path": "collection"
  4347. }
  4348. ],
  4349. "resumeToken": ""
  4350. },
  4351. "3": {
  4352. "queries": [
  4353. {
  4354. "filters": [
  4355. ],
  4356. "orderBys": [
  4357. ],
  4358. "path": "collection/b"
  4359. }
  4360. ],
  4361. "resumeToken": ""
  4362. },
  4363. "4": {
  4364. "queries": [
  4365. {
  4366. "filters": [
  4367. ],
  4368. "orderBys": [
  4369. ],
  4370. "path": "collection"
  4371. }
  4372. ],
  4373. "resumeToken": ""
  4374. }
  4375. }
  4376. }
  4377. },
  4378. {
  4379. "watchAck": [
  4380. 1
  4381. ]
  4382. },
  4383. {
  4384. "watchCurrent": [
  4385. [
  4386. 1
  4387. ],
  4388. "resume-token-2000"
  4389. ]
  4390. },
  4391. {
  4392. "watchSnapshot": {
  4393. "targetIds": [
  4394. ],
  4395. "version": 2000
  4396. },
  4397. "expectedSnapshotEvents": [
  4398. {
  4399. "errorCode": 0,
  4400. "fromCache": false,
  4401. "hasPendingWrites": false,
  4402. "query": {
  4403. "filters": [
  4404. ],
  4405. "orderBys": [
  4406. ],
  4407. "path": "collection"
  4408. },
  4409. "removed": [
  4410. {
  4411. "key": "collection/a",
  4412. "options": {
  4413. "hasCommittedMutations": false,
  4414. "hasLocalMutations": false
  4415. },
  4416. "value": {
  4417. "key": "a"
  4418. },
  4419. "version": 1000
  4420. }
  4421. ]
  4422. },
  4423. {
  4424. "added": [
  4425. {
  4426. "key": "collection/c",
  4427. "options": {
  4428. "hasCommittedMutations": false,
  4429. "hasLocalMutations": false
  4430. },
  4431. "value": {
  4432. "key": "c"
  4433. },
  4434. "version": 1002
  4435. }
  4436. ],
  4437. "errorCode": 0,
  4438. "fromCache": true,
  4439. "hasPendingWrites": false,
  4440. "query": {
  4441. "filters": [
  4442. ],
  4443. "limit": 2,
  4444. "limitType": "LimitToFirst",
  4445. "orderBys": [
  4446. ],
  4447. "path": "collection"
  4448. },
  4449. "removed": [
  4450. {
  4451. "key": "collection/a",
  4452. "options": {
  4453. "hasCommittedMutations": false,
  4454. "hasLocalMutations": false
  4455. },
  4456. "value": {
  4457. "key": "a"
  4458. },
  4459. "version": 1000
  4460. }
  4461. ]
  4462. }
  4463. ],
  4464. "expectedState": {
  4465. "activeLimboDocs": [
  4466. "collection/b",
  4467. "collection/c"
  4468. ],
  4469. "activeTargets": {
  4470. "2": {
  4471. "queries": [
  4472. {
  4473. "filters": [
  4474. ],
  4475. "limit": 2,
  4476. "limitType": "LimitToFirst",
  4477. "orderBys": [
  4478. ],
  4479. "path": "collection"
  4480. }
  4481. ],
  4482. "resumeToken": ""
  4483. },
  4484. "3": {
  4485. "queries": [
  4486. {
  4487. "filters": [
  4488. ],
  4489. "orderBys": [
  4490. ],
  4491. "path": "collection/b"
  4492. }
  4493. ],
  4494. "resumeToken": ""
  4495. },
  4496. "4": {
  4497. "queries": [
  4498. {
  4499. "filters": [
  4500. ],
  4501. "orderBys": [
  4502. ],
  4503. "path": "collection"
  4504. }
  4505. ],
  4506. "resumeToken": ""
  4507. },
  4508. "5": {
  4509. "queries": [
  4510. {
  4511. "filters": [
  4512. ],
  4513. "orderBys": [
  4514. ],
  4515. "path": "collection/c"
  4516. }
  4517. ],
  4518. "resumeToken": ""
  4519. }
  4520. }
  4521. }
  4522. },
  4523. {
  4524. "watchRemove": {
  4525. "targetIds": [
  4526. 1
  4527. ]
  4528. }
  4529. },
  4530. {
  4531. "watchAck": [
  4532. 3
  4533. ]
  4534. },
  4535. {
  4536. "watchCurrent": [
  4537. [
  4538. 3
  4539. ],
  4540. "resume-token-2001"
  4541. ]
  4542. },
  4543. {
  4544. "watchSnapshot": {
  4545. "targetIds": [
  4546. ],
  4547. "version": 2001
  4548. },
  4549. "expectedSnapshotEvents": [
  4550. {
  4551. "errorCode": 0,
  4552. "fromCache": false,
  4553. "hasPendingWrites": false,
  4554. "query": {
  4555. "filters": [
  4556. ],
  4557. "orderBys": [
  4558. ],
  4559. "path": "collection"
  4560. },
  4561. "removed": [
  4562. {
  4563. "key": "collection/b",
  4564. "options": {
  4565. "hasCommittedMutations": false,
  4566. "hasLocalMutations": false
  4567. },
  4568. "value": {
  4569. "key": "b"
  4570. },
  4571. "version": 1001
  4572. }
  4573. ]
  4574. },
  4575. {
  4576. "added": [
  4577. {
  4578. "key": "collection/d",
  4579. "options": {
  4580. "hasCommittedMutations": false,
  4581. "hasLocalMutations": false
  4582. },
  4583. "value": {
  4584. "key": "d"
  4585. },
  4586. "version": 1003
  4587. }
  4588. ],
  4589. "errorCode": 0,
  4590. "fromCache": true,
  4591. "hasPendingWrites": false,
  4592. "query": {
  4593. "filters": [
  4594. ],
  4595. "limit": 2,
  4596. "limitType": "LimitToFirst",
  4597. "orderBys": [
  4598. ],
  4599. "path": "collection"
  4600. },
  4601. "removed": [
  4602. {
  4603. "key": "collection/b",
  4604. "options": {
  4605. "hasCommittedMutations": false,
  4606. "hasLocalMutations": false
  4607. },
  4608. "value": {
  4609. "key": "b"
  4610. },
  4611. "version": 1001
  4612. }
  4613. ]
  4614. }
  4615. ],
  4616. "expectedState": {
  4617. "activeLimboDocs": [
  4618. "collection/c",
  4619. "collection/d"
  4620. ],
  4621. "activeTargets": {
  4622. "2": {
  4623. "queries": [
  4624. {
  4625. "filters": [
  4626. ],
  4627. "limit": 2,
  4628. "limitType": "LimitToFirst",
  4629. "orderBys": [
  4630. ],
  4631. "path": "collection"
  4632. }
  4633. ],
  4634. "resumeToken": ""
  4635. },
  4636. "4": {
  4637. "queries": [
  4638. {
  4639. "filters": [
  4640. ],
  4641. "orderBys": [
  4642. ],
  4643. "path": "collection"
  4644. }
  4645. ],
  4646. "resumeToken": ""
  4647. },
  4648. "5": {
  4649. "queries": [
  4650. {
  4651. "filters": [
  4652. ],
  4653. "orderBys": [
  4654. ],
  4655. "path": "collection/c"
  4656. }
  4657. ],
  4658. "resumeToken": ""
  4659. },
  4660. "7": {
  4661. "queries": [
  4662. {
  4663. "filters": [
  4664. ],
  4665. "orderBys": [
  4666. ],
  4667. "path": "collection/d"
  4668. }
  4669. ],
  4670. "resumeToken": ""
  4671. }
  4672. }
  4673. }
  4674. },
  4675. {
  4676. "watchRemove": {
  4677. "targetIds": [
  4678. 3
  4679. ]
  4680. }
  4681. },
  4682. {
  4683. "watchAck": [
  4684. 5
  4685. ]
  4686. },
  4687. {
  4688. "watchCurrent": [
  4689. [
  4690. 5
  4691. ],
  4692. "resume-token-2002"
  4693. ]
  4694. },
  4695. {
  4696. "watchSnapshot": {
  4697. "targetIds": [
  4698. ],
  4699. "version": 2002
  4700. },
  4701. "expectedSnapshotEvents": [
  4702. {
  4703. "errorCode": 0,
  4704. "fromCache": false,
  4705. "hasPendingWrites": false,
  4706. "query": {
  4707. "filters": [
  4708. ],
  4709. "orderBys": [
  4710. ],
  4711. "path": "collection"
  4712. },
  4713. "removed": [
  4714. {
  4715. "key": "collection/c",
  4716. "options": {
  4717. "hasCommittedMutations": false,
  4718. "hasLocalMutations": false
  4719. },
  4720. "value": {
  4721. "key": "c"
  4722. },
  4723. "version": 1002
  4724. }
  4725. ]
  4726. },
  4727. {
  4728. "added": [
  4729. {
  4730. "key": "collection/e",
  4731. "options": {
  4732. "hasCommittedMutations": false,
  4733. "hasLocalMutations": false
  4734. },
  4735. "value": {
  4736. "key": "e"
  4737. },
  4738. "version": 1004
  4739. }
  4740. ],
  4741. "errorCode": 0,
  4742. "fromCache": true,
  4743. "hasPendingWrites": false,
  4744. "query": {
  4745. "filters": [
  4746. ],
  4747. "limit": 2,
  4748. "limitType": "LimitToFirst",
  4749. "orderBys": [
  4750. ],
  4751. "path": "collection"
  4752. },
  4753. "removed": [
  4754. {
  4755. "key": "collection/c",
  4756. "options": {
  4757. "hasCommittedMutations": false,
  4758. "hasLocalMutations": false
  4759. },
  4760. "value": {
  4761. "key": "c"
  4762. },
  4763. "version": 1002
  4764. }
  4765. ]
  4766. }
  4767. ],
  4768. "expectedState": {
  4769. "activeLimboDocs": [
  4770. "collection/d"
  4771. ],
  4772. "activeTargets": {
  4773. "2": {
  4774. "queries": [
  4775. {
  4776. "filters": [
  4777. ],
  4778. "limit": 2,
  4779. "limitType": "LimitToFirst",
  4780. "orderBys": [
  4781. ],
  4782. "path": "collection"
  4783. }
  4784. ],
  4785. "resumeToken": ""
  4786. },
  4787. "4": {
  4788. "queries": [
  4789. {
  4790. "filters": [
  4791. ],
  4792. "orderBys": [
  4793. ],
  4794. "path": "collection"
  4795. }
  4796. ],
  4797. "resumeToken": ""
  4798. },
  4799. "7": {
  4800. "queries": [
  4801. {
  4802. "filters": [
  4803. ],
  4804. "orderBys": [
  4805. ],
  4806. "path": "collection/d"
  4807. }
  4808. ],
  4809. "resumeToken": ""
  4810. }
  4811. }
  4812. }
  4813. },
  4814. {
  4815. "watchRemove": {
  4816. "targetIds": [
  4817. 5
  4818. ]
  4819. }
  4820. },
  4821. {
  4822. "watchAck": [
  4823. 7
  4824. ]
  4825. },
  4826. {
  4827. "watchCurrent": [
  4828. [
  4829. 7
  4830. ],
  4831. "resume-token-2003"
  4832. ]
  4833. },
  4834. {
  4835. "watchSnapshot": {
  4836. "targetIds": [
  4837. ],
  4838. "version": 2003
  4839. },
  4840. "expectedSnapshotEvents": [
  4841. {
  4842. "errorCode": 0,
  4843. "fromCache": false,
  4844. "hasPendingWrites": false,
  4845. "query": {
  4846. "filters": [
  4847. ],
  4848. "orderBys": [
  4849. ],
  4850. "path": "collection"
  4851. },
  4852. "removed": [
  4853. {
  4854. "key": "collection/d",
  4855. "options": {
  4856. "hasCommittedMutations": false,
  4857. "hasLocalMutations": false
  4858. },
  4859. "value": {
  4860. "key": "d"
  4861. },
  4862. "version": 1003
  4863. }
  4864. ]
  4865. },
  4866. {
  4867. "added": [
  4868. {
  4869. "key": "collection/f",
  4870. "options": {
  4871. "hasCommittedMutations": false,
  4872. "hasLocalMutations": false
  4873. },
  4874. "value": {
  4875. "key": "f"
  4876. },
  4877. "version": 1005
  4878. }
  4879. ],
  4880. "errorCode": 0,
  4881. "fromCache": false,
  4882. "hasPendingWrites": false,
  4883. "query": {
  4884. "filters": [
  4885. ],
  4886. "limit": 2,
  4887. "limitType": "LimitToFirst",
  4888. "orderBys": [
  4889. ],
  4890. "path": "collection"
  4891. },
  4892. "removed": [
  4893. {
  4894. "key": "collection/d",
  4895. "options": {
  4896. "hasCommittedMutations": false,
  4897. "hasLocalMutations": false
  4898. },
  4899. "value": {
  4900. "key": "d"
  4901. },
  4902. "version": 1003
  4903. }
  4904. ]
  4905. }
  4906. ],
  4907. "expectedState": {
  4908. "activeLimboDocs": [
  4909. ],
  4910. "activeTargets": {
  4911. "2": {
  4912. "queries": [
  4913. {
  4914. "filters": [
  4915. ],
  4916. "limit": 2,
  4917. "limitType": "LimitToFirst",
  4918. "orderBys": [
  4919. ],
  4920. "path": "collection"
  4921. }
  4922. ],
  4923. "resumeToken": ""
  4924. },
  4925. "4": {
  4926. "queries": [
  4927. {
  4928. "filters": [
  4929. ],
  4930. "orderBys": [
  4931. ],
  4932. "path": "collection"
  4933. }
  4934. ],
  4935. "resumeToken": ""
  4936. }
  4937. }
  4938. }
  4939. },
  4940. {
  4941. "watchRemove": {
  4942. "targetIds": [
  4943. 7
  4944. ]
  4945. }
  4946. }
  4947. ]
  4948. },
  4949. "Resumed limit queries exclude deleted documents ": {
  4950. "describeName": "Limits:",
  4951. "itName": "Resumed limit queries exclude deleted documents ",
  4952. "tags": [
  4953. "durable-persistence"
  4954. ],
  4955. "config": {
  4956. "numClients": 1,
  4957. "useGarbageCollection": false
  4958. },
  4959. "steps": [
  4960. {
  4961. "userListen": {
  4962. "query": {
  4963. "filters": [
  4964. ],
  4965. "limit": 1,
  4966. "limitType": "LimitToFirst",
  4967. "orderBys": [
  4968. [
  4969. "a",
  4970. "asc"
  4971. ]
  4972. ],
  4973. "path": "collection"
  4974. },
  4975. "targetId": 2
  4976. },
  4977. "expectedState": {
  4978. "activeTargets": {
  4979. "2": {
  4980. "queries": [
  4981. {
  4982. "filters": [
  4983. ],
  4984. "limit": 1,
  4985. "limitType": "LimitToFirst",
  4986. "orderBys": [
  4987. [
  4988. "a",
  4989. "asc"
  4990. ]
  4991. ],
  4992. "path": "collection"
  4993. }
  4994. ],
  4995. "resumeToken": ""
  4996. }
  4997. }
  4998. }
  4999. },
  5000. {
  5001. "watchAck": [
  5002. 2
  5003. ]
  5004. },
  5005. {
  5006. "watchEntity": {
  5007. "docs": [
  5008. {
  5009. "key": "collection/a",
  5010. "options": {
  5011. "hasCommittedMutations": false,
  5012. "hasLocalMutations": false
  5013. },
  5014. "value": {
  5015. "a": 1
  5016. },
  5017. "version": 1001
  5018. }
  5019. ],
  5020. "targets": [
  5021. 2
  5022. ]
  5023. }
  5024. },
  5025. {
  5026. "watchCurrent": [
  5027. [
  5028. 2
  5029. ],
  5030. "resume-token-1001"
  5031. ]
  5032. },
  5033. {
  5034. "watchSnapshot": {
  5035. "targetIds": [
  5036. ],
  5037. "version": 1001
  5038. },
  5039. "expectedSnapshotEvents": [
  5040. {
  5041. "added": [
  5042. {
  5043. "key": "collection/a",
  5044. "options": {
  5045. "hasCommittedMutations": false,
  5046. "hasLocalMutations": false
  5047. },
  5048. "value": {
  5049. "a": 1
  5050. },
  5051. "version": 1001
  5052. }
  5053. ],
  5054. "errorCode": 0,
  5055. "fromCache": false,
  5056. "hasPendingWrites": false,
  5057. "query": {
  5058. "filters": [
  5059. ],
  5060. "limit": 1,
  5061. "limitType": "LimitToFirst",
  5062. "orderBys": [
  5063. [
  5064. "a",
  5065. "asc"
  5066. ]
  5067. ],
  5068. "path": "collection"
  5069. }
  5070. }
  5071. ]
  5072. },
  5073. {
  5074. "userUnlisten": [
  5075. 2,
  5076. {
  5077. "filters": [
  5078. ],
  5079. "limit": 1,
  5080. "limitType": "LimitToFirst",
  5081. "orderBys": [
  5082. [
  5083. "a",
  5084. "asc"
  5085. ]
  5086. ],
  5087. "path": "collection"
  5088. }
  5089. ],
  5090. "expectedState": {
  5091. "activeTargets": {
  5092. }
  5093. }
  5094. },
  5095. {
  5096. "watchRemove": {
  5097. "targetIds": [
  5098. 2
  5099. ]
  5100. }
  5101. },
  5102. {
  5103. "userListen": {
  5104. "query": {
  5105. "filters": [
  5106. ],
  5107. "orderBys": [
  5108. [
  5109. "a",
  5110. "asc"
  5111. ]
  5112. ],
  5113. "path": "collection"
  5114. },
  5115. "targetId": 4
  5116. },
  5117. "expectedSnapshotEvents": [
  5118. {
  5119. "added": [
  5120. {
  5121. "key": "collection/a",
  5122. "options": {
  5123. "hasCommittedMutations": false,
  5124. "hasLocalMutations": false
  5125. },
  5126. "value": {
  5127. "a": 1
  5128. },
  5129. "version": 1001
  5130. }
  5131. ],
  5132. "errorCode": 0,
  5133. "fromCache": true,
  5134. "hasPendingWrites": false,
  5135. "query": {
  5136. "filters": [
  5137. ],
  5138. "orderBys": [
  5139. [
  5140. "a",
  5141. "asc"
  5142. ]
  5143. ],
  5144. "path": "collection"
  5145. }
  5146. }
  5147. ],
  5148. "expectedState": {
  5149. "activeTargets": {
  5150. "4": {
  5151. "queries": [
  5152. {
  5153. "filters": [
  5154. ],
  5155. "orderBys": [
  5156. [
  5157. "a",
  5158. "asc"
  5159. ]
  5160. ],
  5161. "path": "collection"
  5162. }
  5163. ],
  5164. "resumeToken": ""
  5165. }
  5166. }
  5167. }
  5168. },
  5169. {
  5170. "watchAck": [
  5171. 4
  5172. ]
  5173. },
  5174. {
  5175. "watchEntity": {
  5176. "docs": [
  5177. {
  5178. "key": "collection/a",
  5179. "options": {
  5180. "hasCommittedMutations": false,
  5181. "hasLocalMutations": false
  5182. },
  5183. "value": {
  5184. "a": 1
  5185. },
  5186. "version": 1001
  5187. },
  5188. {
  5189. "key": "collection/b",
  5190. "options": {
  5191. "hasCommittedMutations": false,
  5192. "hasLocalMutations": false
  5193. },
  5194. "value": {
  5195. "a": 2
  5196. },
  5197. "version": 1000
  5198. }
  5199. ],
  5200. "targets": [
  5201. 4
  5202. ]
  5203. }
  5204. },
  5205. {
  5206. "watchCurrent": [
  5207. [
  5208. 4
  5209. ],
  5210. "resume-token-1002"
  5211. ]
  5212. },
  5213. {
  5214. "watchSnapshot": {
  5215. "targetIds": [
  5216. ],
  5217. "version": 1002
  5218. },
  5219. "expectedSnapshotEvents": [
  5220. {
  5221. "added": [
  5222. {
  5223. "key": "collection/b",
  5224. "options": {
  5225. "hasCommittedMutations": false,
  5226. "hasLocalMutations": false
  5227. },
  5228. "value": {
  5229. "a": 2
  5230. },
  5231. "version": 1000
  5232. }
  5233. ],
  5234. "errorCode": 0,
  5235. "fromCache": false,
  5236. "hasPendingWrites": false,
  5237. "query": {
  5238. "filters": [
  5239. ],
  5240. "orderBys": [
  5241. [
  5242. "a",
  5243. "asc"
  5244. ]
  5245. ],
  5246. "path": "collection"
  5247. }
  5248. }
  5249. ]
  5250. },
  5251. {
  5252. "watchEntity": {
  5253. "key": "collection/a",
  5254. "removedTargets": [
  5255. 4
  5256. ]
  5257. }
  5258. },
  5259. {
  5260. "watchSnapshot": {
  5261. "targetIds": [
  5262. ],
  5263. "version": 1003
  5264. },
  5265. "expectedSnapshotEvents": [
  5266. {
  5267. "errorCode": 0,
  5268. "fromCache": true,
  5269. "hasPendingWrites": false,
  5270. "query": {
  5271. "filters": [
  5272. ],
  5273. "orderBys": [
  5274. [
  5275. "a",
  5276. "asc"
  5277. ]
  5278. ],
  5279. "path": "collection"
  5280. }
  5281. }
  5282. ],
  5283. "expectedState": {
  5284. "activeLimboDocs": [
  5285. "collection/a"
  5286. ],
  5287. "activeTargets": {
  5288. "1": {
  5289. "queries": [
  5290. {
  5291. "filters": [
  5292. ],
  5293. "orderBys": [
  5294. ],
  5295. "path": "collection/a"
  5296. }
  5297. ],
  5298. "resumeToken": ""
  5299. },
  5300. "4": {
  5301. "queries": [
  5302. {
  5303. "filters": [
  5304. ],
  5305. "orderBys": [
  5306. [
  5307. "a",
  5308. "asc"
  5309. ]
  5310. ],
  5311. "path": "collection"
  5312. }
  5313. ],
  5314. "resumeToken": ""
  5315. }
  5316. }
  5317. }
  5318. },
  5319. {
  5320. "userUnlisten": [
  5321. 4,
  5322. {
  5323. "filters": [
  5324. ],
  5325. "orderBys": [
  5326. [
  5327. "a",
  5328. "asc"
  5329. ]
  5330. ],
  5331. "path": "collection"
  5332. }
  5333. ],
  5334. "expectedState": {
  5335. "activeLimboDocs": [
  5336. ],
  5337. "activeTargets": {
  5338. }
  5339. }
  5340. },
  5341. {
  5342. "watchRemove": {
  5343. "targetIds": [
  5344. 4
  5345. ]
  5346. }
  5347. },
  5348. {
  5349. "restart": true,
  5350. "expectedState": {
  5351. "activeLimboDocs": [
  5352. ],
  5353. "activeTargets": {
  5354. },
  5355. "enqueuedLimboDocs": [
  5356. ]
  5357. }
  5358. },
  5359. {
  5360. "userListen": {
  5361. "query": {
  5362. "filters": [
  5363. ],
  5364. "limit": 1,
  5365. "limitType": "LimitToFirst",
  5366. "orderBys": [
  5367. [
  5368. "a",
  5369. "asc"
  5370. ]
  5371. ],
  5372. "path": "collection"
  5373. },
  5374. "targetId": 2
  5375. },
  5376. "expectedSnapshotEvents": [
  5377. {
  5378. "added": [
  5379. {
  5380. "key": "collection/a",
  5381. "options": {
  5382. "hasCommittedMutations": false,
  5383. "hasLocalMutations": false
  5384. },
  5385. "value": {
  5386. "a": 1
  5387. },
  5388. "version": 1001
  5389. }
  5390. ],
  5391. "errorCode": 0,
  5392. "fromCache": true,
  5393. "hasPendingWrites": false,
  5394. "query": {
  5395. "filters": [
  5396. ],
  5397. "limit": 1,
  5398. "limitType": "LimitToFirst",
  5399. "orderBys": [
  5400. [
  5401. "a",
  5402. "asc"
  5403. ]
  5404. ],
  5405. "path": "collection"
  5406. }
  5407. }
  5408. ],
  5409. "expectedState": {
  5410. "activeTargets": {
  5411. "2": {
  5412. "queries": [
  5413. {
  5414. "filters": [
  5415. ],
  5416. "limit": 1,
  5417. "limitType": "LimitToFirst",
  5418. "orderBys": [
  5419. [
  5420. "a",
  5421. "asc"
  5422. ]
  5423. ],
  5424. "path": "collection"
  5425. }
  5426. ],
  5427. "resumeToken": "resume-token-1001"
  5428. }
  5429. }
  5430. }
  5431. },
  5432. {
  5433. "watchAck": [
  5434. 2
  5435. ]
  5436. },
  5437. {
  5438. "watchEntity": {
  5439. "docs": [
  5440. {
  5441. "key": "collection/b",
  5442. "options": {
  5443. "hasCommittedMutations": false,
  5444. "hasLocalMutations": false
  5445. },
  5446. "value": {
  5447. "a": 2
  5448. },
  5449. "version": 1000
  5450. }
  5451. ],
  5452. "targets": [
  5453. 2
  5454. ]
  5455. }
  5456. },
  5457. {
  5458. "watchFilter": [
  5459. [
  5460. 2
  5461. ],
  5462. "collection/b"
  5463. ]
  5464. },
  5465. {
  5466. "watchSnapshot": {
  5467. "targetIds": [
  5468. ],
  5469. "version": 1004
  5470. },
  5471. "expectedState": {
  5472. "activeTargets": {
  5473. "2": {
  5474. "queries": [
  5475. {
  5476. "filters": [
  5477. ],
  5478. "limit": 1,
  5479. "limitType": "LimitToFirst",
  5480. "orderBys": [
  5481. [
  5482. "a",
  5483. "asc"
  5484. ]
  5485. ],
  5486. "path": "collection"
  5487. }
  5488. ],
  5489. "resumeToken": ""
  5490. }
  5491. }
  5492. }
  5493. },
  5494. {
  5495. "watchRemove": {
  5496. "targetIds": [
  5497. 2
  5498. ]
  5499. }
  5500. },
  5501. {
  5502. "watchAck": [
  5503. 2
  5504. ]
  5505. },
  5506. {
  5507. "watchEntity": {
  5508. "docs": [
  5509. {
  5510. "key": "collection/b",
  5511. "options": {
  5512. "hasCommittedMutations": false,
  5513. "hasLocalMutations": false
  5514. },
  5515. "value": {
  5516. "a": 2
  5517. },
  5518. "version": 1000
  5519. }
  5520. ],
  5521. "targets": [
  5522. 2
  5523. ]
  5524. }
  5525. },
  5526. {
  5527. "watchCurrent": [
  5528. [
  5529. 2
  5530. ],
  5531. "resume-token-1005"
  5532. ]
  5533. },
  5534. {
  5535. "watchSnapshot": {
  5536. "targetIds": [
  5537. ],
  5538. "version": 1005
  5539. },
  5540. "expectedState": {
  5541. "activeLimboDocs": [
  5542. "collection/a"
  5543. ],
  5544. "activeTargets": {
  5545. "1": {
  5546. "queries": [
  5547. {
  5548. "filters": [
  5549. ],
  5550. "orderBys": [
  5551. ],
  5552. "path": "collection/a"
  5553. }
  5554. ],
  5555. "resumeToken": ""
  5556. },
  5557. "2": {
  5558. "queries": [
  5559. {
  5560. "filters": [
  5561. ],
  5562. "limit": 1,
  5563. "limitType": "LimitToFirst",
  5564. "orderBys": [
  5565. [
  5566. "a",
  5567. "asc"
  5568. ]
  5569. ],
  5570. "path": "collection"
  5571. }
  5572. ],
  5573. "resumeToken": ""
  5574. }
  5575. }
  5576. }
  5577. },
  5578. {
  5579. "watchAck": [
  5580. 1
  5581. ]
  5582. },
  5583. {
  5584. "watchCurrent": [
  5585. [
  5586. 1
  5587. ],
  5588. "resume-token-1006"
  5589. ]
  5590. },
  5591. {
  5592. "watchSnapshot": {
  5593. "targetIds": [
  5594. ],
  5595. "version": 1006
  5596. },
  5597. "expectedSnapshotEvents": [
  5598. {
  5599. "added": [
  5600. {
  5601. "key": "collection/b",
  5602. "options": {
  5603. "hasCommittedMutations": false,
  5604. "hasLocalMutations": false
  5605. },
  5606. "value": {
  5607. "a": 2
  5608. },
  5609. "version": 1000
  5610. }
  5611. ],
  5612. "errorCode": 0,
  5613. "fromCache": false,
  5614. "hasPendingWrites": false,
  5615. "query": {
  5616. "filters": [
  5617. ],
  5618. "limit": 1,
  5619. "limitType": "LimitToFirst",
  5620. "orderBys": [
  5621. [
  5622. "a",
  5623. "asc"
  5624. ]
  5625. ],
  5626. "path": "collection"
  5627. },
  5628. "removed": [
  5629. {
  5630. "key": "collection/a",
  5631. "options": {
  5632. "hasCommittedMutations": false,
  5633. "hasLocalMutations": false
  5634. },
  5635. "value": {
  5636. "a": 1
  5637. },
  5638. "version": 1001
  5639. }
  5640. ]
  5641. }
  5642. ],
  5643. "expectedState": {
  5644. "activeLimboDocs": [
  5645. ],
  5646. "activeTargets": {
  5647. "2": {
  5648. "queries": [
  5649. {
  5650. "filters": [
  5651. ],
  5652. "limit": 1,
  5653. "limitType": "LimitToFirst",
  5654. "orderBys": [
  5655. [
  5656. "a",
  5657. "asc"
  5658. ]
  5659. ],
  5660. "path": "collection"
  5661. }
  5662. ],
  5663. "resumeToken": ""
  5664. }
  5665. }
  5666. }
  5667. }
  5668. ]
  5669. },
  5670. "Resumed limit queries use updated documents ": {
  5671. "describeName": "Limits:",
  5672. "itName": "Resumed limit queries use updated documents ",
  5673. "tags": [
  5674. ],
  5675. "config": {
  5676. "numClients": 1,
  5677. "useGarbageCollection": false
  5678. },
  5679. "steps": [
  5680. {
  5681. "userListen": {
  5682. "query": {
  5683. "filters": [
  5684. ],
  5685. "limit": 1,
  5686. "limitType": "LimitToFirst",
  5687. "orderBys": [
  5688. [
  5689. "a",
  5690. "asc"
  5691. ]
  5692. ],
  5693. "path": "collection"
  5694. },
  5695. "targetId": 2
  5696. },
  5697. "expectedState": {
  5698. "activeTargets": {
  5699. "2": {
  5700. "queries": [
  5701. {
  5702. "filters": [
  5703. ],
  5704. "limit": 1,
  5705. "limitType": "LimitToFirst",
  5706. "orderBys": [
  5707. [
  5708. "a",
  5709. "asc"
  5710. ]
  5711. ],
  5712. "path": "collection"
  5713. }
  5714. ],
  5715. "resumeToken": ""
  5716. }
  5717. }
  5718. }
  5719. },
  5720. {
  5721. "watchAck": [
  5722. 2
  5723. ]
  5724. },
  5725. {
  5726. "watchEntity": {
  5727. "docs": [
  5728. {
  5729. "key": "collection/a",
  5730. "options": {
  5731. "hasCommittedMutations": false,
  5732. "hasLocalMutations": false
  5733. },
  5734. "value": {
  5735. "a": 1
  5736. },
  5737. "version": 2001
  5738. }
  5739. ],
  5740. "targets": [
  5741. 2
  5742. ]
  5743. }
  5744. },
  5745. {
  5746. "watchCurrent": [
  5747. [
  5748. 2
  5749. ],
  5750. "resume-token-2001"
  5751. ]
  5752. },
  5753. {
  5754. "watchSnapshot": {
  5755. "targetIds": [
  5756. ],
  5757. "version": 2001
  5758. },
  5759. "expectedSnapshotEvents": [
  5760. {
  5761. "added": [
  5762. {
  5763. "key": "collection/a",
  5764. "options": {
  5765. "hasCommittedMutations": false,
  5766. "hasLocalMutations": false
  5767. },
  5768. "value": {
  5769. "a": 1
  5770. },
  5771. "version": 2001
  5772. }
  5773. ],
  5774. "errorCode": 0,
  5775. "fromCache": false,
  5776. "hasPendingWrites": false,
  5777. "query": {
  5778. "filters": [
  5779. ],
  5780. "limit": 1,
  5781. "limitType": "LimitToFirst",
  5782. "orderBys": [
  5783. [
  5784. "a",
  5785. "asc"
  5786. ]
  5787. ],
  5788. "path": "collection"
  5789. }
  5790. }
  5791. ]
  5792. },
  5793. {
  5794. "userUnlisten": [
  5795. 2,
  5796. {
  5797. "filters": [
  5798. ],
  5799. "limit": 1,
  5800. "limitType": "LimitToFirst",
  5801. "orderBys": [
  5802. [
  5803. "a",
  5804. "asc"
  5805. ]
  5806. ],
  5807. "path": "collection"
  5808. }
  5809. ],
  5810. "expectedState": {
  5811. "activeTargets": {
  5812. }
  5813. }
  5814. },
  5815. {
  5816. "watchRemove": {
  5817. "targetIds": [
  5818. 2
  5819. ]
  5820. }
  5821. },
  5822. {
  5823. "userListen": {
  5824. "query": {
  5825. "filters": [
  5826. ],
  5827. "orderBys": [
  5828. [
  5829. "a",
  5830. "asc"
  5831. ]
  5832. ],
  5833. "path": "collection"
  5834. },
  5835. "targetId": 4
  5836. },
  5837. "expectedSnapshotEvents": [
  5838. {
  5839. "added": [
  5840. {
  5841. "key": "collection/a",
  5842. "options": {
  5843. "hasCommittedMutations": false,
  5844. "hasLocalMutations": false
  5845. },
  5846. "value": {
  5847. "a": 1
  5848. },
  5849. "version": 2001
  5850. }
  5851. ],
  5852. "errorCode": 0,
  5853. "fromCache": true,
  5854. "hasPendingWrites": false,
  5855. "query": {
  5856. "filters": [
  5857. ],
  5858. "orderBys": [
  5859. [
  5860. "a",
  5861. "asc"
  5862. ]
  5863. ],
  5864. "path": "collection"
  5865. }
  5866. }
  5867. ],
  5868. "expectedState": {
  5869. "activeTargets": {
  5870. "4": {
  5871. "queries": [
  5872. {
  5873. "filters": [
  5874. ],
  5875. "orderBys": [
  5876. [
  5877. "a",
  5878. "asc"
  5879. ]
  5880. ],
  5881. "path": "collection"
  5882. }
  5883. ],
  5884. "resumeToken": ""
  5885. }
  5886. }
  5887. }
  5888. },
  5889. {
  5890. "watchAck": [
  5891. 4
  5892. ]
  5893. },
  5894. {
  5895. "watchEntity": {
  5896. "docs": [
  5897. {
  5898. "key": "collection/a",
  5899. "options": {
  5900. "hasCommittedMutations": false,
  5901. "hasLocalMutations": false
  5902. },
  5903. "value": {
  5904. "a": 3
  5905. },
  5906. "version": 2003
  5907. },
  5908. {
  5909. "key": "collection/c",
  5910. "options": {
  5911. "hasCommittedMutations": false,
  5912. "hasLocalMutations": false
  5913. },
  5914. "value": {
  5915. "a": 2
  5916. },
  5917. "version": 1000
  5918. }
  5919. ],
  5920. "targets": [
  5921. 4
  5922. ]
  5923. }
  5924. },
  5925. {
  5926. "watchCurrent": [
  5927. [
  5928. 4
  5929. ],
  5930. "resume-token-2003"
  5931. ]
  5932. },
  5933. {
  5934. "watchSnapshot": {
  5935. "targetIds": [
  5936. ],
  5937. "version": 2003
  5938. },
  5939. "expectedSnapshotEvents": [
  5940. {
  5941. "added": [
  5942. {
  5943. "key": "collection/c",
  5944. "options": {
  5945. "hasCommittedMutations": false,
  5946. "hasLocalMutations": false
  5947. },
  5948. "value": {
  5949. "a": 2
  5950. },
  5951. "version": 1000
  5952. }
  5953. ],
  5954. "errorCode": 0,
  5955. "fromCache": false,
  5956. "hasPendingWrites": false,
  5957. "modified": [
  5958. {
  5959. "key": "collection/a",
  5960. "options": {
  5961. "hasCommittedMutations": false,
  5962. "hasLocalMutations": false
  5963. },
  5964. "value": {
  5965. "a": 3
  5966. },
  5967. "version": 2003
  5968. }
  5969. ],
  5970. "query": {
  5971. "filters": [
  5972. ],
  5973. "orderBys": [
  5974. [
  5975. "a",
  5976. "asc"
  5977. ]
  5978. ],
  5979. "path": "collection"
  5980. }
  5981. }
  5982. ]
  5983. },
  5984. {
  5985. "userUnlisten": [
  5986. 4,
  5987. {
  5988. "filters": [
  5989. ],
  5990. "orderBys": [
  5991. [
  5992. "a",
  5993. "asc"
  5994. ]
  5995. ],
  5996. "path": "collection"
  5997. }
  5998. ],
  5999. "expectedState": {
  6000. "activeTargets": {
  6001. }
  6002. }
  6003. },
  6004. {
  6005. "watchRemove": {
  6006. "targetIds": [
  6007. 4
  6008. ]
  6009. }
  6010. },
  6011. {
  6012. "userListen": {
  6013. "query": {
  6014. "filters": [
  6015. ],
  6016. "limit": 1,
  6017. "limitType": "LimitToFirst",
  6018. "orderBys": [
  6019. [
  6020. "a",
  6021. "asc"
  6022. ]
  6023. ],
  6024. "path": "collection"
  6025. },
  6026. "targetId": 2
  6027. },
  6028. "expectedSnapshotEvents": [
  6029. {
  6030. "added": [
  6031. {
  6032. "key": "collection/c",
  6033. "options": {
  6034. "hasCommittedMutations": false,
  6035. "hasLocalMutations": false
  6036. },
  6037. "value": {
  6038. "a": 2
  6039. },
  6040. "version": 1000
  6041. }
  6042. ],
  6043. "errorCode": 0,
  6044. "fromCache": true,
  6045. "hasPendingWrites": false,
  6046. "query": {
  6047. "filters": [
  6048. ],
  6049. "limit": 1,
  6050. "limitType": "LimitToFirst",
  6051. "orderBys": [
  6052. [
  6053. "a",
  6054. "asc"
  6055. ]
  6056. ],
  6057. "path": "collection"
  6058. }
  6059. }
  6060. ],
  6061. "expectedState": {
  6062. "activeTargets": {
  6063. "2": {
  6064. "queries": [
  6065. {
  6066. "filters": [
  6067. ],
  6068. "limit": 1,
  6069. "limitType": "LimitToFirst",
  6070. "orderBys": [
  6071. [
  6072. "a",
  6073. "asc"
  6074. ]
  6075. ],
  6076. "path": "collection"
  6077. }
  6078. ],
  6079. "resumeToken": "resume-token-2001"
  6080. }
  6081. }
  6082. }
  6083. }
  6084. ]
  6085. }
  6086. }