persistence_spec_test.json 23 KB

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