1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-29 17:41:15 +03:00

pubsub: drop a message when the channel is full

This commit is contained in:
Vladimir Mihailenco
2019-03-12 12:40:08 +02:00
parent 0d39ee8976
commit 21913a8304
2 changed files with 38 additions and 7 deletions

View File

@ -27,6 +27,13 @@ var _ = Describe("PubSub", func() {
Expect(client.Close()).NotTo(HaveOccurred())
})
It("implements Stringer", func() {
pubsub := client.PSubscribe("mychannel*")
defer pubsub.Close()
Expect(pubsub.String()).To(Equal("PubSub(mychannel*)"))
})
It("should support pattern matching", func() {
pubsub := client.PSubscribe("mychannel*")
defer pubsub.Close()