mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
added Do
method for raw query by single conn from pool.Conn()
(#3182)
* added `Do` method for raw query by single conn from `pool.Conn()` * added test to cmdble Do method * fixed test * moved Do cmd to commands.go --------- Co-authored-by: Oleg Laktyushkin <oglaktyushkin@avito.ru> Co-authored-by: Nedyalko Dyakov <nedyalko.dyakov@gmail.com>
This commit is contained in:
@ -84,6 +84,12 @@ var _ = Describe("Commands", func() {
|
||||
Expect(ping.Val()).To(Equal("PONG"))
|
||||
})
|
||||
|
||||
It("should Ping with Do method", func() {
|
||||
result := client.Conn().Do(ctx, "PING")
|
||||
Expect(result.Err()).NotTo(HaveOccurred())
|
||||
Expect(result.Val()).To(Equal("PONG"))
|
||||
})
|
||||
|
||||
It("should Wait", func() {
|
||||
const wait = 3 * time.Second
|
||||
|
||||
|
Reference in New Issue
Block a user