Skip to content

Commit 4341a48

Browse files
committed
fix: take_over_counters
Signed-off-by: kostas <[email protected]>
1 parent ca0cdf8 commit 4341a48

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/dragonfly/replication_test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1246,7 +1246,10 @@ async def block_during_takeover():
12461246
"Add a blocking command during takeover to make sure it doesn't block it."
12471247
start = time.time()
12481248
# The command should just be canceled
1249-
assert await c_blocking.execute_command("BLPOP BLOCKING_KEY1 BLOCKING_KEY2 100") is None
1249+
try:
1250+
assert await c_blocking.execute_command("BLPOP BLOCKING_KEY1 BLOCKING_KEY2 100") is None
1251+
except (redis.exceptions.ConnectionError, redis.exceptions.ResponseError) as e:
1252+
break
12501253
# And it should happen in reasonable amount of time.
12511254
assert time.time() - start < 10
12521255

0 commit comments

Comments
 (0)