tavisrudd/redis-clojure — pull request #2 by jeyoor (2011-12-17 13:54:02+00:00)
Title: Added config command and explicit authentication testing

Thanks for the feedback. One possible soution seems to be adding the config command to core.clj to facilitate setting/unsetting requirepass.

Two issues with this approach:

*The explicit auth/requirepass tests are only guaranteed to leave the configuration unchanged on redis >= 2.4
(Earlier versions of redis do not allow unsetting requirepass, only changing to a new password.)
https://github.com/antirez/redis/pull/171

*If the password changes from no password to a new password via "config set", the connection drops with this exception.

NoSuchElementException Could not create a validated object, cause:
ERR operation not permitted
org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject
(GenericKeyedObjectPool.java:1234)

Is this behavior appropriate or should the connection should remain open and allow the user to reauthenticate?
(Changing this may require another implementation of validateObject in connection_pool.clj)