mirror of
https://github.com/redis/go-redis.git
synced 2025-07-29 17:41:15 +03:00
Rename Multi to Tx to better reflect the purpose. Fixes #194.
This commit is contained in:
10
pool_test.go
10
pool_test.go
@ -37,16 +37,18 @@ var _ = Describe("pool", func() {
|
||||
perform(1000, func(id int) {
|
||||
var ping *redis.StatusCmd
|
||||
|
||||
multi := client.Multi()
|
||||
cmds, err := multi.Exec(func() error {
|
||||
ping = multi.Ping()
|
||||
tx, err := client.Watch()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
cmds, err := tx.Exec(func() error {
|
||||
ping = tx.Ping()
|
||||
return nil
|
||||
})
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(cmds).To(HaveLen(1))
|
||||
Expect(ping.Err()).NotTo(HaveOccurred())
|
||||
Expect(ping.Val()).To(Equal("PONG"))
|
||||
Expect(multi.Close()).NotTo(HaveOccurred())
|
||||
Expect(tx.Close()).NotTo(HaveOccurred())
|
||||
})
|
||||
|
||||
pool := client.Pool()
|
||||
|
Reference in New Issue
Block a user