mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 02:15:45 +02:00
feat(streams): implement rdb load for streams
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
parent
07b92841fe
commit
d1d64eb014
7 changed files with 225 additions and 39 deletions
|
@ -115,6 +115,17 @@ TEST_F(RdbTest, LoadSmall6) {
|
|||
EXPECT_THAT(resp.GetVec(), ElementsAre(IntArg(1), IntArg(1)));
|
||||
}
|
||||
|
||||
TEST_F(RdbTest, LoadStream) {
|
||||
io::FileSource fs = GetSource("redis6_stream.rdb");
|
||||
RdbLoader loader(service_->script_mgr());
|
||||
|
||||
// must run in proactor thread in order to avoid polluting the serverstate
|
||||
// in the main, testing thread.
|
||||
auto ec = pp_->at(0)->Await([&] { return loader.Load(&fs); });
|
||||
|
||||
ASSERT_FALSE(ec) << ec.message();
|
||||
}
|
||||
|
||||
TEST_F(RdbTest, Reload) {
|
||||
absl::FlagSaver fs;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue