Skip to content

Commit

Permalink
Merge pull request #17793 from mneverov/fix-quorum-check
Browse files Browse the repository at this point in the history
Fix remove member failed.
  • Loading branch information
ahrtr committed Apr 30, 2024
2 parents 09f7d7a + 6b0b4ce commit d31caae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion server/etcdserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const (
StoreKeysPrefix = "/1"

// HealthInterval is the minimum time the cluster should be healthy
// before accepting add member requests.
// before accepting add and delete member requests.
HealthInterval = 5 * time.Second

purgeFileInterval = 30 * time.Second
Expand Down
5 changes: 3 additions & 2 deletions tests/common/member_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func TestMemberRemove(t *testing.T) {
continue
}
t.Run(quorumTc.name+"/"+clusterTc.name, func(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
ctx, cancel := context.WithTimeout(context.Background(), 14*time.Second)
defer cancel()
c := clusterTc.config
c.StrictReconfigCheck = quorumTc.strictReconfigCheck
Expand All @@ -207,7 +207,8 @@ func TestMemberRemove(t *testing.T) {

testutils.ExecuteUntil(ctx, t, func() {
if quorumTc.waitForQuorum {
time.Sleep(etcdserver.HealthInterval)
// wait for health interval + leader election
time.Sleep(etcdserver.HealthInterval + 2*time.Second)
}

memberID, clusterID := memberToRemove(ctx, t, cc, c.ClusterSize)
Expand Down

0 comments on commit d31caae

Please sign in to comment.