mirror of https://github.com/status-im/consul.git
Sleep since no obvious way to wait for shutdown
This commit is contained in:
parent
7092ab744b
commit
4a9058a07e
|
@ -8,6 +8,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
"errors"
|
"errors"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestLeader_RegisterMember(t *testing.T) {
|
func TestLeader_RegisterMember(t *testing.T) {
|
||||||
|
@ -310,6 +311,7 @@ func TestLeader_LeftServer(t *testing.T) {
|
||||||
|
|
||||||
// Kill any server
|
// Kill any server
|
||||||
servers[0].Shutdown()
|
servers[0].Shutdown()
|
||||||
|
time.Sleep(100 * time.Millisecond)
|
||||||
|
|
||||||
// Force remove the non-leader (transition to left state)
|
// Force remove the non-leader (transition to left state)
|
||||||
if err := servers[1].RemoveFailedNode(servers[0].config.NodeName); err != nil {
|
if err := servers[1].RemoveFailedNode(servers[0].config.NodeName); err != nil {
|
||||||
|
|
Loading…
Reference in New Issue