Skip to content

Commit

Permalink
remove server from config before shutting down, fix raft submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
dhiaayachi committed Mar 25, 2024
1 parent d4cb80f commit 4e3bb65
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitmodules
@@ -1,3 +1,3 @@
[submodule "raft-compat/raft-latest"]
path = raft-compat/raft-previous-version
url = git@github.com:hashicorp/raft
url = https://github.com/hashicorp/raft.git
4 changes: 4 additions & 0 deletions raft-compat/prevote_test.go
Expand Up @@ -20,6 +20,8 @@ func TestRaft_PreVote_BootStrap_PreVote(t *testing.T) {
utils.WaitFuture(t, f)
}
leaveNoTransfer := func(t *testing.T, cluster testcluster.RaftCluster, id string) {
fr := cluster.GetLeader().GetRaft().(*raftprevious.Raft).RemoveServer(raftprevious.ServerID(id), 0, 0)
utils.WaitFuture(t, fr)
f := cluster.Raft(id).(*raftprevious.Raft).Shutdown()
utils.WaitFuture(t, f)
}
Expand Down Expand Up @@ -160,6 +162,8 @@ func TestRaft_PreVote_Rollback(t *testing.T) {
utils.WaitFuture(t, f)
}
leaveNoTransfer := func(t *testing.T, cluster testcluster.RaftCluster, id string) {
fr := cluster.GetLeader().GetRaft().(*raft.Raft).RemoveServer(raft.ServerID(id), 0, 0)
utils.WaitFuture(t, fr)
f := cluster.Raft(id).(*raft.Raft).Shutdown()
utils.WaitFuture(t, f)
}
Expand Down

0 comments on commit 4e3bb65

Please sign in to comment.