Skip to content

Commit

Permalink
increase timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
dhiaayachi committed Sep 23, 2021
1 parent 5a747db commit 316c59a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions raft_test.go
Expand Up @@ -2379,6 +2379,7 @@ func TestRaft_RemovedFollower_Vote(t *testing.T) {
if configuration := c.getConfiguration(followers[1]); len(configuration.Servers) != 2 {
t.Fatalf("too many peers")
}

waitforState(followerRemoved, Follower)
// The removed node should be still in Follower state
require.Equal(t, Follower, followerRemoved.getState())
Expand Down Expand Up @@ -2418,8 +2419,8 @@ func TestRaft_RemovedFollower_Vote(t *testing.T) {

func waitforState(follower *Raft, state RaftState) {
count := 0
for follower.getState() != state && count < 1000 {
for follower.getState() != state && count < 5000 {
count++
time.Sleep(1 * time.Millisecond)
time.Sleep(10 * time.Millisecond)
}
}

0 comments on commit 316c59a

Please sign in to comment.