From 487dec453cbef8e52c02df4b8b99d2c75696d441 Mon Sep 17 00:00:00 2001 From: YACOVM Date: Thu, 10 Nov 2016 13:43:35 +0200 Subject: [PATCH] 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 --- gossip/comm/comm_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gossip/comm/comm_test.go b/gossip/comm/comm_test.go index cc646f77705..9c10c9a561d 100644 --- a/gossip/comm/comm_test.go +++ b/gossip/comm/comm_test.go @@ -256,7 +256,7 @@ func TestParallelSend(t *testing.T) { defer comm1.Stop() defer comm2.Stop() - messages2Send := 20 + messages2Send := defRecvBuffSize wg := sync.WaitGroup{} go func() { @@ -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")}) }