limit_spec_test.json 123 KB

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