Skip to content

Commit

Permalink
Fix Go 1.4 build.
Browse files Browse the repository at this point in the history
  • Loading branch information
vmihailenco committed Feb 18, 2017
1 parent 59a96d9 commit c2156b5
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions pubsub_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit c2156b5

Please sign in to comment.