etcdserver: use member pointer for all tests

This commit is contained in:
Xiang Li
2014-11-11 11:19:34 -08:00
parent e4931e0c47
commit 67a0de4bbc
3 changed files with 75 additions and 77 deletions

View File

@ -24,10 +24,10 @@ import (
)
func TestSendHubInitSenders(t *testing.T) {
membs := []Member{
*newTestMember(1, []string{"http://a"}, "", nil),
*newTestMember(2, []string{"http://b"}, "", nil),
*newTestMember(3, []string{"http://c"}, "", nil),
membs := []*Member{
newTestMember(1, []string{"http://a"}, "", nil),
newTestMember(2, []string{"http://b"}, "", nil),
newTestMember(3, []string{"http://c"}, "", nil),
}
cl := newTestCluster(membs)
ls := stats.NewLeaderStats("")
@ -70,8 +70,8 @@ func TestSendHubAdd(t *testing.T) {
}
func TestSendHubRemove(t *testing.T) {
membs := []Member{
*newTestMember(1, []string{"http://a"}, "", nil),
membs := []*Member{
newTestMember(1, []string{"http://a"}, "", nil),
}
cl := newTestCluster(membs)
ls := stats.NewLeaderStats("")