Skip to content

Commit

Permalink
small gossip test relaxation
Browse files Browse the repository at this point in the history
This is for https://gerrit.hyperledger.org/r/#/c/2555/
It will fail without it with high probability

Change-Id: I1b6c367ce2fba78b0b31935d7f055ac7f9d376a4
Signed-off-by: Yacov Manevich <[email protected]>
  • Loading branch information
yacovm committed Nov 17, 2016
1 parent 13fc74f commit 83d4f2a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions gossip/gossip/gossip_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,11 +388,8 @@ func TestMembershipConvergence(t *testing.T) {
pI := newGossipInstance(i, 100, i%3)
peers = append(peers, pI)
}
time.Sleep(time.Duration(3) * time.Second)

for i := 0; i < 15; i++ {
assert.Equal(t, 4, len(peers[i].GetPeers()))
}
waitUntilOrFail(t, checkPeersMembership(peers, 4))

connectorPeer := newGossipInstance(15, 100, 0, 1, 2)
connectorPeer.UpdateMetadata([]byte("Connector"))
Expand Down Expand Up @@ -460,8 +457,8 @@ func TestMembershipConvergence(t *testing.T) {

func createDataMsg(seqnum uint64, data []byte, hash string) *proto.GossipMessage {
return &proto.GossipMessage{
Tag: proto.GossipMessage_EMPTY,
Nonce: 0,
Tag: proto.GossipMessage_EMPTY,
Content: &proto.GossipMessage_DataMsg{
DataMsg: &proto.DataMessage{
Payload: &proto.Payload{
Expand Down

0 comments on commit 83d4f2a

Please sign in to comment.