Merge pull request #502 from go-redis/fix/go14-build

Fix Go 1.4 build.
This commit is contained in:
Vladimir Mihailenco 2017-02-18 13:33:56 +03:00 committed by GitHub
commit a40c8d17fe
1 changed files with 8 additions and 5 deletions

View File

@ -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() {
@ -350,8 +350,11 @@ var _ = Describe("PubSub", func() {
defer wg.Done()
_, err := pubsub.ReceiveMessage()
Expect(err).To(MatchError("redis: client is closed"))
Expect(err).To(HaveOccurred())
Expect(err).To(SatisfyAny(
MatchError("redis: client is closed"),
MatchError("use of closed network connection"), // Go 1.4
))
}()
wg.Wait()