From 3a5bdef962ece873791ab838480892fd75110af1 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Fri, 15 Apr 2016 13:28:46 +0200 Subject: whisper: deflake Test*MessageExpiration These tests have become a common annoyance on CI. Fix them by allowing messages with expiration == now into the cache and delaying the check for expired message handling slightly. --- whisper/whisper.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'whisper/whisper.go') diff --git a/whisper/whisper.go b/whisper/whisper.go index e5f686e43..0a49c1000 100644 --- a/whisper/whisper.go +++ b/whisper/whisper.go @@ -255,7 +255,7 @@ func (self *Whisper) add(envelope *Envelope) error { defer self.poolMu.Unlock() // short circuit when a received envelope has already expired - if envelope.Expiry <= uint32(time.Now().Unix()) { + if envelope.Expiry < uint32(time.Now().Unix()) { return nil } @@ -278,7 +278,6 @@ func (self *Whisper) add(envelope *Envelope) error { go self.postEvent(envelope) } glog.V(logger.Detail).Infof("cached whisper envelope %x\n", envelope) - return nil } -- cgit v1.2.3