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:
monkey92t 2021-07-24 23:46:41 +08:00 committed by GitHub
parent 704212eaae
commit 437184bded
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 8 deletions

View File

@ -14,7 +14,7 @@ bench: testdeps
testdata/redis: testdata/redis:
mkdir -p $@ 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 testdata/redis/src/redis-server: testdata/redis
cd $< && make all cd $< && make all

View File

@ -4635,7 +4635,7 @@ var _ = Describe("Commands", func() {
} }
msgs, start, err := client.XAutoClaim(ctx, xca).Result() msgs, start, err := client.XAutoClaim(ctx, xca).Result()
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
Expect(start).To(Equal("2-0")) Expect(start).To(Equal("3-0"))
Expect(msgs).To(Equal([]redis.XMessage{{ Expect(msgs).To(Equal([]redis.XMessage{{
ID: "1-0", ID: "1-0",
Values: map[string]interface{}{"uno": "un"}, Values: map[string]interface{}{"uno": "un"},
@ -4647,19 +4647,16 @@ var _ = Describe("Commands", func() {
xca.Start = start xca.Start = start
msgs, start, err = client.XAutoClaim(ctx, xca).Result() msgs, start, err = client.XAutoClaim(ctx, xca).Result()
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
Expect(start).To(Equal("3-0")) Expect(start).To(Equal("0-0"))
Expect(msgs).To(Equal([]redis.XMessage{{ Expect(msgs).To(Equal([]redis.XMessage{{
ID: "2-0",
Values: map[string]interface{}{"dos": "deux"},
}, {
ID: "3-0", ID: "3-0",
Values: map[string]interface{}{"tres": "troix"}, Values: map[string]interface{}{"tres": "troix"},
}})) }}))
ids, start, err := client.XAutoClaimJustID(ctx, xca).Result() ids, start, err := client.XAutoClaimJustID(ctx, xca).Result()
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
Expect(start).To(Equal("3-0")) Expect(start).To(Equal("0-0"))
Expect(ids).To(Equal([]string{"2-0", "3-0"})) Expect(ids).To(Equal([]string{"3-0"}))
}) })
It("should XClaim", func() { It("should XClaim", func() {