Skip to content

Commit ca4135e

Browse files
authored
fix(test): test_cluster_slot_ownership_changes (#4852)
fix test: test_cluster_slot_ownership_changes Signed-off-by: adi_holden <[email protected]>
1 parent c799d9b commit ca4135e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Diff for: tests/dragonfly/cluster_test.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,12 @@ async def test_cluster_slot_ownership_changes(df_factory: DflyInstanceFactory):
691691
)
692692

693693
# node0 should have removed "KEY1" as it no longer owns it
694-
assert await c_nodes[0].execute_command("DBSIZE") == 1
694+
# deleting non owned keys is background operation therefore we add timeout to this check
695+
@assert_eventually(times=2)
696+
async def check_dbsize():
697+
assert await c_nodes[0].execute_command("DBSIZE") == 1
698+
699+
await check_dbsize()
695700
# node0 should still own "KEY0" though
696701
assert (await c_nodes[0].get("KEY0")) == "value"
697702
# node1 should still have "KEY2"

0 commit comments

Comments
 (0)