From e5f6673e1a5ea42ff13bf11a03b2b92134db9e32 Mon Sep 17 00:00:00 2001 From: Chao Chen Date: Thu, 6 Jul 2023 09:05:16 -0700 Subject: [PATCH] tests: exclude learner endpoints from MemberPromote Signed-off-by: Chao Chen --- tests/e2e/runtime_reconfiguration_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/e2e/runtime_reconfiguration_test.go b/tests/e2e/runtime_reconfiguration_test.go index eaf1e528c91..8379dd801c0 100644 --- a/tests/e2e/runtime_reconfiguration_test.go +++ b/tests/e2e/runtime_reconfiguration_test.go @@ -173,11 +173,14 @@ func addMember(ctx context.Context, t *testing.T, epc *e2e.EtcdProcessCluster) { } func addMemberAsLearnerAndPromote(ctx context.Context, t *testing.T, epc *e2e.EtcdProcessCluster) { + endpoints := epc.EndpointsGRPC() + id, err := epc.StartNewProc(ctx, nil, t, true /* addAsLearner */) require.NoError(t, err) - newLearnerMemberProc := epc.Procs[len(epc.Procs)-1] - _, err = epc.Etcdctl().MemberPromote(ctx, id) + _, err = epc.Etcdctl(e2e.WithEndpoints(endpoints)).MemberPromote(ctx, id) require.NoError(t, err) + + newLearnerMemberProc := epc.Procs[len(epc.Procs)-1] require.NoError(t, newLearnerMemberProc.Etcdctl().Health(ctx)) }