From 99a4f9e5edb98d08aa28e0802cbf0a2e34943842 Mon Sep 17 00:00:00 2001 From: Raghav Gulati Date: Tue, 16 Jan 2018 01:46:33 -0800 Subject: [PATCH] Increase timeout in TestSubscribeMultipleTimes Increase delay to 10ms; makes go test -race happy. --- floodsub.go | 2 +- floodsub_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/floodsub.go b/floodsub.go index 52a93b9..fc67d22 100644 --- a/floodsub.go +++ b/floodsub.go @@ -252,7 +252,7 @@ func (p *PubSub) announce(topic string, sub bool) { } } -// notifySubs sends a given message to all corresponding subscribbers. +// notifySubs sends a given message to all corresponding subscribers. // Only called from processLoop. func (p *PubSub) notifySubs(msg *pb.Message) { for _, topic := range msg.GetTopicIDs() { diff --git a/floodsub_test.go b/floodsub_test.go index 51ee0b8..28c1078 100644 --- a/floodsub_test.go +++ b/floodsub_test.go @@ -524,7 +524,7 @@ func TestSubscribeMultipleTimes(t *testing.T) { } // make sure subscribing is finished by the time we publish - time.Sleep(1 * time.Millisecond) + time.Sleep(10 * time.Millisecond) psubs[1].Publish("foo", []byte("bar"))