bug(server): fix debug populate keys (#1370)

Signed-off-by: adi_holden <adi@dragonflydb.io>
This commit is contained in:
adiholden 2023-06-08 15:16:28 +03:00 committed by GitHub
parent e646476359
commit 891155c927
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 5 deletions

View file

@ -169,6 +169,10 @@ TEST_F(RdbTest, Stream) {
TEST_F(RdbTest, ComressionModeSaveDragonflyAndReload) {
Run({"debug", "populate", "50000"});
ASSERT_EQ(50000, CheckedInt({"dbsize"}));
// Check keys inserted are lower than 50,000.
auto resp = Run({"keys", "key:[5-9][0-9][0-9][0-9][0-9]*"});
EXPECT_EQ(resp.GetVec().size(), 0);
for (int i = 0; i <= 3; ++i) {
SetFlag(&FLAGS_compression_mode, i);