mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #17793 from mneverov/fix-quorum-check
Fix remove member failed.
This commit is contained in:
commit
d31caaec4a
@ -86,7 +86,7 @@ const (
|
|||||||
StoreKeysPrefix = "/1"
|
StoreKeysPrefix = "/1"
|
||||||
|
|
||||||
// HealthInterval is the minimum time the cluster should be healthy
|
// 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
|
HealthInterval = 5 * time.Second
|
||||||
|
|
||||||
purgeFileInterval = 30 * time.Second
|
purgeFileInterval = 30 * time.Second
|
||||||
|
@ -196,7 +196,7 @@ func TestMemberRemove(t *testing.T) {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
t.Run(quorumTc.name+"/"+clusterTc.name, func(t *testing.T) {
|
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()
|
defer cancel()
|
||||||
c := clusterTc.config
|
c := clusterTc.config
|
||||||
c.StrictReconfigCheck = quorumTc.strictReconfigCheck
|
c.StrictReconfigCheck = quorumTc.strictReconfigCheck
|
||||||
@ -207,7 +207,8 @@ func TestMemberRemove(t *testing.T) {
|
|||||||
|
|
||||||
testutils.ExecuteUntil(ctx, t, func() {
|
testutils.ExecuteUntil(ctx, t, func() {
|
||||||
if quorumTc.waitForQuorum {
|
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)
|
memberID, clusterID := memberToRemove(ctx, t, cc, c.ClusterSize)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user