Skip to content

Commit

Permalink
Merge pull request #16191 from chaochn47/fix-runtime-reconfig-test
Browse files Browse the repository at this point in the history
tests: exclude learner endpoint from MemberPromote
  • Loading branch information
ahrtr authored Jul 7, 2023
2 parents 4364e75 + e5f6673 commit ac88260
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/e2e/runtime_reconfiguration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}

Expand Down

0 comments on commit ac88260

Please sign in to comment.