simple_promote_demote.txt 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # Set up three voters for this test.
  2. simple
  3. v1
  4. ----
  5. voters=(1)
  6. 1: StateProbe match=0 next=0
  7. simple
  8. v2
  9. ----
  10. voters=(1 2)
  11. 1: StateProbe match=0 next=0
  12. 2: StateProbe match=0 next=1
  13. simple
  14. v3
  15. ----
  16. voters=(1 2 3)
  17. 1: StateProbe match=0 next=0
  18. 2: StateProbe match=0 next=1
  19. 3: StateProbe match=0 next=2
  20. # Can atomically demote and promote without a hitch.
  21. # This is pointless, but possible.
  22. simple
  23. l1 v1
  24. ----
  25. voters=(1 2 3)
  26. 1: StateProbe match=0 next=0
  27. 2: StateProbe match=0 next=1
  28. 3: StateProbe match=0 next=2
  29. # Can demote a voter.
  30. simple
  31. l2
  32. ----
  33. voters=(1 3) learners=(2)
  34. 1: StateProbe match=0 next=0
  35. 2: StateProbe match=0 next=1 learner
  36. 3: StateProbe match=0 next=2
  37. # Can atomically promote and demote the same voter.
  38. # This is pointless, but possible.
  39. simple
  40. v2 l2
  41. ----
  42. voters=(1 3) learners=(2)
  43. 1: StateProbe match=0 next=0
  44. 2: StateProbe match=0 next=1 learner
  45. 3: StateProbe match=0 next=2
  46. # Can promote a voter.
  47. simple
  48. v2
  49. ----
  50. voters=(1 2 3)
  51. 1: StateProbe match=0 next=0
  52. 2: StateProbe match=0 next=1
  53. 3: StateProbe match=0 next=2