Skip to content
This repository was archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
Merge branch '1.0'
Browse files Browse the repository at this point in the history
Conflicts:
	ipam/ring/ring_test.go
  • Loading branch information
rade committed Aug 20, 2015
2 parents 1e83e7a + 79d1c40 commit f399c3a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ipam/ring/ring_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ func TestFuzzRing(t *testing.T) {
}

func TestFuzzRingHard(t *testing.T) {
//common.InitDefaultLogging(true)
//common.SetLogLevel("debug")
var (
numPeers = 100
iterations = 3000
Expand Down Expand Up @@ -644,13 +644,8 @@ func TestFuzzRingHard(t *testing.T) {
return
}

// Pick one peer to remove, and a different one to transfer to
peerIndex, peername, _ := randomPeer(-1)
// Remove peer from our state
peers = append(peers[:peerIndex], peers[peerIndex+1:]...)
rings = append(rings[:peerIndex], rings[peerIndex+1:]...)
theRanges = make(map[int][]address.Range)

// Transfer the space for this peer on another peer, but not this one
_, otherPeername, otherRing := randomPeer(peerIndex)

// We need to be in a ~converged ring to rmpeer
Expand All @@ -659,7 +654,12 @@ func TestFuzzRingHard(t *testing.T) {
}

common.Log.Debugf("%s: transferring from peer %s", otherPeername, peername)
otherRing.Transfer(peername, peername)
otherRing.Transfer(peername, otherPeername)

// Remove peer from our state
peers = append(peers[:peerIndex], peers[peerIndex+1:]...)
rings = append(rings[:peerIndex], rings[peerIndex+1:]...)
theRanges = make(map[int][]address.Range)

// And now tell everyone about the transfer - rmpeer is
// not partition safe
Expand Down

0 comments on commit f399c3a

Please sign in to comment.