mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2024-12-14 11:58:02 +00:00
fix: Fix test test_client_pause_with_replica
(#3729)
There are 2 minor issues with this test: 1. It specified `cmdstat_replconf` as `cmd_stats` instead of `cmd`, that's clearly a typo as `cmd_stats` is a map with stats, while `replconf` is a Dragonfly command 2. Command `MULTI` is allowed to run even when the server is in paused state, see [here](https://github.com/dragonflydb/dragonfly/blob/main/src/server/main_service.cc#L1197): ``` // Don't interrupt running multi commands or admin connections. ``` Fixes #3675
This commit is contained in:
parent
ae5ce9b497
commit
a115bc2b9f
1 changed files with 3 additions and 2 deletions
|
@ -1987,8 +1987,9 @@ async def test_client_pause_with_replica(df_factory, df_seeder_factory):
|
|||
stats_after_sleep = await c_master.info("CommandStats")
|
||||
# Check no commands are executed except info and replconf called from replica
|
||||
for cmd, cmd_stats in stats_after_sleep.items():
|
||||
if "cmdstat_info" != cmd and "cmdstat_replconf" != cmd_stats:
|
||||
assert stats[cmd] == cmd_stats, cmd
|
||||
if cmd in ["cmdstat_info", "cmdstat_replconf", "cmdstat_multi"]:
|
||||
continue
|
||||
assert stats[cmd] == cmd_stats, cmd
|
||||
|
||||
await asyncio.sleep(6)
|
||||
seeder.stop()
|
||||
|
|
Loading…
Reference in a new issue