Skip to content

Commit

Permalink
Upgrade redis-server version (#1833)
Browse files Browse the repository at this point in the history
* Upgrade redis-server version

Signed-off-by: monkey <golang@88.com>

* XAutoClaim changed the return value

Signed-off-by: monkey <golang@88.com>
  • Loading branch information
monkey92t committed Jul 24, 2021
1 parent 704212e commit 437184b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 4 additions & 7 deletions commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand All @@ -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() {
Expand Down

0 comments on commit 437184b

Please sign in to comment.