Onyx-Protocol / Onyx

Onyx
https://Onyx.org
GNU Affero General Public License v3.0
1.79k stars 362 forks source link

net/raft: add unit tests for node eviction #1374

Closed vickiniu closed 7 years ago

vickiniu commented 7 years ago

Adds two unit tests for node eviction: for evicting a single node, and multiple nodes. Also slightly refactors to add a helper function to create a test Raft cluster.

vickiniu commented 7 years ago

etcd example for dropping messages w/o matching peer addresses: https://github.com/coreos/etcd/blob/e962b0c8498719c8d14c06572c38907ef4919343/etcdserver/raft.go#L302

vickiniu commented 7 years ago

PTAL :)

tessr commented 7 years ago

LGTM