Skip to content

Commit

Permalink
Update TestApplyConfChangeShouldStop to use store and be
Browse files Browse the repository at this point in the history
Signed-off-by: Geeta Gharpure <geetagh@amazon.com>
  • Loading branch information
Geeta Gharpure committed Jun 30, 2023
1 parent 25afc00 commit 26c38dc
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions server/etcdserver/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -608,20 +608,13 @@ func TestApplyConfChangeError(t *testing.T) {
}

func TestApplyConfChangeShouldStop(t *testing.T) {
testApplyConfChangeShouldStop(t, true)
testApplyConfChangeShouldStop(t, false)
}

func testApplyConfChangeShouldStop(t *testing.T, useV2Store bool) {
lg := zaptest.NewLogger(t)
be, _ := betesting.NewDefaultTmpBackend(t)
defer betesting.Close(t, be)

cl := membership.NewCluster(lg)
cl.SetBackend(schema.NewMembershipBackend(lg, be))
if useV2Store {
cl.SetStore(v2store.New())
}
cl.SetStore(v2store.New())

for i := 1; i <= 3; i++ {
cl.AddMember(&membership.Member{ID: types.ID(i)}, true)
Expand Down

0 comments on commit 26c38dc

Please sign in to comment.