mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 10:25:47 +02:00
feat(streams): support entries_read and lag for XINFO GROUPS (#1952)
entries_read and lag have been added to the output of XINFO GROUPS since Redis 7.0. This patch supports both for Dragonfly. This patch also fixes a bug that incorrectly sets the initial value of entries_read when a consumer group is created. fixes #1948
This commit is contained in:
parent
5c9c9255d2
commit
a2457e3410
5 changed files with 61 additions and 5 deletions
|
@ -157,9 +157,9 @@ TEST_F(RdbTest, Stream) {
|
|||
EXPECT_THAT(resp, ArrLen(2));
|
||||
|
||||
resp = Run({"xinfo", "groups", "key:1"}); // test dereferences array of size 1
|
||||
EXPECT_THAT(resp, ArrLen(8));
|
||||
EXPECT_THAT(resp.GetVec(), ElementsAre("name", "g2", "consumers", IntArg(0), "pending", IntArg(0),
|
||||
"last-delivered-id", "1655444851523-1"));
|
||||
EXPECT_THAT(resp, RespArray(ElementsAre("name", "g2", "consumers", IntArg(0), "pending",
|
||||
IntArg(0), "last-delivered-id", "1655444851523-1",
|
||||
"entries-read", IntArg(0), "lag", IntArg(0))));
|
||||
|
||||
resp = Run({"xinfo", "groups", "key:2"});
|
||||
EXPECT_THAT(resp, ArrLen(0));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue