Test autopilots start/stop idempotency
This commit is contained in:
parent
4d99696f02
commit
535842004c
|
@ -11,6 +11,20 @@ import (
|
||||||
"github.com/hashicorp/serf/serf"
|
"github.com/hashicorp/serf/serf"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func TestAutopilot_IdempotentShutdown(t *testing.T) {
|
||||||
|
dir1, s1 := testServerWithConfig(t, nil)
|
||||||
|
defer os.RemoveAll(dir1)
|
||||||
|
defer s1.Shutdown()
|
||||||
|
retry.Run(t, func(r *retry.R) { r.Check(waitForLeader(s1)) })
|
||||||
|
|
||||||
|
s1.autopilot.Start()
|
||||||
|
s1.autopilot.Start()
|
||||||
|
s1.autopilot.Start()
|
||||||
|
s1.autopilot.Stop()
|
||||||
|
s1.autopilot.Stop()
|
||||||
|
s1.autopilot.Stop()
|
||||||
|
}
|
||||||
|
|
||||||
func TestAutopilot_CleanupDeadServer(t *testing.T) {
|
func TestAutopilot_CleanupDeadServer(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
for i := 1; i <= 3; i++ {
|
for i := 1; i <= 3; i++ {
|
||||||
|
|
Loading…
Reference in New Issue