mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
fix(tests/server_utils): add a metrics bucket
This is required to avoid getting nil pointer exceptions if a peer joins this test server.
This commit is contained in:
parent
a8b07b1b48
commit
ff6090836c
@ -8,6 +8,7 @@ import (
|
||||
|
||||
"github.com/coreos/etcd/third_party/github.com/coreos/raft"
|
||||
|
||||
"github.com/coreos/etcd/metrics"
|
||||
"github.com/coreos/etcd/server"
|
||||
"github.com/coreos/etcd/store"
|
||||
)
|
||||
@ -39,7 +40,10 @@ func RunServer(f func(*server.Server)) {
|
||||
SnapshotCount: testSnapshotCount,
|
||||
MaxClusterSize: 9,
|
||||
}
|
||||
ps := server.NewPeerServer(psConfig, registry, store, nil, followersStats, serverStats)
|
||||
|
||||
mb := metrics.NewBucket("")
|
||||
|
||||
ps := server.NewPeerServer(psConfig, registry, store, &mb, followersStats, serverStats)
|
||||
psListener, err := server.NewListener(testRaftURL)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user