persistence_spec_test.json 23 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172
  1. {
  2. "Local mutations are persisted and re-sent": {
  3. "describeName": "Persistence:",
  4. "itName": "Local mutations are persisted and re-sent",
  5. "tags": [],
  6. "config": {
  7. "useGarbageCollection": true,
  8. "numClients": 1
  9. },
  10. "steps": [
  11. {
  12. "userSet": [
  13. "collection/key1",
  14. {
  15. "foo": "bar"
  16. }
  17. ]
  18. },
  19. {
  20. "userSet": [
  21. "collection/key2",
  22. {
  23. "baz": "quu"
  24. }
  25. ]
  26. },
  27. {
  28. "restart": true,
  29. "stateExpect": {
  30. "activeTargets": {},
  31. "limboDocs": [],
  32. "numOutstandingWrites": 2
  33. }
  34. },
  35. {
  36. "writeAck": {
  37. "version": 1
  38. }
  39. },
  40. {
  41. "writeAck": {
  42. "version": 2
  43. },
  44. "stateExpect": {
  45. "numOutstandingWrites": 0
  46. }
  47. }
  48. ]
  49. },
  50. "Persisted local mutations are visible to listeners": {
  51. "describeName": "Persistence:",
  52. "itName": "Persisted local mutations are visible to listeners",
  53. "tags": [],
  54. "config": {
  55. "useGarbageCollection": true,
  56. "numClients": 1
  57. },
  58. "steps": [
  59. {
  60. "userSet": [
  61. "collection/key1",
  62. {
  63. "foo": "bar"
  64. }
  65. ]
  66. },
  67. {
  68. "userSet": [
  69. "collection/key2",
  70. {
  71. "baz": "quu"
  72. }
  73. ]
  74. },
  75. {
  76. "restart": true,
  77. "stateExpect": {
  78. "activeTargets": {},
  79. "limboDocs": []
  80. }
  81. },
  82. {
  83. "userListen": [
  84. 2,
  85. {
  86. "path": "collection",
  87. "filters": [],
  88. "orderBys": []
  89. }
  90. ],
  91. "stateExpect": {
  92. "activeTargets": {
  93. "2": {
  94. "query": {
  95. "path": "collection",
  96. "filters": [],
  97. "orderBys": []
  98. },
  99. "resumeToken": ""
  100. }
  101. }
  102. },
  103. "expect": [
  104. {
  105. "query": {
  106. "path": "collection",
  107. "filters": [],
  108. "orderBys": []
  109. },
  110. "added": [
  111. [
  112. "collection/key1",
  113. 0,
  114. {
  115. "foo": "bar"
  116. },
  117. "local"
  118. ],
  119. [
  120. "collection/key2",
  121. 0,
  122. {
  123. "baz": "quu"
  124. },
  125. "local"
  126. ]
  127. ],
  128. "errorCode": 0,
  129. "fromCache": true,
  130. "hasPendingWrites": true
  131. }
  132. ]
  133. }
  134. ]
  135. },
  136. "Remote documents are persisted": {
  137. "describeName": "Persistence:",
  138. "itName": "Remote documents are persisted",
  139. "tags": [],
  140. "config": {
  141. "useGarbageCollection": true,
  142. "numClients": 1
  143. },
  144. "steps": [
  145. {
  146. "userListen": [
  147. 2,
  148. {
  149. "path": "collection",
  150. "filters": [],
  151. "orderBys": []
  152. }
  153. ],
  154. "stateExpect": {
  155. "activeTargets": {
  156. "2": {
  157. "query": {
  158. "path": "collection",
  159. "filters": [],
  160. "orderBys": []
  161. },
  162. "resumeToken": ""
  163. }
  164. }
  165. }
  166. },
  167. {
  168. "watchAck": [
  169. 2
  170. ]
  171. },
  172. {
  173. "watchEntity": {
  174. "docs": [
  175. [
  176. "collection/key",
  177. 1000,
  178. {
  179. "foo": "bar"
  180. }
  181. ]
  182. ],
  183. "targets": [
  184. 2
  185. ]
  186. }
  187. },
  188. {
  189. "watchCurrent": [
  190. [
  191. 2
  192. ],
  193. "resume-token-1000"
  194. ]
  195. },
  196. {
  197. "watchSnapshot": {
  198. "version": 1000
  199. },
  200. "expect": [
  201. {
  202. "query": {
  203. "path": "collection",
  204. "filters": [],
  205. "orderBys": []
  206. },
  207. "added": [
  208. [
  209. "collection/key",
  210. 1000,
  211. {
  212. "foo": "bar"
  213. }
  214. ]
  215. ],
  216. "errorCode": 0,
  217. "fromCache": false,
  218. "hasPendingWrites": false
  219. }
  220. ]
  221. },
  222. {
  223. "restart": true,
  224. "stateExpect": {
  225. "activeTargets": {},
  226. "limboDocs": []
  227. }
  228. },
  229. {
  230. "userListen": [
  231. 2,
  232. {
  233. "path": "collection",
  234. "filters": [],
  235. "orderBys": []
  236. }
  237. ],
  238. "stateExpect": {
  239. "activeTargets": {
  240. "2": {
  241. "query": {
  242. "path": "collection",
  243. "filters": [],
  244. "orderBys": []
  245. },
  246. "resumeToken": "resume-token-1000"
  247. }
  248. }
  249. },
  250. "expect": [
  251. {
  252. "query": {
  253. "path": "collection",
  254. "filters": [],
  255. "orderBys": []
  256. },
  257. "added": [
  258. [
  259. "collection/key",
  260. 1000,
  261. {
  262. "foo": "bar"
  263. }
  264. ]
  265. ],
  266. "errorCode": 0,
  267. "fromCache": true,
  268. "hasPendingWrites": false
  269. }
  270. ]
  271. }
  272. ]
  273. },
  274. "Remote documents from watch are not GC'd": {
  275. "describeName": "Persistence:",
  276. "itName": "Remote documents from watch are not GC'd",
  277. "tags": [],
  278. "config": {
  279. "useGarbageCollection": false,
  280. "numClients": 1
  281. },
  282. "steps": [
  283. {
  284. "userListen": [
  285. 2,
  286. {
  287. "path": "collection",
  288. "filters": [],
  289. "orderBys": []
  290. }
  291. ],
  292. "stateExpect": {
  293. "activeTargets": {
  294. "2": {
  295. "query": {
  296. "path": "collection",
  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. "foo": "bar"
  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",
  342. "filters": [],
  343. "orderBys": []
  344. },
  345. "added": [
  346. [
  347. "collection/key",
  348. 1000,
  349. {
  350. "foo": "bar"
  351. }
  352. ]
  353. ],
  354. "errorCode": 0,
  355. "fromCache": false,
  356. "hasPendingWrites": false
  357. }
  358. ]
  359. },
  360. {
  361. "userUnlisten": [
  362. 2,
  363. {
  364. "path": "collection",
  365. "filters": [],
  366. "orderBys": []
  367. }
  368. ],
  369. "stateExpect": {
  370. "activeTargets": {}
  371. }
  372. },
  373. {
  374. "userListen": [
  375. 2,
  376. {
  377. "path": "collection",
  378. "filters": [],
  379. "orderBys": []
  380. }
  381. ],
  382. "stateExpect": {
  383. "activeTargets": {
  384. "2": {
  385. "query": {
  386. "path": "collection",
  387. "filters": [],
  388. "orderBys": []
  389. },
  390. "resumeToken": "resume-token-1000"
  391. }
  392. }
  393. },
  394. "expect": [
  395. {
  396. "query": {
  397. "path": "collection",
  398. "filters": [],
  399. "orderBys": []
  400. },
  401. "added": [
  402. [
  403. "collection/key",
  404. 1000,
  405. {
  406. "foo": "bar"
  407. }
  408. ]
  409. ],
  410. "errorCode": 0,
  411. "fromCache": true,
  412. "hasPendingWrites": false
  413. }
  414. ]
  415. }
  416. ]
  417. },
  418. "Remote documents from user sets are not GC'd": {
  419. "describeName": "Persistence:",
  420. "itName": "Remote documents from user sets are not GC'd",
  421. "tags": [],
  422. "config": {
  423. "useGarbageCollection": false,
  424. "numClients": 1
  425. },
  426. "steps": [
  427. {
  428. "userSet": [
  429. "collection/key",
  430. {
  431. "foo": "bar"
  432. }
  433. ]
  434. },
  435. {
  436. "writeAck": {
  437. "version": 1000
  438. },
  439. "stateExpect": {
  440. "userCallbacks": {
  441. "acknowledgedDocs": [
  442. "collection/key"
  443. ],
  444. "rejectedDocs": []
  445. }
  446. }
  447. },
  448. {
  449. "userListen": [
  450. 2,
  451. {
  452. "path": "collection",
  453. "filters": [],
  454. "orderBys": []
  455. }
  456. ],
  457. "stateExpect": {
  458. "activeTargets": {
  459. "2": {
  460. "query": {
  461. "path": "collection",
  462. "filters": [],
  463. "orderBys": []
  464. },
  465. "resumeToken": ""
  466. }
  467. }
  468. },
  469. "expect": [
  470. {
  471. "query": {
  472. "path": "collection",
  473. "filters": [],
  474. "orderBys": []
  475. },
  476. "added": [
  477. [
  478. "collection/key",
  479. 0,
  480. {
  481. "foo": "bar"
  482. }
  483. ]
  484. ],
  485. "errorCode": 0,
  486. "fromCache": true,
  487. "hasPendingWrites": false
  488. }
  489. ]
  490. }
  491. ]
  492. },
  493. "Mutation Queue is persisted across uid switches": {
  494. "describeName": "Persistence:",
  495. "itName": "Mutation Queue is persisted across uid switches",
  496. "tags": [],
  497. "config": {
  498. "useGarbageCollection": true,
  499. "numClients": 1
  500. },
  501. "steps": [
  502. {
  503. "userSet": [
  504. "users/anon",
  505. {
  506. "uid": "anon"
  507. }
  508. ]
  509. },
  510. {
  511. "changeUser": "user1",
  512. "stateExpect": {
  513. "numOutstandingWrites": 0
  514. }
  515. },
  516. {
  517. "userSet": [
  518. "users/user1",
  519. {
  520. "uid": "user1"
  521. }
  522. ]
  523. },
  524. {
  525. "userSet": [
  526. "users/user1",
  527. {
  528. "uid": "user1",
  529. "extra": true
  530. }
  531. ]
  532. },
  533. {
  534. "changeUser": null,
  535. "stateExpect": {
  536. "numOutstandingWrites": 1
  537. }
  538. },
  539. {
  540. "writeAck": {
  541. "version": 1000
  542. },
  543. "stateExpect": {
  544. "userCallbacks": {
  545. "acknowledgedDocs": [
  546. "users/anon"
  547. ],
  548. "rejectedDocs": []
  549. }
  550. }
  551. },
  552. {
  553. "changeUser": "user1",
  554. "stateExpect": {
  555. "numOutstandingWrites": 2
  556. }
  557. },
  558. {
  559. "writeAck": {
  560. "version": 2000
  561. },
  562. "stateExpect": {
  563. "userCallbacks": {
  564. "acknowledgedDocs": [
  565. "users/user1"
  566. ],
  567. "rejectedDocs": []
  568. }
  569. }
  570. },
  571. {
  572. "writeAck": {
  573. "version": 3000
  574. },
  575. "stateExpect": {
  576. "userCallbacks": {
  577. "acknowledgedDocs": [
  578. "users/user1"
  579. ],
  580. "rejectedDocs": []
  581. }
  582. }
  583. }
  584. ]
  585. },
  586. "Mutation Queue is persisted across uid switches (with restarts)": {
  587. "describeName": "Persistence:",
  588. "itName": "Mutation Queue is persisted across uid switches (with restarts)",
  589. "tags": [],
  590. "config": {
  591. "useGarbageCollection": true,
  592. "numClients": 1
  593. },
  594. "steps": [
  595. {
  596. "userSet": [
  597. "users/anon",
  598. {
  599. "uid": "anon"
  600. }
  601. ]
  602. },
  603. {
  604. "changeUser": "user1",
  605. "stateExpect": {
  606. "numOutstandingWrites": 0
  607. }
  608. },
  609. {
  610. "userSet": [
  611. "users/user1",
  612. {
  613. "uid": "user1"
  614. }
  615. ]
  616. },
  617. {
  618. "userSet": [
  619. "users/user1",
  620. {
  621. "uid": "user1",
  622. "extra": true
  623. }
  624. ]
  625. },
  626. {
  627. "changeUser": null
  628. },
  629. {
  630. "restart": true,
  631. "stateExpect": {
  632. "activeTargets": {},
  633. "limboDocs": [],
  634. "numOutstandingWrites": 1
  635. }
  636. },
  637. {
  638. "writeAck": {
  639. "version": 1000
  640. }
  641. },
  642. {
  643. "changeUser": "user1"
  644. },
  645. {
  646. "restart": true,
  647. "stateExpect": {
  648. "activeTargets": {},
  649. "limboDocs": [],
  650. "numOutstandingWrites": 2
  651. }
  652. },
  653. {
  654. "writeAck": {
  655. "version": 2000
  656. }
  657. },
  658. {
  659. "writeAck": {
  660. "version": 3000
  661. }
  662. }
  663. ]
  664. },
  665. "Visible mutations reflect uid switches": {
  666. "describeName": "Persistence:",
  667. "itName": "Visible mutations reflect uid switches",
  668. "tags": [],
  669. "config": {
  670. "useGarbageCollection": true,
  671. "numClients": 1
  672. },
  673. "steps": [
  674. {
  675. "userListen": [
  676. 2,
  677. {
  678. "path": "users",
  679. "filters": [],
  680. "orderBys": []
  681. }
  682. ],
  683. "stateExpect": {
  684. "activeTargets": {
  685. "2": {
  686. "query": {
  687. "path": "users",
  688. "filters": [],
  689. "orderBys": []
  690. },
  691. "resumeToken": ""
  692. }
  693. }
  694. }
  695. },
  696. {
  697. "watchAck": [
  698. 2
  699. ]
  700. },
  701. {
  702. "watchEntity": {
  703. "docs": [
  704. [
  705. "users/existing",
  706. 0,
  707. {
  708. "uid": "existing"
  709. }
  710. ]
  711. ],
  712. "targets": [
  713. 2
  714. ]
  715. }
  716. },
  717. {
  718. "watchCurrent": [
  719. [
  720. 2
  721. ],
  722. "resume-token-500"
  723. ]
  724. },
  725. {
  726. "watchSnapshot": {
  727. "version": 500
  728. },
  729. "expect": [
  730. {
  731. "query": {
  732. "path": "users",
  733. "filters": [],
  734. "orderBys": []
  735. },
  736. "added": [
  737. [
  738. "users/existing",
  739. 0,
  740. {
  741. "uid": "existing"
  742. }
  743. ]
  744. ],
  745. "errorCode": 0,
  746. "fromCache": false,
  747. "hasPendingWrites": false
  748. }
  749. ]
  750. },
  751. {
  752. "userSet": [
  753. "users/anon",
  754. {
  755. "uid": "anon"
  756. }
  757. ],
  758. "expect": [
  759. {
  760. "query": {
  761. "path": "users",
  762. "filters": [],
  763. "orderBys": []
  764. },
  765. "added": [
  766. [
  767. "users/anon",
  768. 0,
  769. {
  770. "uid": "anon"
  771. },
  772. "local"
  773. ]
  774. ],
  775. "errorCode": 0,
  776. "fromCache": false,
  777. "hasPendingWrites": true
  778. }
  779. ]
  780. },
  781. {
  782. "changeUser": "user1",
  783. "stateExpect": {
  784. "activeTargets": {
  785. "2": {
  786. "query": {
  787. "path": "users",
  788. "filters": [],
  789. "orderBys": []
  790. },
  791. "resumeToken": "resume-token-500"
  792. }
  793. }
  794. },
  795. "expect": [
  796. {
  797. "query": {
  798. "path": "users",
  799. "filters": [],
  800. "orderBys": []
  801. },
  802. "removed": [
  803. [
  804. "users/anon",
  805. 0,
  806. {
  807. "uid": "anon"
  808. },
  809. "local"
  810. ]
  811. ],
  812. "errorCode": 0,
  813. "fromCache": false,
  814. "hasPendingWrites": false
  815. }
  816. ]
  817. },
  818. {
  819. "userSet": [
  820. "users/user1",
  821. {
  822. "uid": "user1"
  823. }
  824. ],
  825. "expect": [
  826. {
  827. "query": {
  828. "path": "users",
  829. "filters": [],
  830. "orderBys": []
  831. },
  832. "added": [
  833. [
  834. "users/user1",
  835. 0,
  836. {
  837. "uid": "user1"
  838. },
  839. "local"
  840. ]
  841. ],
  842. "errorCode": 0,
  843. "fromCache": false,
  844. "hasPendingWrites": true
  845. }
  846. ]
  847. },
  848. {
  849. "changeUser": null,
  850. "expect": [
  851. {
  852. "query": {
  853. "path": "users",
  854. "filters": [],
  855. "orderBys": []
  856. },
  857. "added": [
  858. [
  859. "users/anon",
  860. 0,
  861. {
  862. "uid": "anon"
  863. },
  864. "local"
  865. ]
  866. ],
  867. "removed": [
  868. [
  869. "users/user1",
  870. 0,
  871. {
  872. "uid": "user1"
  873. },
  874. "local"
  875. ]
  876. ],
  877. "errorCode": 0,
  878. "fromCache": false,
  879. "hasPendingWrites": true
  880. }
  881. ]
  882. }
  883. ]
  884. },
  885. "Detects all active clients": {
  886. "describeName": "Persistence:",
  887. "itName": "Detects all active clients",
  888. "tags": [
  889. "multi-client"
  890. ],
  891. "config": {
  892. "useGarbageCollection": false,
  893. "numClients": 2
  894. },
  895. "steps": [
  896. {
  897. "drainQueue": true,
  898. "clientIndex": 0
  899. },
  900. {
  901. "applyClientState": {
  902. "visibility": "hidden"
  903. },
  904. "stateExpect": {
  905. "numActiveClients": 1
  906. },
  907. "clientIndex": 0
  908. },
  909. {
  910. "drainQueue": true,
  911. "clientIndex": 1
  912. },
  913. {
  914. "applyClientState": {
  915. "visibility": "visible"
  916. },
  917. "stateExpect": {
  918. "numActiveClients": 2
  919. },
  920. "clientIndex": 1
  921. }
  922. ]
  923. },
  924. "Single tab acquires primary lease": {
  925. "describeName": "Persistence:",
  926. "itName": "Single tab acquires primary lease",
  927. "tags": [
  928. "multi-client"
  929. ],
  930. "config": {
  931. "useGarbageCollection": false,
  932. "numClients": 2
  933. },
  934. "steps": [
  935. {
  936. "drainQueue": true,
  937. "clientIndex": 0
  938. },
  939. {
  940. "applyClientState": {
  941. "visibility": "hidden"
  942. },
  943. "stateExpect": {
  944. "isPrimary": true
  945. },
  946. "clientIndex": 0
  947. },
  948. {
  949. "drainQueue": true,
  950. "clientIndex": 1
  951. },
  952. {
  953. "applyClientState": {
  954. "visibility": "hidden"
  955. },
  956. "stateExpect": {
  957. "isPrimary": false
  958. },
  959. "clientIndex": 1
  960. },
  961. {
  962. "drainQueue": true,
  963. "clientIndex": 0
  964. },
  965. {
  966. "shutdown": true,
  967. "stateExpect": {
  968. "activeTargets": {},
  969. "limboDocs": []
  970. },
  971. "clientIndex": 0
  972. },
  973. {
  974. "drainQueue": true,
  975. "clientIndex": 1
  976. },
  977. {
  978. "runTimer": "client_metadata_refresh",
  979. "stateExpect": {
  980. "isPrimary": true
  981. },
  982. "clientIndex": 1
  983. }
  984. ]
  985. },
  986. "Foreground tab acquires primary lease": {
  987. "describeName": "Persistence:",
  988. "itName": "Foreground tab acquires primary lease",
  989. "tags": [
  990. "multi-client"
  991. ],
  992. "config": {
  993. "useGarbageCollection": false,
  994. "numClients": 3
  995. },
  996. "steps": [
  997. {
  998. "drainQueue": true,
  999. "clientIndex": 0
  1000. },
  1001. {
  1002. "applyClientState": {
  1003. "visibility": "hidden"
  1004. },
  1005. "stateExpect": {
  1006. "isPrimary": true
  1007. },
  1008. "clientIndex": 0
  1009. },
  1010. {
  1011. "drainQueue": true,
  1012. "clientIndex": 1
  1013. },
  1014. {
  1015. "applyClientState": {
  1016. "visibility": "hidden"
  1017. },
  1018. "stateExpect": {
  1019. "isPrimary": false
  1020. },
  1021. "clientIndex": 1
  1022. },
  1023. {
  1024. "drainQueue": true,
  1025. "clientIndex": 2
  1026. },
  1027. {
  1028. "applyClientState": {
  1029. "visibility": "visible"
  1030. },
  1031. "stateExpect": {
  1032. "isPrimary": false
  1033. },
  1034. "clientIndex": 2
  1035. },
  1036. {
  1037. "drainQueue": true,
  1038. "clientIndex": 0
  1039. },
  1040. {
  1041. "shutdown": true,
  1042. "stateExpect": {
  1043. "activeTargets": {},
  1044. "limboDocs": []
  1045. },
  1046. "clientIndex": 0
  1047. },
  1048. {
  1049. "drainQueue": true,
  1050. "clientIndex": 1
  1051. },
  1052. {
  1053. "runTimer": "client_metadata_refresh",
  1054. "stateExpect": {
  1055. "isPrimary": false
  1056. },
  1057. "clientIndex": 1
  1058. },
  1059. {
  1060. "drainQueue": true,
  1061. "clientIndex": 2
  1062. },
  1063. {
  1064. "runTimer": "client_metadata_refresh",
  1065. "stateExpect": {
  1066. "isPrimary": true
  1067. },
  1068. "clientIndex": 2
  1069. }
  1070. ]
  1071. },
  1072. "Primary lease bound to network state": {
  1073. "describeName": "Persistence:",
  1074. "itName": "Primary lease bound to network state",
  1075. "tags": [
  1076. "multi-client"
  1077. ],
  1078. "config": {
  1079. "useGarbageCollection": false,
  1080. "numClients": 2
  1081. },
  1082. "steps": [
  1083. {
  1084. "drainQueue": true,
  1085. "stateExpect": {
  1086. "isPrimary": true
  1087. },
  1088. "clientIndex": 0
  1089. },
  1090. {
  1091. "enableNetwork": false,
  1092. "stateExpect": {
  1093. "activeTargets": {},
  1094. "limboDocs": [],
  1095. "isPrimary": true
  1096. },
  1097. "clientIndex": 0
  1098. },
  1099. {
  1100. "drainQueue": true,
  1101. "stateExpect": {
  1102. "isPrimary": false
  1103. },
  1104. "clientIndex": 1
  1105. },
  1106. {
  1107. "drainQueue": true,
  1108. "clientIndex": 0
  1109. },
  1110. {
  1111. "runTimer": "client_metadata_refresh",
  1112. "stateExpect": {
  1113. "isPrimary": false
  1114. },
  1115. "clientIndex": 0
  1116. },
  1117. {
  1118. "drainQueue": true,
  1119. "clientIndex": 1
  1120. },
  1121. {
  1122. "runTimer": "client_metadata_refresh",
  1123. "stateExpect": {
  1124. "isPrimary": true
  1125. },
  1126. "clientIndex": 1
  1127. },
  1128. {
  1129. "enableNetwork": false,
  1130. "stateExpect": {
  1131. "activeTargets": {},
  1132. "limboDocs": [],
  1133. "isPrimary": true
  1134. },
  1135. "clientIndex": 1
  1136. },
  1137. {
  1138. "drainQueue": true,
  1139. "clientIndex": 0
  1140. },
  1141. {
  1142. "enableNetwork": true,
  1143. "stateExpect": {
  1144. "isPrimary": false
  1145. },
  1146. "clientIndex": 0
  1147. },
  1148. {
  1149. "drainQueue": true,
  1150. "clientIndex": 1
  1151. },
  1152. {
  1153. "runTimer": "client_metadata_refresh",
  1154. "stateExpect": {
  1155. "isPrimary": false
  1156. },
  1157. "clientIndex": 1
  1158. },
  1159. {
  1160. "drainQueue": true,
  1161. "clientIndex": 0
  1162. },
  1163. {
  1164. "runTimer": "client_metadata_refresh",
  1165. "stateExpect": {
  1166. "isPrimary": true
  1167. },
  1168. "clientIndex": 0
  1169. }
  1170. ]
  1171. }
  1172. }