limit_spec_test.json 132 KB

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