mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 02:15:45 +02:00
feat: add ability reading stream_listpacks_2/3 rdb types (#4192)
* feat: add ability reading stream_listpacks_2/3 rdb types * refactor: address comments
This commit is contained in:
parent
f84e1eeac8
commit
3327e1a908
6 changed files with 89 additions and 4 deletions
|
@ -655,4 +655,28 @@ TEST_F(RdbTest, SnapshotTooBig) {
|
|||
ASSERT_THAT(resp, ErrArg("Out of memory"));
|
||||
}
|
||||
|
||||
TEST_F(RdbTest, LoadStream2) {
|
||||
auto ec = LoadRdb("RDB_TYPE_STREAM_LISTPACKS_2.rdb");
|
||||
ASSERT_FALSE(ec) << ec.message();
|
||||
auto res = Run({"XINFO", "STREAM", "mystream"});
|
||||
EXPECT_THAT(
|
||||
res.GetVec(),
|
||||
ElementsAre("length", IntArg(2), "radix-tree-keys", IntArg(1), "radix-tree-nodes", IntArg(2),
|
||||
"last-generated-id", "1732613360686-0", "max-deleted-entry-id", "0-0",
|
||||
"entries-added", IntArg(0), "recorded-first-entry-id", "0-0", "groups", IntArg(1),
|
||||
"first-entry", ArgType(RespExpr::ARRAY), "last-entry", ArgType(RespExpr::ARRAY)));
|
||||
}
|
||||
|
||||
TEST_F(RdbTest, LoadStream3) {
|
||||
auto ec = LoadRdb("RDB_TYPE_STREAM_LISTPACKS_2.rdb");
|
||||
ASSERT_FALSE(ec) << ec.message();
|
||||
auto res = Run({"XINFO", "STREAM", "mystream"});
|
||||
EXPECT_THAT(
|
||||
res.GetVec(),
|
||||
ElementsAre("length", IntArg(2), "radix-tree-keys", IntArg(1), "radix-tree-nodes", IntArg(2),
|
||||
"last-generated-id", "1732613360686-0", "max-deleted-entry-id", "0-0",
|
||||
"entries-added", IntArg(0), "recorded-first-entry-id", "0-0", "groups", IntArg(1),
|
||||
"first-entry", ArgType(RespExpr::ARRAY), "last-entry", ArgType(RespExpr::ARRAY)));
|
||||
}
|
||||
|
||||
} // namespace dfly
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue