forked from mirror/redis
Upgrade redis-server version (#1833)
* Upgrade redis-server version Signed-off-by: monkey <golang@88.com> * XAutoClaim changed the return value Signed-off-by: monkey <golang@88.com>
This commit is contained in:
parent
704212eaae
commit
437184bded
2
Makefile
2
Makefile
|
@ -14,7 +14,7 @@ bench: testdeps
|
|||
|
||||
testdata/redis:
|
||||
mkdir -p $@
|
||||
wget -qO- https://download.redis.io/releases/redis-6.2.1.tar.gz | tar xvz --strip-components=1 -C $@
|
||||
wget -qO- https://download.redis.io/releases/redis-6.2.5.tar.gz | tar xvz --strip-components=1 -C $@
|
||||
|
||||
testdata/redis/src/redis-server: testdata/redis
|
||||
cd $< && make all
|
||||
|
|
|
@ -4635,7 +4635,7 @@ var _ = Describe("Commands", func() {
|
|||
}
|
||||
msgs, start, err := client.XAutoClaim(ctx, xca).Result()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(start).To(Equal("2-0"))
|
||||
Expect(start).To(Equal("3-0"))
|
||||
Expect(msgs).To(Equal([]redis.XMessage{{
|
||||
ID: "1-0",
|
||||
Values: map[string]interface{}{"uno": "un"},
|
||||
|
@ -4647,19 +4647,16 @@ var _ = Describe("Commands", func() {
|
|||
xca.Start = start
|
||||
msgs, start, err = client.XAutoClaim(ctx, xca).Result()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(start).To(Equal("3-0"))
|
||||
Expect(start).To(Equal("0-0"))
|
||||
Expect(msgs).To(Equal([]redis.XMessage{{
|
||||
ID: "2-0",
|
||||
Values: map[string]interface{}{"dos": "deux"},
|
||||
}, {
|
||||
ID: "3-0",
|
||||
Values: map[string]interface{}{"tres": "troix"},
|
||||
}}))
|
||||
|
||||
ids, start, err := client.XAutoClaimJustID(ctx, xca).Result()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(start).To(Equal("3-0"))
|
||||
Expect(ids).To(Equal([]string{"2-0", "3-0"}))
|
||||
Expect(start).To(Equal("0-0"))
|
||||
Expect(ids).To(Equal([]string{"3-0"}))
|
||||
})
|
||||
|
||||
It("should XClaim", func() {
|
||||
|
|
Loading…
Reference in New Issue