Skip to content

Commit 487dec4

Browse files
committed
tiny gossip comm test change
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 <[email protected]>
1 parent ac66f24 commit 487dec4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gossip/comm/comm_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ func TestParallelSend(t *testing.T) {
256256
defer comm1.Stop()
257257
defer comm2.Stop()
258258

259-
messages2Send := 20
259+
messages2Send := defRecvBuffSize
260260

261261
wg := sync.WaitGroup{}
262262
go func() {
@@ -359,7 +359,7 @@ func TestAccept(t *testing.T) {
359359
go readIntoSlice(&evenResults, evenNONCES)
360360
go readIntoSlice(&oddResults, oddNONCES)
361361

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

0 commit comments

Comments
 (0)