|
@@ -925,7 +925,7 @@ func (m *member) Metric(metricName string) (string, error) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// InjectPartition drops connections from m to others, vice versa.
|
|
// InjectPartition drops connections from m to others, vice versa.
|
|
|
-func (m *member) InjectPartition(t *testing.T, others []*member) {
|
|
|
|
|
|
|
+func (m *member) InjectPartition(t *testing.T, others ...*member) {
|
|
|
for _, other := range others {
|
|
for _, other := range others {
|
|
|
m.s.CutPeer(other.s.ID())
|
|
m.s.CutPeer(other.s.ID())
|
|
|
other.s.CutPeer(m.s.ID())
|
|
other.s.CutPeer(m.s.ID())
|
|
@@ -933,7 +933,7 @@ func (m *member) InjectPartition(t *testing.T, others []*member) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// RecoverPartition recovers connections from m to others, vice versa.
|
|
// RecoverPartition recovers connections from m to others, vice versa.
|
|
|
-func (m *member) RecoverPartition(t *testing.T, others []*member) {
|
|
|
|
|
|
|
+func (m *member) RecoverPartition(t *testing.T, others ...*member) {
|
|
|
for _, other := range others {
|
|
for _, other := range others {
|
|
|
m.s.MendPeer(other.s.ID())
|
|
m.s.MendPeer(other.s.ID())
|
|
|
other.s.MendPeer(m.s.ID())
|
|
other.s.MendPeer(m.s.ID())
|