-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests(replication): Test script replication #960
Conversation
Signed-off-by: Vladislav Oleshko <[email protected]>
local N = ARGV[1] | ||
|
||
-- fill each list with its k value | ||
for i, k in pairs(KEYS) do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are passing keys, which are pairs and actually only the second of the pair is the key?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this is just the default way to iterate a table in lua, like golangs for i, v := range slice
for key_set in key_sets: | ||
for j, k in enumerate(key_set): | ||
l = await c_replica.lrange(k, 0, -1) | ||
assert l == [f'{j}'.encode()] * num_ops |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we need to call
connection.connection_pool.disconnect()
so we will not get the error log
Task pending name='Task-3' coro=<Connection.disconnect() running at /usr/local/lib/python3.8/dist-packages/aioredis/connection.py:806>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to do this in all tests, but even with it we might have those issues, lets look at it separately
Test script replication with simple test
Fixes #885