mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-10 09:55:45 +02:00
fix: test_acl_cat_commands_multi_exec_squash (#4492)
* add sleep in test Signed-off-by: kostas <kostas@dragonflydb.io>
This commit is contained in:
parent
4b8fa90a67
commit
d44eec2285
1 changed files with 7 additions and 1 deletions
|
@ -190,12 +190,18 @@ async def test_acl_cat_commands_multi_exec_squash(df_factory):
|
|||
res = await admin_client.execute_command("ACL SETUSER kk -@string")
|
||||
assert res == "OK"
|
||||
|
||||
# We need to sleep because within dragonfly, we first reply to the client with
|
||||
# "OK" and then we stream the update to proactor threads. The reason for this,
|
||||
# are some connections might need to be evicted, so we first need to reply before
|
||||
# we actually do that. Between those steps, there is a small window that the
|
||||
# EXEC below might succeed.
|
||||
await asyncio.sleep(1)
|
||||
|
||||
res = await client.execute_command("EXEC")
|
||||
# TODO(we need to fix this, basiscally SQUASHED/MULTI transaction commands
|
||||
# return multiple errors for each command failed. Since the nature of the error
|
||||
# is the same, that a rule has changed we should squash those error messages into
|
||||
# one.
|
||||
logging.debug(f"Result is: {res}")
|
||||
assert res[0].args[0] == "kk ACL rules changed between the MULTI and EXEC", res
|
||||
|
||||
await admin_client.aclose()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue