Skip to content

Commit

Permalink
tiny gossip comm test change
Browse files Browse the repository at this point in the history
Sometimes the consumer in the test doesn't get enough CPU time so sending
too much messages may fail since the sending is now buffered.

Change-Id: Ib20c00a9deb384ad3ef5f6d11794e5dc71d99791
Signed-off-by: Yacov Manevich <yacovm@il.ibm.com>
  • Loading branch information
yacovm committed Nov 10, 2016
1 parent ac66f24 commit 487dec4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gossip/comm/comm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ func TestParallelSend(t *testing.T) {
defer comm1.Stop()
defer comm2.Stop()

messages2Send := 20
messages2Send := defRecvBuffSize

wg := sync.WaitGroup{}
go func() {
Expand Down Expand Up @@ -359,7 +359,7 @@ func TestAccept(t *testing.T) {
go readIntoSlice(&evenResults, evenNONCES)
go readIntoSlice(&oddResults, oddNONCES)

for i := 0; i < 100; i++ {
for i := 0; i < defRecvBuffSize; i++ {
comm2.Send(createGossipMsg(), &RemotePeer{Endpoint: "localhost:7611", PKIID: []byte("localhost:7611")})
}

Expand Down

0 comments on commit 487dec4

Please sign in to comment.