Skip to content

Conversation

@nerdrew
Copy link

@nerdrew nerdrew commented Dec 19, 2025

No description provided.

Comment on lines -845 to -858
rescue FailoverError, CannotConnectError => error
error._set_config(config)
raise error
rescue ConnectionError => error
connect_error = CannotConnectError.with_config(error.message, config)
connect_error.set_backtrace(error.backtrace)
raise connect_error
rescue CommandError => error
if error.message.match?(/ERR unknown command ['`]HELLO['`]/)
raise UnsupportedServer,
"redis-client requires Redis 6+ with HELLO command available (#{config.server_url})"
else
raise
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why you moved these rescues. Now only the send_prelude call in connect is covered.

assert_match(/WRONGPASS invalid username-password pair/, error.message)

# Correct password, but user disabled
backup.call("ACL", "SETUSER", "AzureDiamond", "<hunter2", ">trolilol", "off")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mutating an existing user, and trying to fix it in a rescue isn't good, as it may fail and leave the server in a state that fail other tests.

You can create a different user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants