-sfix(rdb_load): replica load expired keys

This commit is contained in:
adi_holden 2023-03-15 12:34:13 +02:00 committed by Roman Gershman
parent bafad66fc3
commit dd03ce0cf0
4 changed files with 24 additions and 16 deletions

View file

@ -231,6 +231,15 @@ TEST_F(RdbTest, ReloadTtl) {
EXPECT_LT(990, CheckedInt({"ttl", "key"}));
}
TEST_F(RdbTest, ReloadExpired) {
Run({"set", "key", "val"});
Run({"expire", "key", "2"});
sleep(2);
Run({"debug", "reload"});
auto resp = Run({"get", "key"});
ASSERT_THAT(resp, ArgType(RespExpr::NIL));
}
TEST_F(RdbTest, SaveFlush) {
Run({"debug", "populate", "500000"});