mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2024-12-14 11:58:02 +00:00
fix: RdbTest.LoadStream3 incorrect file usage (#4242)
fix: RdbTest.LoadStream3 used incorrect file
This commit is contained in:
parent
779bba71f9
commit
935ae86c94
1 changed files with 24 additions and 24 deletions
|
@ -646,6 +646,30 @@ TEST_F(RdbTest, LoadHugeStream) {
|
|||
ASSERT_EQ(2000, CheckedInt({"xlen", "test:0"}));
|
||||
}
|
||||
|
||||
TEST_F(RdbTest, LoadStream2) {
|
||||
auto ec = LoadRdb("RDB_TYPE_STREAM_LISTPACKS_2.rdb");
|
||||
ASSERT_FALSE(ec) << ec.message();
|
||||
auto res = Run({"XINFO", "STREAM", "mystream"});
|
||||
ASSERT_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_3.rdb");
|
||||
ASSERT_FALSE(ec) << ec.message();
|
||||
auto res = Run({"XINFO", "STREAM", "mystream"});
|
||||
ASSERT_THAT(
|
||||
res.GetVec(),
|
||||
ElementsAre("length", IntArg(2), "radix-tree-keys", IntArg(1), "radix-tree-nodes", IntArg(2),
|
||||
"last-generated-id", "1732614679549-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, SnapshotTooBig) {
|
||||
// Run({"debug", "populate", "10000", "foo", "1000"});
|
||||
// usleep(5000); // let the stats to sync
|
||||
|
@ -655,28 +679,4 @@ 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…
Reference in a new issue