write_spec_test.json 177 KB

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