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

Add test for receive big message payload

This commit is contained in:
Vladimir Mihailenco
2017-09-30 09:21:59 +03:00
parent 8e6b51ec3a
commit 742a58164c
3 changed files with 25 additions and 5 deletions

View File

@ -424,4 +424,20 @@ var _ = Describe("PubSub", func() {
wg.Wait()
})
It("handles big message payload", func() {
pubsub := client.Subscribe("mychannel")
defer pubsub.Close()
ch := pubsub.Channel()
bigVal := bigVal()
err := client.Publish("mychannel", bigVal).Err()
Expect(err).NotTo(HaveOccurred())
var msg *redis.Message
Eventually(ch).Should(Receive(&msg))
Expect(msg.Channel).To(Equal("mychannel"))
Expect(msg.Payload).To(Equal(string(bigVal)))
})
})