From c2156b59f35203765d67e97a03fb1e7703367aec Mon Sep 17 00:00:00 2001 From: Vladimir Mihailenco Date: Sat, 18 Feb 2017 12:28:01 +0200 Subject: [PATCH] Fix Go 1.4 build. --- pubsub_test.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pubsub_test.go b/pubsub_test.go index ba26be7..22f3130 100644 --- a/pubsub_test.go +++ b/pubsub_test.go @@ -6,10 +6,10 @@ import ( "sync" "time" + "gopkg.in/redis.v5" + . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - - "gopkg.in/redis.v5" ) var _ = Describe("PubSub", func() { @@ -348,10 +348,13 @@ var _ = Describe("PubSub", func() { wg.Done() defer wg.Done() - - _, err := pubsub.ReceiveMessage() - Expect(err).To(MatchError("redis: client is closed")) + _, err := pubsub.ReceiveMessage() + Expect(err).To(HaveOccurred()) + Expect(err).To(SatisfyAny( + MatchError("redis: client is closed"), + MatchError("use of closed network connection"), // Go 1.4 + )) }() wg.Wait()