Skip to content

Commit

Permalink
fix(unit tests): fix generic family info test (dragonflydb#3187)
Browse files Browse the repository at this point in the history
fix unit tests

Signed-off-by: adi_holden <[email protected]>
  • Loading branch information
adiholden authored and dranikpg committed Jun 23, 2024
1 parent f0064d8 commit 350be10
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/server/generic_family_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -695,10 +695,13 @@ TEST_F(GenericFamilyTest, Info) {
EXPECT_EQ(1, get_rdb_changes_since_last_save(resp.GetString()));

EXPECT_EQ(Run({"bgsave"}), "OK");
WaitUntilCondition([&]() {
resp = Run({"info", "persistence"});
return get_rdb_changes_since_last_save(resp.GetString()) == 0;
});
bool cond = WaitUntilCondition(
[&]() {
resp = Run({"info", "persistence"});
return get_rdb_changes_since_last_save(resp.GetString()) == 0;
},
500ms);
EXPECT_TRUE(cond);

EXPECT_EQ(Run({"set", "k3", "3"}), "OK");
resp = Run({"info", "persistence"});
Expand Down

0 comments on commit 350be10

Please sign in to comment.