mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 18:35:46 +02:00
fix(tests): check cluster big snapshot in unit test (#4403)
fix tests: check cluster big snapshot in unit test Signed-off-by: adi_holden <adi@dragonflydb.io>
This commit is contained in:
parent
4f09fe036c
commit
92c3749c8c
2 changed files with 12 additions and 59 deletions
|
@ -619,6 +619,18 @@ TEST_F(ClusterFamilyTest, ClusterFirstConfigCallDropsEntriesNotOwnedByNode) {
|
|||
ExpectConditionWithinTimeout([&]() { return CheckedInt({"dbsize"}) == 0; });
|
||||
}
|
||||
|
||||
TEST_F(ClusterFamilyTest, SnapshotBiggerThanMaxMemory) {
|
||||
InitWithDbFilename();
|
||||
ConfigSingleNodeCluster(GetMyId());
|
||||
|
||||
Run({"debug", "populate", "50000"});
|
||||
EXPECT_EQ(Run({"save", "df"}), "OK");
|
||||
|
||||
max_memory_limit = 10000;
|
||||
auto save_info = service_->server_family().GetLastSaveInfo();
|
||||
EXPECT_EQ(Run({"dfly", "load", save_info.file_name}), "OK");
|
||||
}
|
||||
|
||||
TEST_F(ClusterFamilyTest, Keyslot) {
|
||||
// Example from Redis' command reference: https://redis.io/commands/cluster-keyslot/
|
||||
EXPECT_THAT(Run({"cluster", "keyslot", "somekey"}), IntArg(11'058));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue